Skip to main content

asdf_ndarray_read_all

Function asdf_ndarray_read_all 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn asdf_ndarray_read_all( ndarray: *mut asdf_ndarray_t, dst_t: ScalarTypeAbi, dst: *mut *mut c_void, ) -> NdarrayErr
Expand description

Read the whole array, converting to dst_t.

With dst pointing at a null pointer, a buffer is allocated and the caller frees it with free. Passing ASDF_DATATYPE_SOURCE (which is UNKNOWN) keeps the array’s own type.

§Safety

ndarray must be a valid asdf_ndarray_t; dst must be writable.