|
JPL Spatial
Sound spatialization and propagation library
|
#include "JPLSpatial/Core.h"#include "JPLSpatial/ErrorReporting.h"#include "JPLSpatial/Math/Math.h"#include <bit>#include <limits>#include <algorithm>#include <cmath>#include <type_traits>#include <ostream>#include <span>Go to the source code of this file.
Classes | |
| struct | JPL::simd |
| Minimal 4-wide 32-bit float vector implementation for SIMD. More... | |
| struct | JPL::simd_mask |
| struct | std::equal_to< JPL::simd > |
Namespaces | |
| namespace | JPL |
| namespace | JPL::Math |
Functions | |
| JPL_INLINE simd | JPL::operator| (const simd &a, const simd &b) noexcept |
| Component-wise logical OR. | |
| JPL_INLINE simd | JPL::operator^ (const simd &a, const simd &b) noexcept |
| Component-wise logical XOR. | |
| JPL_INLINE simd | JPL::operator& (const simd &a, const simd &b) noexcept |
| Component-wise logical AND. | |
| JPL_INLINE simd_mask | JPL::operator== (const simd &a, const simd &b) noexcept |
| Component-wise comparison. | |
| JPL_INLINE simd_mask | JPL::operator!= (const simd &a, const simd &b) noexcept |
| JPL_INLINE simd_mask | JPL::operator< (const simd &a, const simd &b) noexcept |
| JPL_INLINE simd_mask | JPL::operator<= (const simd &a, const simd &b) noexcept |
| JPL_INLINE simd_mask | JPL::operator> (const simd &a, const simd &b) noexcept |
| JPL_INLINE simd_mask | JPL::operator>= (const simd &a, const simd &b) noexcept |
| JPL_INLINE simd_mask | JPL::operator== (const simd_mask &a, const simd_mask &b) noexcept |
| Component-wise comparison. | |
| JPL_INLINE simd_mask | JPL::operator!= (const simd_mask &a, const simd_mask &b) noexcept |
| JPL_INLINE simd_mask | JPL::operator| (const simd_mask &a, const simd_mask &b) noexcept |
| Component-wise logical OR. | |
| JPL_INLINE simd_mask | JPL::operator^ (const simd_mask &a, const simd_mask &b) noexcept |
| Component-wise logical XOR. | |
| JPL_INLINE simd_mask | JPL::operator& (const simd_mask &a, const simd_mask &b) noexcept |
| Component-wise logical AND. | |
| JPL_INLINE simd | JPL::Math::Sqrt (const simd &vec) noexcept |
| Component-wise square root. | |
| JPL_INLINE simd | JPL::Math::InvSqrt (const simd &vec) noexcept |
| Component-wise inverse square root (1 / sqrt(x)) | |
| JPL_INLINE simd | JPL::Math::Sign2 (const simd &vec) noexcept |
| Sign2 returns -1 for negative values, 1 otherwise. | |
| JPL_INLINE simd_mask | JPL::Math::IsNearlyZero (const simd &vec, float tolerance=JPL_FLOAT_EPS) noexcept |
| JPL_INLINE simd | JPL::max (const simd &a, const simd &b) noexcept |
| Element-wise max. | |
| JPL_INLINE simd | JPL::min (const simd &a, const simd &b) noexcept |
| Element-wise min. | |
| JPL_INLINE simd | JPL::abs (const simd &vec) noexcept |
| JPL_INLINE simd | JPL::clamp (const simd &value, const simd &minV, const simd &maxV) noexcept |
| Element-wise clamp. | |
| JPL_INLINE simd | JPL::fma (const simd &mul1, const simd &mul2, const simd &addV) noexcept |
| Element-wise fused multiply-add. | |
| JPL_INLINE simd | JPL::Math::FMA (const simd &mul1, const simd &mul2, const simd &addV) noexcept |
| An overload to match our scalar version in Math.h. | |
| JPL_INLINE simd | JPL::Math::Lerp (const simd &a, const simd &b, const simd &t) noexcept |
| JPL_INLINE simd | JPL::floor (const simd &vec) noexcept |
| Element-wise floor. | |
| JPL_INLINE simd | JPL::ceil (const simd &vec) noexcept |
| Element-wise ceil. | |
| JPL_INLINE simd | JPL::round (const simd &vec) noexcept |
| Element-wise round to nearest integer value. | |
| JPL_INLINE simd | JPL::interleave_lohi (const simd &vec) noexcept |
| Interleave two low lanes with the two high lanes (e.g. { 0, 1, 2, 3 } -> { 0, 2, 1, 3 }) | |
| JPL_INLINE simd | JPL::combine_lo (const simd &a, const simd &b) noexcept |
Combine two low lanes of input a and b as { a0, a1, b0, b1 }. | |
| JPL_INLINE simd | JPL::combine_hi (const simd &a, const simd &b) noexcept |
Combine two high lanes of input a and b as { a2, a3, b2, b3 }. | |
| JPL_INLINE simd | JPL::combine_lohi (const simd &a, const simd &b) noexcept |
Combine two low lanes of a and two high lanes from b as { a0, a1, b2, b3 }. | |
| JPL_INLINE simd | JPL::reverse (const simd &vec) noexcept |
| Reverse the order of the lanes. | |
| JPL_INLINE simd_mask | JPL::max (const simd_mask &a, const simd_mask &b) noexcept |
| Element-wise max. | |
| JPL_INLINE simd_mask | JPL::min (const simd_mask &a, const simd_mask &b) noexcept |
| Element-wise min. | |
| JPL_INLINE simd_mask | JPL::clamp (const simd_mask &value, const simd_mask &minV, const simd_mask &maxV) noexcept |
| Element-wise clamp. | |
| JPL_INLINE simd_mask | JPL::maxs (const simd_mask &a, const simd_mask &b) noexcept |
| Element-wise max, signed. | |
| JPL_INLINE simd_mask | JPL::mins (const simd_mask &a, const simd_mask &b) noexcept |
| Element-wise min, signed. | |
| JPL_INLINE simd_mask | JPL::clamps (const simd_mask &value, const simd_mask &minV, const simd_mask &maxV) noexcept |
| Element-wise clamp, signed. | |
| JPL_INLINE simd | JPL::operator* (float value, const simd &vec) |
| template<int NR> requires (NR > 0 && NR <= 2) | |
| JPL_INLINE simd | JPL::Math::InvSqrtImpl (const simd &vec) noexcept |
| JPL_INLINE simd | JPL::Math::InvSqrtFast (const simd &vec) noexcept |