|
JPL Spatial
Sound spatialization and propagation library
|
#include <JPLSpatial/Math/SIMD.h>
Public Types | |
| using | Type = std::array< uint32, 4 > |
Public Member Functions | |
| simd_mask () noexcept=default | |
| simd_mask (const simd_mask &) noexcept=default | |
| simd_mask & | operator= (const simd_mask &) noexcept=default |
| JPL_INLINE | simd_mask (Type value) noexcept |
| JPL_INLINE | simd_mask (uint32 value) noexcept |
| JPL_INLINE | simd_mask (uint32 v0, uint32 v1, uint32 v2, uint32 v3) noexcept |
| JPL_INLINE | simd_mask (const uint32 *mem) |
| JPL_INLINE void | load (const uint32 *mem) |
| Load values from memory into simd, 'mem' should point to memory with at least size() number of uint32. | |
| JPL_INLINE void | store (uint32 *mem) const |
| Store values from simd to provided memory location. | |
| template<uint32 LaneIndex> requires (LaneIndex < 4) | |
| JPL_INLINE uint32 | get_lane () const noexcept |
| Get float component by index known at compile-time. | |
| JPL_INLINE bool | all_of () const noexcept |
| Test if all of the components are true. | |
| JPL_INLINE bool | any_of () const noexcept |
| Test if any of the components are true. | |
| JPL_INLINE bool | none_of () const noexcept |
| Test if none of the components are true. | |
| JPL_INLINE int | reduce_count () const noexcept |
| Count the number of components that are true. | |
| JPL_INLINE int | reduce_min_index () const noexcept |
| Get index of the first component that is true. | |
| JPL_INLINE int | reduce_max_index () const noexcept |
| Get index of the last component that is true. | |
| JPL_INLINE int | GetTrues () const noexcept |
| Store if [0] is true in bit 0, [1] in bit 1, [2] in bit 2 and [3] in bit 3. | |
| JPL_INLINE simd_mask | operator* (const simd_mask &other) const noexcept |
| Component-wise multiplies each of the 4 integer components with an integer (discards any overflow) | |
| JPL_INLINE simd_mask & | operator*= (const simd_mask &other) noexcept |
| Component-wise multiplies each of the 4 integer components with an integer (discards any overflow) | |
| JPL_INLINE simd_mask | operator+ (const simd_mask &other) const noexcept |
| Component-wise add an integer value to all integer components (discards any overflow) | |
| JPL_INLINE simd_mask & | operator+= (const simd_mask &other) noexcept |
| Component-wise add two integer vectors (component wise) | |
| JPL_INLINE simd_mask | operator- (const simd_mask &other) const noexcept |
| Component-wise subtract two simd_mask vectors. | |
| JPL_INLINE simd_mask & | operator-= (const simd_mask &other) noexcept |
| Component-wise subtract two simd_mask vectors. | |
| JPL_INLINE simd_mask | operator~ () const noexcept |
| Component-wise logical NOT. | |
| JPL_INLINE void | operator|= (const simd_mask &other) noexcept |
| Component-wise logical OR. | |
| JPL_INLINE void | operator^= (const simd_mask &other) noexcept |
| Component-wise logical XOR. | |
| JPL_INLINE void | operator&= (const simd_mask &other) noexcept |
| Component-wise logical AND. | |
| JPL_INLINE simd_mask | operator>> (const uint32 count) const noexcept |
| JPL_INLINE simd_mask | operator<< (const uint32 count) const noexcept |
| template<uint Count> requires (Count <= 31) | |
| JPL_INLINE simd_mask | shr () const noexcept |
| template<uint Count> requires (Count <= 31) | |
| JPL_INLINE simd_mask | shl () const noexcept |
| template<uint Count> requires (Count <= 31) | |
| JPL_INLINE simd_mask | ashr () const noexcept |
| JPL_INLINE simd_mask | adds (const simd_mask &other) const noexcept |
| JPL_INLINE simd_mask | subs (const simd_mask &other) const noexcept |
| JPL_INLINE | operator Type () const noexcept |
| JPL_INLINE simd | to_simd () const noexcept |
| Convert each component from an int to a float. | |
| JPL_INLINE simd | as_simd () const noexcept |
| Reinterpret simd_mask as a simd (doesn't change the bits) | |
Static Public Member Functions | |
| static JPL_INLINE simd_mask | replicate (int value) noexcept |
| static JPL_INLINE simd_mask | replicate (uint32 value) noexcept |
| static JPL_INLINE simd_mask | zero () noexcept |
| static constexpr std::size_t | size () noexcept |
| Get number of element of the vector. | |
Public Attributes | |
| Type | mNative |
Static Public Attributes | |
| static constexpr uint32 | cTrueValue = 0xffffffffu |
| Component set to this value is true. | |
Friends | |
| std::ostream & | operator<< (std::ostream &inStream, const simd_mask &vec) |
| using JPL::simd_mask::Type = std::array<uint32,4> |
|
defaultnoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
| JPL_INLINE JPL::simd_mask::simd_mask | ( | const uint32 * | mem | ) |
|
noexcept |
|
noexcept |
Test if all of the components are true.
|
noexcept |
Test if any of the components are true.
|
noexcept |
Reinterpret simd_mask as a simd (doesn't change the bits)
|
noexcept |
|
noexcept |
Get float component by index known at compile-time.
|
noexcept |
Store if [0] is true in bit 0, [1] in bit 1, [2] in bit 2 and [3] in bit 3.
| JPL_INLINE void JPL::simd_mask::load | ( | const uint32 * | mem | ) |
Load values from memory into simd, 'mem' should point to memory with at least size() number of uint32.
|
noexcept |
Test if none of the components are true.
|
inlinenoexcept |
|
noexcept |
Component-wise logical AND.
|
noexcept |
Component-wise multiplies each of the 4 integer components with an integer (discards any overflow)
|
noexcept |
Component-wise multiplies each of the 4 integer components with an integer (discards any overflow)
|
noexcept |
Component-wise add an integer value to all integer components (discards any overflow)
|
noexcept |
Component-wise add two integer vectors (component wise)
|
noexcept |
Component-wise subtract two simd_mask vectors.
|
noexcept |
Component-wise subtract two simd_mask vectors.
|
noexcept |
|
noexcept |
|
noexcept |
Component-wise logical XOR.
|
noexcept |
Component-wise logical OR.
|
noexcept |
Component-wise logical NOT.
|
noexcept |
Count the number of components that are true.
|
noexcept |
Get index of the last component that is true.
|
noexcept |
Get index of the first component that is true.
|
staticnoexcept |
|
staticnoexcept |
|
noexcept |
|
noexcept |
Get number of element of the vector.
| JPL_INLINE void JPL::simd_mask::store | ( | uint32 * | mem | ) | const |
Store values from simd to provided memory location.
|
noexcept |
|
noexcept |
Convert each component from an int to a float.
|
staticnoexcept |
Component set to this value is true.
| Type JPL::simd_mask::mNative |