Function tvm::runtime::function::ffi::TVMDeviceAllocDataSpace [−][src]
pub unsafe extern "C" fn TVMDeviceAllocDataSpace(
dev: DLDevice,
nbytes: u64,
alignment: u64,
type_hint: DLDataType,
out_data: *mut *mut c_void
) -> i32
Expand description
\brief Allocate a data space on device. \param dev The device to perform operation. \param nbytes The number of bytes in memory. \param alignment The alignment of the memory. \param type_hint The type of elements. Only needed by certain backends such as nbytes & alignment are sufficient for most backends. \param out_data The allocated device pointer. \return 0 when success, nonzero when failure happens