Skip to main content

hurray_descriptor_decode

Function hurray_descriptor_decode 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn hurray_descriptor_decode( bytes: *const u8, len: usize, out_handle: *mut *mut HurrayDescriptor, ) -> HurrayStatus
Expand description

Decodes a binary tensor descriptor from a byte buffer.

On success, *out_handle is set to a newly allocated HurrayDescriptor that MUST be released via hurray_descriptor_destroy.

§Arguments

  • bytes — Non-null pointer to the first byte of the encoded descriptor.
  • len — Number of bytes readable at bytes.
  • out_handle — Non-null pointer to a *mut HurrayDescriptor; set on success.

§Safety

  • bytes MUST be valid and readable for len bytes for the duration of this call.
  • out_handle MUST be a valid, non-null, writable pointer.