cupy.cuda.UnownedMemory#

class cupy.cuda.UnownedMemory(intptr_t ptr, size_t size, owner, int device_id=-1)[source]#

CUDA memory that is not owned by CuPy.

Parameters:
  • ptr (int) – Pointer to the buffer.

  • size (int) – Size of the buffer.

  • owner (object) – Reference to the owner object to keep the memory alive.

  • device_id (int) – CUDA device ID of the buffer. If omitted, the device associated to the pointer is retrieved.

Methods

__eq__(value, /)#

Return self==value.

__ne__(value, /)#

Return self!=value.

__lt__(value, /)#

Return self<value.

__le__(value, /)#

Return self<=value.

__gt__(value, /)#

Return self>value.

__ge__(value, /)#

Return self>=value.

Attributes

device#
device_id#

‘int’

Type:

device_id

ptr#

‘intptr_t’

Type:

ptr

size#

‘size_t’

Type:

size