SIMD register wrappers and the scalar operations that mirror them.
More...
|
| template<class T > |
| T | select (const bool a_mask, const T a_ifTrue, const T a_ifFalse) noexcept |
| | Pick a_ifTrue where a_mask holds, else a_ifFalse (scalar form).
|
| |
| bool | both (const bool a_lhs, const bool a_rhs) noexcept |
| | Whether both conditions hold (scalar form).
|
| |
| float | sqrt (const float a_x) noexcept |
| | Square root (scalar form).
|
| |
| double | sqrt (const double a_x) noexcept |
| | Square root (scalar form).
|
| |
| float | abs (const float a_x) noexcept |
| | Absolute value (scalar form).
|
| |
| double | abs (const double a_x) noexcept |
| | Absolute value (scalar form).
|
| |
| template<class T > |
| constexpr size_t | WidestPack () noexcept |
| | The widest SIMD register, in lanes of T, that this compilation pass has: 16 floats or 8 doubles under AVX-512F, 8 or 4 under AVX, 4 or 2 under SSE4.1, and 1 otherwise and in every device pass.
|
| |
| template<class T , size_t W> |
| constexpr size_t | NativeWidth () noexcept |
| | The lane count to evaluate a group of W values of T with: the widest register this compilation pass has whose lane count divides W, or 1 (the scalar path) if none does.
|
| |
SIMD register wrappers and the scalar operations that mirror them.
◆ abs() [1/2]
| double EBGeometry::SIMD::abs |
( |
const double |
a_x | ) |
|
|
inlinenoexcept |
Absolute value (scalar form).
- Parameters
-
- Returns
- The absolute value.
◆ abs() [2/2]
| float EBGeometry::SIMD::abs |
( |
const float |
a_x | ) |
|
|
inlinenoexcept |
Absolute value (scalar form).
- Parameters
-
- Returns
- The absolute value.
◆ both()
| bool EBGeometry::SIMD::both |
( |
const bool |
a_lhs, |
|
|
const bool |
a_rhs |
|
) |
| |
|
inlinenoexcept |
Whether both conditions hold (scalar form).
- Parameters
-
| [in] | a_lhs | One condition. |
| [in] | a_rhs | The other. |
- Returns
- a_lhs && a_rhs.
◆ NativeWidth()
template<class T , size_t W>
| constexpr size_t EBGeometry::SIMD::NativeWidth |
( |
| ) |
|
|
constexprnoexcept |
The lane count to evaluate a group of W values of T with: the widest register this compilation pass has whose lane count divides W, or 1 (the scalar path) if none does.
- Template Parameters
-
| T | Floating-point type. |
| W | Group width. |
- Returns
- A lane count N for which Pack<T, N> exists, or 1.
◆ select()
template<class T >
| T EBGeometry::SIMD::select |
( |
const bool |
a_mask, |
|
|
const T |
a_ifTrue, |
|
|
const T |
a_ifFalse |
|
) |
| |
|
inlinenoexcept |
Pick a_ifTrue where a_mask holds, else a_ifFalse (scalar form).
- Template Parameters
-
- Parameters
-
| [in] | a_mask | Condition. |
| [in] | a_ifTrue | Value where the condition holds. |
| [in] | a_ifFalse | Value where it does not. |
- Returns
- The chosen value.
◆ sqrt() [1/2]
| double EBGeometry::SIMD::sqrt |
( |
const double |
a_x | ) |
|
|
inlinenoexcept |
Square root (scalar form).
- Parameters
-
- Returns
- The square root.
◆ sqrt() [2/2]
| float EBGeometry::SIMD::sqrt |
( |
const float |
a_x | ) |
|
|
inlinenoexcept |
Square root (scalar form).
- Parameters
-
- Returns
- The square root.
◆ WidestPack()
template<class T >
| constexpr size_t EBGeometry::SIMD::WidestPack |
( |
| ) |
|
|
constexprnoexcept |
The widest SIMD register, in lanes of T, that this compilation pass has: 16 floats or 8 doubles under AVX-512F, 8 or 4 under AVX, 4 or 2 under SSE4.1, and 1 otherwise and in every device pass.
- Template Parameters
-
- Returns
- The lane count.