cudaError_t cudaGraphicsResourceSetMapFlags ( cudaGraphicsResource_t  resource,
unsigned int  flags 
)

Set flags for mapping the graphics resource resource.

Changes to flags will take effect the next time resource is mapped. The flags argument may be any of the following:

  • cudaGraphicsMapFlagsNone: Specifies no hints about how resource will be used. It is therefore assumed that CUDA may read from or write to resource.
  • cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will not write to resource.
  • cudaGraphicsMapFlagsWriteDiscard: Specifies CUDA will not read from resource and will write over the entire contents of resource, so none of the data previously stored in resource will be preserved.

If resource is presently mapped for access by CUDA then cudaErrorUnknown is returned. If flags is not one of the above values then cudaErrorInvalidValue is returned.

Parameters:
resource - Registered resource to set flags for
flags - Parameters for resource mapping
Returns:
cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorUnknown,
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cudaGraphicsMapResources


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA