cuda.bindings._v2.driver.graphics_resource_get_mapped_pointer_v2#

cuda.bindings._v2.driver.graphics_resource_get_mapped_pointer_v2(intptr_t resource) → tuple#

Get a device pointer through which to access a mapped graphics resource.

Returns in *p_dev_ptr a pointer through which the mapped graphics resource resource may be accessed. Returns in p_size the size of the memory in bytes which may be accessed from that pointer. The value set in p_dev_ptr may change every time that resource is mapped. If resource is not a buffer then it cannot be accessed via a pointer and CUDA_ERROR_NOT_MAPPED_AS_POINTER is returned. If resource is not mapped then CUDA_ERROR_NOT_MAPPED is returned.

Parameters:

resource (intptr_t) – Mapped resource to access.

Returns:

  • uint64_t: Returned pointer through which resource may be

    accessed.

  • size_t: Returned size of the buffer accessible starting at

    *p_dev_ptr.

Return type:

A 2-tuple containing

See also

cuGraphicsResourceGetMappedPointer_v2