Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.25 KB

map_flags_Inc.adoc

File metadata and controls

32 lines (20 loc) · 1.25 KB
cl_map_flags Description

CL_MAP_READ

This flag specifies that the region being mapped in the memory object is being mapped for reading.

The pointer returned by clEnqueueMap{Buffer|Image} is guaranteed to contain the latest bits in the region being mapped when the clEnqueueMap{Buffer|Image} command has completed.

CL_MAP_WRITE

This flag specifies that the region being mapped in the memory object is being mapped for writing.

The pointer returned by clEnqueueMap{Buffer|Image} is guaranteed to contain the latest bits in the region being mapped when the clEnqueueMap{Buffer|Image} command has completed.

CL_MAP_WRITE_INVALIDATE_REGION

This flag specifies that the region being mapped in the memory object is being mapped for writing.

The contents of the region being mapped are to be discarded. This is typically the case when the region being mapped is overwritten by the host. This flag allows the implementation to no longer guarantee that the pointer returned by clEnqueueMap{Buffer|Image} contains the latest bits in the region being mapped which can be a significant performance enhancement.

CL_MAP_READ or CL_MAP_WRITE and CL_MAP_WRITE_INVALIDATE_REGION are mutually exclusive.