cuda.bindings._v2.driver.graphics_resource_set_map_flags_v2#
- cuda.bindings._v2.driver.graphics_resource_set_map_flags_v2(
- intptr_t resource,
- unsigned int flags,
Set usage flags for mapping a graphics resource.
Set
flagsfor mapping the graphics resourceresource. Changes toflagswill take effect the next timeresourceis mapped. Theflagsargument may be any of the following:.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. It is therefore assumed that this resource will be read from and written to by CUDA kernels. This is the default value.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READONLY: Specifies that CUDA kernels which access this resource will not write to this resource.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITEDISCARD: Specifies that CUDA kernels which access this resource will not read from this resource and will write over the entire contents of the resource, so none of the data previously stored in the resource will be preserved.
If
resourceis presently mapped for access by CUDA thenCUDA_ERROR_ALREADY_MAPPEDis returned. Ifflagsis not one of the above values thenCUDA_ERROR_INVALID_VALUEis returned.- Parameters:
resource (intptr_t) – Registered resource to set flags for.
flags (unsigned int) – Parameters for resource mapping.
See also
cuGraphicsResourceSetMapFlags_v2