Design of a low-level C++ template SIMD library

Ralf Möller · PUB – Publications at Bielefeld University (Bielefeld University) · 2016

The full computational power of modern CPUs can only be harnessed by using their SIMD vector units.Vector instructions can conveniently be accessed from high-level languages like C or C++ by means of vector intrinsics.However, these intrinsics are specific for the chosen vector extension and for the data type of the vector elements.Porting to a different vector extension or changing the data type requires modifications of many intrinsics and results in the duplication of large portions of code.The low-level C++ template SIMD library described in this report wraps vector intrinsics in C++ templates or overloaded functions for which the vector extension and the data type can be changed with minimal effort for entire portions of the code.In addition, C++ template meta-programming can be exploited to produce generic code for arbitrary vector extensions and data types.

Read the paper · More papers on PaperTik