GetStringTensorContent property
\brief Get all strings from a string tensor
An example of the results:
Given \p value is a string tensor with the strings { "This" "is" "a" "test" }
\p s must have a size of 11 bytes
\p offsets must have 4 elements
After the call, these values will be filled in:
\p s will contain "Thisisatest"
\p offsets will contain { 0, 4, 6, 7 }
The length of the last string is just s_len - offsetslast
\paramin value A tensor of type ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING
\paramin s Buffer to sequentially write all tensor strings to. Each string is NOT null-terminated.
\paramin s_len Number of bytes of buffer pointed to by \p s (Get it from OrtApi::GetStringTensorDataLength)
\paramout offsets Array of start offsets into the strings written to \p s
\paramin offsets_len Number of elements in offsets
\snippet{doc} snippets.dox OrtStatus Return Value
Implementation
external ffi.Pointer<
ffi.NativeFunction<
OrtStatusPtr Function(
ffi.Pointer<OrtValue> value,
ffi.Pointer<ffi.Void> s,
ffi.Size s_len,
ffi.Pointer<ffi.Size> offsets,
ffi.Size offsets_len,
)
>
>
GetStringTensorContent;