Function deepviewrt_sys::nn_tensor_init
source · pub unsafe extern "C" fn nn_tensor_init(
memory: *mut c_void,
engine: *mut NNEngine
) -> *mut NNTensorExpand description
Initializes the tensor using provided memory. The memory MUST be at least the size returned by @ref nn_tensor_sizeof(). This size does not include the actual tensor data which is allocated separately, either by requesting the implementation to allocate the buffer or attaching to externally allocated memory.
The tensor created by this function has no data associated to it and is of rank-0.
@param memory The pointer to be initialized to a NNTensor object. @param engine Pointer to the engine object.
@return NULL given the memory pointer is a null pointer. @return Pointer to the newly created NNTensor object.
@public @memberof NNTensor @since 2.0