FillSparseTensorCsr property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtValue> ort_value, Pointer<OrtMemoryInfo> data_mem_info, Pointer<Int64> values_shape, Size values_shape_len, Pointer<Void> values, Pointer<Int64> inner_indices_data, Size inner_indices_num, Pointer<Int64> outer_indices_data, Size outer_indices_num)>> FillSparseTensorCsr
getter/setter pair

This fills populates an empty tensor that was created using OrtApi::CreateSparseTensorAsOrtValue. This will allocate required memory and copy the supplied NNZ values and CSR indices into that memory allocation. Memory allocation is performed using the allocator that was specified with OrtApi::CreateSparseTensorAsOrtValue.

\paramin,out ort_value ::OrtValue to populate with data \paramin data_mem_info serves to identify the location of the data to be copied. If the allocator specified at the creation time has memory info that is not the same as mem_info argument to this function a X-device copy will be performed. String data is assumed to be on CPU and will only be copied into a CPU allocated buffer. \paramin values_shape pointer to values shape array \paramin values_shape_len length of the values_shape \paramin values - pointer to an array of values. For strings, pass const char**. \paramin inner_indices_data pointer to a location of CSR inner indices \paramin inner_indices_num number of CSR inner indices \paramin outer_indices_data pointer to a location of CSR outer indices \paramin outer_indices_num number of CSR outer indices

\snippet{doc} snippets.dox OrtStatus Return Value

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtValue> ort_value,
      ffi.Pointer<OrtMemoryInfo> data_mem_info,
      ffi.Pointer<ffi.Int64> values_shape,
      ffi.Size values_shape_len,
      ffi.Pointer<ffi.Void> values,
      ffi.Pointer<ffi.Int64> inner_indices_data,
      ffi.Size inner_indices_num,
      ffi.Pointer<ffi.Int64> outer_indices_data,
      ffi.Size outer_indices_num,
    )
  >
>
FillSparseTensorCsr;