Skip to main content

ghostflow_tensor_create

Function ghostflow_tensor_create 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ghostflow_tensor_create( data: *const c_float, data_len: usize, shape: *const usize, shape_len: usize, out: *mut *mut GhostFlowTensor, ) -> GhostFlowError
Expand description

Create a new tensor from data

§Arguments

  • data - Pointer to float array
  • data_len - Length of data array
  • shape - Pointer to shape array
  • shape_len - Length of shape array
  • out - Output pointer to store the created tensor

§Returns

Error code