#[unsafe(no_mangle)]pub unsafe extern "C" fn hurray_file_reader_read_tensor(
handle: *mut HurrayFileReader,
name: *const u8,
name_len: usize,
out_tensor: *mut *mut HurrayTensor,
) -> HurrayStatusExpand description
Reads the tensor named name: its descriptor and every data buffer.
*out_tensor is owned by the caller and released with
hurray_tensor_destroy, which frees both halves.
Every buffer points at memory the core allocated at the alignment its buffer handle declares, which the transport wrote into directly — so a SIMD load on it is sound, and no copy of the payload happened after that write.
Returns HURRAY_ERR_NOT_FOUND for a name that is not
in the index. A composite head reads back as the buffer-less tensor it is in the file;
hurray_file_reader_read_composite reads it with its members instead.
§Safety
handleMUST point to a liveHurrayFileReader.nameMUST be readable forname_lenbytes.out_tensorMUST be a valid, non-null, writable pointer.