Skip to main content

from_raw_parts

Function from_raw_parts 

Source
pub unsafe fn from_raw_parts<'a, H, M>(
    tensor: *const Tensor,
) -> &'a TensorRef<H, M>
Expand description

Construct a tensor reference from a raw pointer to an MNN tensor

ยงSafety

The caller must ensure that the provided pointer is valid and points to a properly initialized MNN