(dataId: DataId)
| 220 | } |
| 221 | |
| 222 | readSync(dataId: DataId): backend_util.BackendValues { |
| 223 | if (!this.tensorMap.has(dataId)) { |
| 224 | throw new Error(`Tensor ${dataId} was not registered!`); |
| 225 | } |
| 226 | const info = this.tensorMap.get(dataId); |
| 227 | if (info.values != null) { |
| 228 | return info.values; |
| 229 | } else { |
| 230 | return this.binding.tensorDataSync(info.id); |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | /** |
| 235 | * Dispose the memory if the dataId has 0 refCount. Return true if the memory |
no test coverage detected