O'Reilly logo

OpenCL Programming by Example by Koushik Bhattacharyya, Ravishekhar Banger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Address space qualifiers

There are four different address space qualifiers supported by OpenCL. The address space qualifier is used in variable declarations to specify the region of memory to allocate the declared object. The following is the list of address qualifiers:

  • __global or global
  • __local or local
  • __constant or constant
  • __private or private

A data type object in a kernel program is allocated space in the specified address space qualifier. If no specifier is given then a generic address space is considered. For example all kernel function arguments and local variables will take a __private if no address space qualifier is specified. Image memory objects arguments of type image2d_t, image3d_t, image2d_array_t, image1d_t, image1d_buffer_t, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required