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 array constructor with a ptr argument instead.

For OmniGraph applications, use from_omni_graph_ptr(). To create an array from a C pointer, use the array constructor with the ptr argument as a uint64 representing 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.array wrapping the existing memory.