Function tvm::runtime::function::ffi::TVMArrayAlloc [−][src]
pub unsafe extern "C" fn TVMArrayAlloc(
shape: *const i64,
ndim: i32,
dtype_code: i32,
dtype_bits: i32,
dtype_lanes: i32,
device_type: i32,
device_id: i32,
out: *mut *mut DLTensor
) -> i32
Expand description
\brief Allocate a nd-array’s memory, including space of shape, of given spec.
\param shape The shape of the array, the data content will be copied to out \param ndim The number of dimension of the array. \param dtype_code The type code of the dtype \param dtype_bits The number of bits of dtype \param dtype_lanes The number of lanes in the dtype. \param device_type The device type. \param device_id The device id. \param out The output handle. \return 0 when success, nonzero when failure happens