SIMD Primitives#

As a way to faciliate the SIMD programming, MOCCA provided a simple interface over the raw SIMD instrinsic and datatypes, while also providing the most common methods and operations. Here, we define 3 datatypes:

  • Register - A SIMD register. The width of the registers and the number of lanes depends on the target instruction set (e.g., AVX2) and underlying type (e.g., double, float, int, etc.).

  • Mask - A mask over a SIMD register.

  • Tile - A group of SIMD registers forming a square matrix. The size of the Tile depends on the number of lanes in the register.

Note

There is no automatic type conversion in SIMD.