Description
The generic address space requires support for either OpenCL C 2.0, or OpenCL C
3.0 or newer with the __opencl_c_ feature.
It can be used with pointer types and it represents a placeholder for any of the
named address spaces - global, local or private. It signals that a pointer
points to an object in one of these concrete named address spaces. The exact
address space resolution can occur dynamically during the kernel execution.
kernel void foo(int a)
{
private int b;
local int c;
int* p = a ? &b : &c; // p points to the local or private address space.
}
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.