pub unsafe extern "C" fn tract_value_from_bytes(
datum_type: DatumType,
rank: usize,
shape: *const usize,
data: *mut c_void,
value: *mut *mut TractValue,
) -> TRACT_RESULTExpand description
Create a TractValue (aka tensor) from caller data and metadata.
This call copies the data into tract space. All the pointers only need to be alive for the duration of the call.
rank is the number of dimensions of the tensor (i.e. the length of the shape vector).
The returned value must be destroyed by tract_value_destroy.