Mathematical functions on Vec's, such as sqrt, rcp, etc.
- See also
- Masked Mathematical Functions
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::rcp (const Vec< T, SIMD_WIDTH > &a) |
| Computes the approximate reciprocal of the elements of a Vec.
|
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::rsqrt (const Vec< T, SIMD_WIDTH > &a) |
| Computes the approximate reciprocal square root of the elements of a Vec.
|
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::sqrt (const Vec< T, SIMD_WIDTH > &a) |
| Computes the square root of the elements of a Vec.
|
|
◆ rcp()
template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::rcp |
( |
const Vec< T, SIMD_WIDTH > & | a | ) |
|
|
inlinestatic |
Computes the approximate reciprocal of the elements of a Vec.
This function is only available for floating point types.
- Parameters
-
a | Vec to compute the reciprocal of |
- Returns
- Vec containing the approximate reciprocal of the elements of the input Vec
◆ rsqrt()
template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::rsqrt |
( |
const Vec< T, SIMD_WIDTH > & | a | ) |
|
|
inlinestatic |
Computes the approximate reciprocal square root of the elements of a Vec.
This function is only available for floating point types.
- Parameters
-
a | Vec to compute the reciprocal square root of |
- Returns
- Vec containing the approximate reciprocal square root of the elements of the input Vec
◆ sqrt()
template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::sqrt |
( |
const Vec< T, SIMD_WIDTH > & | a | ) |
|
|
inlinestatic |
Computes the square root of the elements of a Vec.
This function is only available for floating point types.
- Note
- This function may only compute an approximation on some architectures.
- Parameters
-
a | Vec to compute the square root of |
- Returns
- Vec containing the square root of the elements of the input Vec