O'Reilly logo

OpenCL Parallel Programming Development Cookbook by Raymond Tay

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

Vector and scalar address spaces

Now that we have understood how to use scalars and vectors in OpenCL, it's time to examine the OpenCL's defined four address spaces: __global, __local, __constant, and __private in which vectors and scalars can exist in. These spaces are mapped to the memory units and hence, limited by the actual resource on the device and define how work items can access memory.

Getting ready

Following is a conceptual diagram of the various memory domains:

Getting ready

The Global Memory and Constant Memory found in the lower-half of the preceding diagram corresponds to the __global and __constant domain. The Local Memory associated with each ...

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