QuickstartΒΆ
So how does it work?
The AVX-CPP library works on the principle of SIMD.
This term stands for Single Instruction Multiple Data.
In simple terms it allows processing of multiple values utilizing only one [assembler] intruction.
This way performance critical parts of software can see a reduced runtime saving precious time.
Modern Intel and AMD CPUs support many SIMD instructions including:
Each class provides a set of regular math operators: + - * / %
. Those operators are intended to behave in a same way as their non-SIMD counterparts.
Each class has two static attributes which can be referenced when accessing them:
constexpr int
size
- number of elements stored in vector (4/8/16/32)using
storedType
- type of elements stored in vector.