cuda.bindings._v2.driver.graphics_map_resources#

cuda.bindings._v2.driver.graphics_map_resources(resources, intptr_t h_stream)#

Map graphics resources for access by CUDA.

Maps the len(resources) graphics resources in resources for access by CUDA. The resources in resources may be accessed by CUDA until they are unmapped. The graphics API from which resources were registered should not access any resources while they are mapped by CUDA. If an application does so, the results are undefined. This function provides the synchronization guarantee that any graphics calls issued before graphics_map_resources() will complete before any subsequent CUDA work issued in stream begins. If resources includes any duplicate entries then CUDA_ERROR_INVALID_HANDLE is returned. If any of resources are presently mapped for access by CUDA then CUDA_ERROR_ALREADY_MAPPED is returned.

Parameters:
  • resources (object) –

    Resources to map for CUDA usage. It must be:

    • a Python sequence of ints (as pointer addresses), or

    • None for NULL.

  • h_stream (intptr_t) – Stream with which to synchronize.

See also

cuGraphicsMapResources