Skip to main content

hurray_descriptor_field_i64

Function hurray_descriptor_field_i64 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn hurray_descriptor_field_i64( handle: *const HurrayDescriptor, field: HurrayDescriptorField, level: u32, out_value: *mut i64, ) -> HurrayStatus
Expand description

Reads a signed scalar field of the descriptor.

Only per-tensor affine zero_point is signed; it is an int32 on the wire and widens losslessly. Separate from hurray_descriptor_field_u64 because an unsigned accessor would report a negative zero point as a huge positive number, which is exactly the kind of silent corruption a quantized read cannot absorb.

§Errors

As hurray_descriptor_field_u64, with HURRAY_ERR_FIELD_NOT_APPLICABLE for any field that is not a signed scalar.

§Safety

handle and out_value MUST be valid, non-null pointers, and handle MUST NOT have been destroyed.