Vc
0.7.5-dev
SIMD Vector Classes for C++
|
|
Functions that implement math functions.
Take care that some of the implementations will return results with less precision than what the FPU calculates.
Functions | |
float_v | sqrt (const float_v &v) |
Returns the square root of v . | |
float_v | rsqrt (const float_v &v) |
Returns the reciprocal square root of v . | |
float_v | reciprocal (const float_v &v) |
Returns the reciprocal of v . | |
float_v | abs (const float_v &v) |
Returns the absolute value of v . | |
float_v | round (const float_v &v) |
Returns the closest integer to v ; 0.5 is rounded to even. | |
float_v | log (const float_v &v) |
Returns the natural logarithm of v . | |
float_v | log2 (const float_v &v) |
Returns the base-2 logarithm of v . | |
float_v | log10 (const float_v &v) |
Returns the base-10 logarithm of v . | |
float_v | exp (const float_v &v) |
Returns the exponential of v . | |
float_v | sin (const float_v &v) |
Returns the sine of v . | |
float_v | cos (const float_v &v) |
Returns the cosine of v . | |
void | sincos (const float_v &v, float_v *sin, float_v *cos) |
Calculates the sine and cosine of v . | |
float_v | asin (const float_v &v) |
Returns the arcsine of v . | |
float_v | atan (const float_v &v) |
Returns the arctangent of v . | |
float_v | atan2 (const float_v &x, const float_v &y) |
Returns the arctangent of x / y . | |
float_v | min (const float_v &x, const float_v &y) |
Returns the minimum of x and y . | |
float_v | max (const float_v &x, const float_v &y) |
Returns the maximum of x and y . | |
float_v | frexp (const float_v &x, int_v *e) |
Convert floating-point number to fractional and integral components. | |
float_v | ldexp (float_v x, int_v e) |
Multiply floating-point number by integral power of 2. | |
float_m | isfinite (const float_v &x) |
Returns a mask that tells whether the values in the vector are finite (i.e. not NaN or +/-inf). | |
float_m | isnan (const float_v &x) |
Returns a mask that tells whether the values in the vector are NaN. | |
double_v | sqrt (const double_v &v) |
Returns the square root of v . | |
double_v | rsqrt (const double_v &v) |
Returns the reciprocal square root of v . | |
double_v | reciprocal (const double_v &v) |
Returns the reciprocal of v . | |
double_v | abs (const double_v &v) |
Returns the absolute value of v . | |
double_v | round (const double_v &v) |
Returns the closest integer to v ; 0.5 is rounded to even. | |
double_v | log (const double_v &v) |
Returns the natural logarithm of v . | |
double_v | log2 (const double_v &v) |
Returns the base-2 logarithm of v . | |
double_v | log10 (const double_v &v) |
Returns the base-10 logarithm of v . | |
double_v | exp (const double_v &v) |
Returns the exponential of v . | |
double_v | sin (const double_v &v) |
Returns the sine of v . | |
double_v | cos (const double_v &v) |
Returns the cosine of v . | |
void | sincos (const double_v &v, double_v *sin, double_v *cos) |
Calculates the sine and cosine of v . | |
double_v | asin (const double_v &v) |
Returns the arcsine of v . | |
double_v | atan (const double_v &v) |
Returns the arctangent of v . | |
double_v | atan2 (const double_v &x, const double_v &y) |
Returns the arctangent of x / y . | |
double_v | min (const double_v &x, const double_v &y) |
Returns the minimum of x and y . | |
double_v | max (const double_v &x, const double_v &y) |
Returns the maximum of x and y . | |
double_v | frexp (const double_v &x, int_v *e) |
Convert floating-point number to fractional and integral components. | |
double_v | ldexp (double_v x, int_v e) |
Multiply floating-point number by integral power of 2. | |
double_m | isfinite (const double_v &x) |
Returns a mask that tells whether the values in the vector are finite (i.e. not NaN or +/-inf). | |
double_m | isnan (const double_v &x) |
Returns a mask that tells whether the values in the vector are NaN. | |
sfloat_v | sqrt (const sfloat_v &v) |
Returns the square root of v . | |
sfloat_v | rsqrt (const sfloat_v &v) |
Returns the reciprocal square root of v . | |
sfloat_v | reciprocal (const sfloat_v &v) |
Returns the reciprocal of v . | |
sfloat_v | abs (const sfloat_v &v) |
Returns the absolute value of v . | |
sfloat_v | round (const sfloat_v &v) |
Returns the closest integer to v ; 0.5 is rounded to even. | |
sfloat_v | log (const sfloat_v &v) |
Returns the natural logarithm of v . | |
sfloat_v | log2 (const sfloat_v &v) |
Returns the base-2 logarithm of v . | |
sfloat_v | log10 (const sfloat_v &v) |
Returns the base-10 logarithm of v . | |
sfloat_v | exp (const sfloat_v &v) |
Returns the exponential of v . | |
sfloat_v | sin (const sfloat_v &v) |
Returns the sine of v . | |
sfloat_v | cos (const sfloat_v &v) |
Returns the cosine of v . | |
void | sincos (const sfloat_v &v, sfloat_v *sin, sfloat_v *cos) |
Calculates the sine and cosine of v . | |
sfloat_v | asin (const sfloat_v &v) |
Returns the arcsine of v . | |
sfloat_v | atan (const sfloat_v &v) |
Returns the arctangent of v . | |
sfloat_v | atan2 (const sfloat_v &x, const sfloat_v &y) |
Returns the arctangent of x / y . | |
sfloat_v | min (const sfloat_v &x, const sfloat_v &y) |
Returns the minimum of x and y . | |
sfloat_v | max (const sfloat_v &x, const sfloat_v &y) |
Returns the maximum of x and y . | |
sfloat_v | frexp (const sfloat_v &x, short_v *e) |
Convert floating-point number to fractional and integral components. | |
sfloat_v | ldexp (sfloat_v x, short_v e) |
Multiply floating-point number by integral power of 2. | |
sfloat_m | isfinite (const sfloat_v &x) |
Returns a mask that tells whether the values in the vector are finite (i.e. not NaN or +/-inf). | |
sfloat_m | isnan (const sfloat_v &x) |
Returns a mask that tells whether the values in the vector are NaN. |
float_v Vc::log | ( | const float_v & | v | ) |
Returns the natural logarithm of v
.
float_v Vc::log2 | ( | const float_v & | v | ) |
Returns the base-2 logarithm of v
.
float_v Vc::log10 | ( | const float_v & | v | ) |
Returns the base-10 logarithm of v
.
float_v Vc::sin | ( | const float_v & | v | ) |
Returns the sine of v
.
float_v Vc::cos | ( | const float_v & | v | ) |
Returns the cosine of v
.
void Vc::sincos | ( | const float_v & | v, |
float_v * | sin, | ||
float_v * | cos | ||
) |
Calculates the sine and cosine of v
.
The values are returned in the sin
and cos
parameters.
[in] | v | input value to sin and cos |
[out] | sin | Needs to be a non-null pointer which will be set to the sine of v . |
[out] | cos | Needs to be a non-null pointer which will be set to the cosine of v . |
float_v Vc::asin | ( | const float_v & | v | ) |
Returns the arcsine of v
.
float_v Vc::atan | ( | const float_v & | v | ) |
Returns the arctangent of v
.
float_v Vc::frexp | ( | const float_v & | x, |
int_v * | e | ||
) |
Convert floating-point number to fractional and integral components.
x | value to be split into normalized fraction and exponent |
e | the exponent to base 2 of x |
x
is non-zero, the return value is x
times a power of two, and its absolute value is always in the range [0.5,1).x
is zero, then the normalized fraction is zero and zero is stored in e
.x
is a NaN, a NaN is returned, and the value of *e
is unspecified.x
is positive infinity (negative infinity), positive infinity (nega‐ tive infinity) is returned, and the value of *e
is unspecified. float_v Vc::ldexp | ( | float_v | x, |
int_v | e | ||
) |
Multiply floating-point number by integral power of 2.
x | value to be multiplied by 2 ^ e |
e | exponent |
x
* 2 ^ e
double_v Vc::log | ( | const double_v & | v | ) |
Returns the natural logarithm of v
.
double_v Vc::log2 | ( | const double_v & | v | ) |
Returns the base-2 logarithm of v
.
double_v Vc::log10 | ( | const double_v & | v | ) |
Returns the base-10 logarithm of v
.
double_v Vc::sin | ( | const double_v & | v | ) |
Returns the sine of v
.
double_v Vc::cos | ( | const double_v & | v | ) |
Returns the cosine of v
.
void Vc::sincos | ( | const double_v & | v, |
double_v * | sin, | ||
double_v * | cos | ||
) |
Calculates the sine and cosine of v
.
The values are returned in the sin
and cos
parameters.
[in] | v | input value to sin and cos |
[out] | sin | Needs to be a non-null pointer which will be set to the sine of v . |
[out] | cos | Needs to be a non-null pointer which will be set to the cosine of v . |
double_v Vc::asin | ( | const double_v & | v | ) |
Returns the arcsine of v
.
double_v Vc::atan | ( | const double_v & | v | ) |
Returns the arctangent of v
.
double_v frexp | ( | const double_v & | x, |
int_v * | e | ||
) |
Convert floating-point number to fractional and integral components.
x | value to be split into normalized fraction and exponent |
e | the exponent to base 2 of x |
x
is non-zero, the return value is x
times a power of two, and its absolute value is always in the range [0.5,1).x
is zero, then the normalized fraction is zero and zero is stored in e
.x
is a NaN, a NaN is returned, and the value of *e
is unspecified.x
is positive infinity (negative infinity), positive infinity (nega‐ tive infinity) is returned, and the value of *e
is unspecified.*e
is defined. double_v ldexp | ( | double_v | x, |
int_v | e | ||
) |
Multiply floating-point number by integral power of 2.
x | value to be multiplied by 2 ^ e |
e | exponent |
x
* 2 ^ e
*e
is defined. sfloat_v Vc::log | ( | const sfloat_v & | v | ) |
Returns the natural logarithm of v
.
sfloat_v Vc::log2 | ( | const sfloat_v & | v | ) |
Returns the base-2 logarithm of v
.
sfloat_v Vc::log10 | ( | const sfloat_v & | v | ) |
Returns the base-10 logarithm of v
.
sfloat_v Vc::sin | ( | const sfloat_v & | v | ) |
Returns the sine of v
.
sfloat_v Vc::cos | ( | const sfloat_v & | v | ) |
Returns the cosine of v
.
void Vc::sincos | ( | const sfloat_v & | v, |
sfloat_v * | sin, | ||
sfloat_v * | cos | ||
) |
Calculates the sine and cosine of v
.
The values are returned in the sin
and cos
parameters.
[in] | v | input value to sin and cos |
[out] | sin | Needs to be a non-null pointer which will be set to the sine of v . |
[out] | cos | Needs to be a non-null pointer which will be set to the cosine of v . |
sfloat_v Vc::asin | ( | const sfloat_v & | v | ) |
Returns the arcsine of v
.
sfloat_v Vc::atan | ( | const sfloat_v & | v | ) |
Returns the arctangent of v
.
sfloat_v Vc::frexp | ( | const sfloat_v & | x, |
short_v * | e | ||
) |
Convert floating-point number to fractional and integral components.
x | value to be split into normalized fraction and exponent |
e | the exponent to base 2 of x |
x
is non-zero, the return value is x
times a power of two, and its absolute value is always in the range [0.5,1).x
is zero, then the normalized fraction is zero and zero is stored in e
.x
is a NaN, a NaN is returned, and the value of *e
is unspecified.x
is positive infinity (negative infinity), positive infinity (nega‐ tive infinity) is returned, and the value of *e
is unspecified. sfloat_v Vc::ldexp | ( | sfloat_v | x, |
short_v | e | ||
) |
Multiply floating-point number by integral power of 2.
x | value to be multiplied by 2 ^ e |
e | exponent |
x
* 2 ^ e