MCPcopy Create free account
hub / github.com/apache/arrow / ExportTensor

Function ExportTensor

cpp/src/arrow/c/dlpack.cc:245–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243} // namespace
244
245Result<DLManagedTensor*> ExportTensor(const std::shared_ptr<Tensor>& t) {
246 // Legacy DLPack is not implemented initially for immutable tensor.
247 // We prefer users to over to the non-legacy DLPack rather than adding new behaviour.
248 if (!t->is_mutable()) {
249 return Status::NotImplemented(
250 "Legacy DLPack support is not implemented for immutable tensors."
251 " Please move to the DLPack version >=1.0");
252 }
253 return ExportTensorImpl<DLManagedTensor>(t, /* copy= */ false);
254}
255
256Result<DLManagedTensorVersioned*> ExportTensorVersioned(const std::shared_ptr<Tensor>& t,
257 bool copy) {

Callers 1

ExportMethod · 0.85

Calls 1

NotImplementedFunction · 0.50

Tested by 1

ExportMethod · 0.68