warp.from_ptr#
- warp.from_ptr(ptr, length, dtype=None, shape=None, device=None)[source]#
Create an array from a raw memory pointer (deprecated).
Deprecated since version Use: the
arrayconstructor with aptrargument instead.For OmniGraph applications, use
from_omni_graph_ptr(). To create an array from a C pointer, use thearrayconstructor with theptrargument as auint64representing the memory address.- Parameters:
ptr – Pointer to existing memory allocation.
length – Number of elements in the array.
dtype – Data type of array elements.
shape – Shape of the array.
device – Device where the memory resides.
- Returns:
A
warp.arraywrapping the existing memory.
See also