SIMDvalarray is the class for representing and manipulating arrays of values like std::valarray but it uses SIMD techniques like SSE, AVX ... and has no subscript operators like slicing.
Einfach SIMDarray mit Operatoren +, -, *, /, +=, -=, *=, /=
template<typename T, std::size_t N> struct SIMDvalarray : acpl::SIMDarray<T,N> { }; ... SIMDvalarray arr1 {1.0, 2.0}; SIMDvalarray arr2 {2.0, 4.0}; SIMDvalarray erg1 = arr1+arr2;
Erzeugt packed values SIMD Assember Code, wie gewünscht. Und mit C++17 Decudtion Guidelines muss man die nervigen, redundanten Template Parameter auch nicht mehr mit angeben.
https://sourceforge.net/p/acpl/code/ci/master/tree/acpl/acpllib/include/core/util/SIMDvalarray.hpp