Skip to main content

Module host_array_c

Module host_array_c 

Source
Expand description

C FFI functions for inspecting and freeing HostArray objects.

Provides extern "C" functions for querying HostArray metadata (dimensions, strides, data type, raw pointer) and for freeing a HostArray previously returned by this library.

Functions§

diffsol_host_array_alloc_vector
Allocate a one-dimensional host array of the requested length and scalar type.
diffsol_host_array_dim
Return the size of a single dimension in a host array.
diffsol_host_array_dtype
Return the scalar type enum stored by a host array.
diffsol_host_array_free
Free a host array previously returned by this library.
diffsol_host_array_ndim
Return the number of dimensions in a host array.
diffsol_host_array_ptr
Return the raw data pointer stored by a host array.
diffsol_host_array_stride
Return the stride, in bytes, for a single dimension in a host array.