Description
The functionality described in this section requires
support for OpenCL C 2.0, or OpenCL C 3.0 or newer and the
__opencl_c_ feature.
|
This section describes built-in functions to safely convert from pointers
to the generic address space to pointers to named address spaces, and to
query the appropriate fence flags for a pointer to the generic address space.
We use the generic type name gentype to indicate any of the built-in data
types supported by OpenCL C or a user defined type.
| Function | Description |
|---|---|
global gentype * to_global(gentype *ptr) |
Returns a pointer that points to a region in the |
local gentype * to_local(gentype *ptr) |
Returns a pointer that points to a region in the |
private gentype * to_private(gentype *ptr) |
Returns a pointer that points to a region in the |
cl_mem_fence_flags get_fence(gentype *ptr) |
Returns a valid memory fence value for ptr. |
Document Notes
For more information, see the OpenCL C Specification
This page is extracted from the OpenCL C Specification. Fixes and changes should be made to the Specification, not directly.