AVX Math¶
This is a list of functions defined inside avxmath.hpp
file.
-
namespace avx¶
Functions
-
Double256 sin(const Double256 &bV)¶
Calculates sine of the vector.
- Parameters:
bV – Vector which values will be used to calculate sine.
- Returns:
Vector containing sine of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform sine calculation on per element basis (this can be changed in future versions).
-
Double256 cos(const Double256 &bV)¶
Calculates cosine of the vector.
- Parameters:
bV – Vector which values will be used to calculate cosine.
- Returns:
Vector containing cosine of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform cosine calculation on per element basis.
-
Double256 tan(const Double256 &bV)¶
Calculates tangent of the vector.
- Parameters:
bV – Vector which values will be used to calculate tangent.
- Returns:
Vector containing tangent of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform tangent calculation on per element basis.
-
Double256 ctg(const Double256 &bV)¶
Calculates cotangent of the vector.
- Parameters:
bV – Vector which values will be used to calculate cotangent.
- Returns:
Vector containing cotangent of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform cotangent calculation on per element basis.
-
Double256 sec(const Double256 &bV)¶
Calculates secant of the vector.
- Parameters:
bV – Vector which values will be used to calculate secant.
- Returns:
Vector containing secant of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform secant calculation on per element basis.
-
Double256 cosec(const Double256 &bV)¶
Calculates cosecant of the vector.
- Parameters:
bV – Vector which values will be used to calculate cosecant.
- Returns:
Vector containing cosecant of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform cosecant calculation on per element basis.
-
Float256 sin(const Float256 &bV)¶
Calculates sine of the vector.
- Parameters:
bV – Vector which values will be used to calculate sine.
- Returns:
Vector containing sine of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform sine calculation on per element basis.
-
Float256 cos(const Float256 &bV)¶
Calculates cosine of the vector.
- Parameters:
bV – Vector which values will be used to calculate cosine.
- Returns:
Vector containing cosine of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform cosine calculation on per element basis.
-
Float256 tan(const Float256 &bV)¶
Calculates tangent of the vector.
- Parameters:
bV – Vector which values will be used to calculate tangent.
- Returns:
Vector containing tangent of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform tangent calculation on per element basis.
-
Float256 ctg(const Float256 &bV)¶
Calculates cotangent of the vector.
- Parameters:
bV – Vector which values will be used to calculate cotangent.
- Returns:
Vector containing cotangent of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform cotangent calculation on per element basis.
-
Float256 sec(const Float256 &bV)¶
Calculates secant of the vector.
- Parameters:
bV – Vector which values will be used to calculate secant.
- Returns:
Vector containing secant of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform secant calculation on per element basis.
-
Float256 cosec(const Float256 &bV)¶
Calculates cosecant of the vector.
- Parameters:
bV – Vector which values will be used to calculate cosecant.
- Returns:
Vector containing cosecant of each value in
bV
.Note: This function uses SVML library, which is available only on MSVC compiler. On other compilers function will perform cosecant calculation on per element basis.
-
int accumulate(const std::vector<int> &data, int initVal)¶
Accumulates values using AVX2 or AVX512 (if selected in CMake, no runtime detection).
- Parameters:
data – Vector containing data to be accumulated.
initVal – Initial value to which all data will be added.
- Returns:
Accumulated value:
sum(data) + initVal
-
float accumulate(const std::vector<float> &data, float initVal)¶
Accumulates values using AVX2 or AVX512 (if selected in CMake, no runtime detection).
- Parameters:
data – Vector containing data to be accumulated.
initVal – Initial value to which all data will be added.
- Returns:
Accumulated value:
sum(data) + initVal
-
int64_t accumulate(const std::vector<int64_t> &data, int64_t initVal)¶
Accumulates values using AVX2 or AVX512 (if selected in CMake, no runtime detection).
- Parameters:
data – Vector containing data to be accumulated.
initVal – Initial value to which all data will be added.
- Returns:
Accumulated value:
sum(data) + initVal
-
double accumulate(const std::vector<double> &data, double initVal)¶
Accumulates values using AVX2 or AVX512 (if selected in CMake, no runtime detection).
- Parameters:
data – Vector containing data to be accumulated.
initVal – Initial value to which all data will be added.
- Returns:
Accumulated value:
sum(data) + initVal
-
Double256 sin(const Double256 &bV)¶