Function deepviewrt_sys::nn_tensor_maprw
source · pub unsafe extern "C" fn nn_tensor_maprw(
tensor: *mut NNTensor
) -> *mut c_voidExpand description
Maps the tensor’s memory and returns the client accessible pointer. This is the read-write version which causes the engine to download buffers to the CPU memory space if required and will also flush back to the device on unmap.
If the tensor is already mapped read-only it needs to be unmapped before calling maprw otherwise NULL is returned. A tensor already mapped as rw will simply increase the reference count. A write-only mapped tensor will also return NULL.
@public @memberof NNTensor @since 2.0