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

Loading vectors from an array

The vloadN functions are typically used to load multiple elements from an in-memory array to a destination in-memory data structure and are often a vector. Similar to the vstoreN functions, the vloadN functions also load elements from the global (__global), local (__local), work item private (__private), and finally constant memory spaces (__constant).

We should be clear that gentypeN is not a C-like type alias for a data type but rather a logical placeholder for the types: char, uchar, short, ushort, int, uint, long, ulong, float, or double and the N stands for whether it's a data structure that aggregates 2, 3, 4, 8, or 16 elements. Without this function, the kernel needs to issue potentially multiple memory loads ...

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