| 97 | } |
| 98 | |
| 99 | Ref<Tensor> Engine::newTensor(const TensorDesc& desc, Storage storage) |
| 100 | { |
| 101 | if (!isSupported(desc)) |
| 102 | throw std::invalid_argument("unsupported tensor descriptor"); |
| 103 | |
| 104 | return makeRef<DeviceTensor>(this, desc, storage); |
| 105 | } |
| 106 | |
| 107 | Ref<Tensor> Engine::newTensor(const Ref<Buffer>& buffer, const TensorDesc& desc, size_t byteOffset) |
| 108 | { |
nothing calls this directly
no test coverage detected