CreateTensorFromMemory property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtExternalResourceImporterImpl> this_ptr, Pointer<OrtExternalMemoryHandle> mem_handle, Pointer<OrtExternalTensorDescriptor> tensor_desc, Pointer<Pointer<OrtValue>> out_tensor)>> CreateTensorFromMemory
getter/setter pair

\brief Create a tensor backed by imported external memory.

The created tensor is a view over the imported memory and does not copy data.

\paramin this_ptr Pointer to the OrtExternalResourceImporterImpl instance. \paramin mem_handle The imported external memory handle (EP casts to its derived type). \paramin tensor_desc Descriptor specifying tensor element type, shape, and optional offset. \paramout out_tensor Output parameter set to the created OrtValue containing the tensor.

\snippet{doc} snippets.dox OrtStatus Return Value

\since Version 1.24.

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtExternalResourceImporterImpl> this_ptr,
      ffi.Pointer<OrtExternalMemoryHandle> mem_handle,
      ffi.Pointer<OrtExternalTensorDescriptor> tensor_desc,
      ffi.Pointer<ffi.Pointer<OrtValue>> out_tensor,
    )
  >
>
CreateTensorFromMemory;