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

Understanding OpenCL vector types

When you start working through your OpenCL project you are inevitably going to use both the scalar and vector data types to model the algorithm. Scalars work like any variable declaration/definition you may have come across in most of the programming languages, and you should think of vectors as a wide container that can deliver all items in that container in parallel, and the one thing that differentiates scalars and vectors is the fact that when an operation is applied to a scalar, it affects just a single value while the same operation applied to a vector affects all items in it in parallel.

In the modern processors, there exist a specialized hardware unit that processes more data per cycle and they are often ...

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