UseCsrIndices property
The assigns CSR format indices to the SparseTensor that was created by OrtApi::CreateSparseTensorWithValuesAsOrtValue above. It also sets OrtSparseFormat to ORT_SPARSE_CSRC. This will not allocate any additional memory for data. The life spans of inner_data and outer_data buffers should eclipse the life span of this ::OrtValue.
\paramin,out ort_value ::OrtValue instance constructed with OrtApi::CreateSparseTensorWithValuesAsOrtValue
\paramin,out inner_data pointer to a user pre-allocated buffer or nullptr for fully sparse tensors.
\paramin inner_num number of inner CSR indices. Should either be 0 for fully sparse tensors or be equal
to the number of nnz values specified to OrtApi::CreateSparseTensorWithValuesAsOrtValue.
\paramin,out outer_data pointer to user pre-allocated buffer or nullptr for fully sparse tensors.
\paramin outer_num number of CSR outer indices. Should either be 0 for fully sparse tensors or
equal to rows + 1 of the dense shape.
\snippet{doc} snippets.dox OrtStatus Return Value
Implementation
external ffi.Pointer<
ffi.NativeFunction<
OrtStatusPtr Function(
ffi.Pointer<OrtValue> ort_value,
ffi.Pointer<ffi.Int64> inner_data,
ffi.Size inner_num,
ffi.Pointer<ffi.Int64> outer_data,
ffi.Size outer_num,
)
>
>
UseCsrIndices;