Operations and Functions for Vector Data Types

The C/C++ compiler supports the use of native vector data types in C/C++ source files. Vector data types are described in Section 5.3.2. These vector data types are useful for parallel programming applications.

The implementation of vector data types and operations follows the OpenCL C language specification closely. For a detailed description of OpenCL vector data types and operations, please see The OpenCL Specification version 1.2, which is available from the Khronos OpenCL Working Group.

Various types of operations can be performed on vectors. These include vector literals and concatenation (Section 5.14.1), unary and binary operators (Section 5.14.2), and swizzle operators for component access (Section 5.14.4).