JPL Spatial
Sound spatialization and propagation library
Loading...
Searching...
No Matches
JPL::Vec3Pack Struct Reference

Minimal Vec3 class for SIMD operations on 4 Vec3 at a time. More...

#include <JPLSpatial/Math/Vec3Pack.h>

Public Member Functions

 Vec3Pack ()=default
 
JPL_INLINE Vec3Pack (float x, float y, float z) noexcept
 
JPL_INLINE Vec3Pack (const float *x, const float *y, const float *z) noexcept
 
JPL_INLINE Vec3Pack (simd x, simd y, simd z) noexcept
 
template<CVec3 Vec3Type>
JPL_INLINE Vec3Pack (const Vec3Type &vec) noexcept
 
JPL_INLINE Vec3Pack (const simd &axis) noexcept
 
template<CVec3 Vec3Type>
JPL_INLINE Vec3Pack (const Vec3Type &vec1, const Vec3Type &vec2, const Vec3Type &vec3, const Vec3Type &vec4)
 
template<CVec3 Vec3Type>
JPL_INLINE void load (std::span< const Vec3Type > inVecs)
 
JPL_INLINE void store (float *outX, float *outY, float *outZ) const
 Pointers must point to storate allocated for at least simd::size() num of floats each.
 
template<CVec3 Vec3Type>
JPL_INLINE void store (std::span< Vec3Type > outVecs) const
 
JPL_INLINE simd LengthSquared () const noexcept
 
JPL_INLINE simd Length () const noexcept
 
JPL_INLINE Vec3PackNormalize () noexcept
 
JPL_INLINE bool IsEqual (const Vec3Pack &other) const
 Check if all components of all lanes match.
 
JPL_INLINE Vec3Pack operator- () const
 
JPL_INLINE Vec3Pack operator- (const Vec3Pack &V) const
 
JPL_INLINE Vec3Pack operator+ (const Vec3Pack &V) const
 
template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE Vec3Pack operator* (Arg Scale) const noexcept
 
template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE Vec3Pack operator/ (Arg Scale) const noexcept
 
JPL_INLINE Vec3Pack operator* (simd Scale) const noexcept
 
JPL_INLINE Vec3Pack operator/ (simd Scale) const noexcept
 
JPL_INLINE void operator+= (const Vec3Pack &V) noexcept
 
JPL_INLINE Vec3Packoperator*= (const Vec3Pack Other)
 
template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE Vec3Packoperator/= (Arg Scale) noexcept
 
template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE Vec3Packoperator*= (Arg Scale) noexcept
 
JPL_INLINE Vec3Packoperator/= (simd Scale) noexcept
 
JPL_INLINE Vec3Packoperator*= (simd Scale) noexcept
 

Static Public Member Functions

static JPL_INLINE Vec3Pack select (const simd_mask &conditionMask, const Vec3Pack &ifTrue, const Vec3Pack &ifFalse)
 
static JPL_INLINE Vec3Pack select (const Vec3MaskPack &conditionMasks, const Vec3Pack &ifTrue, const Vec3Pack &ifFalse)
 
static JPL_INLINE Vec3Pack Zero () noexcept
 

Public Attributes

simd X
 
simd Y
 
simd Z
 

Detailed Description

Minimal Vec3 class for SIMD operations on 4 Vec3 at a time.

Constructor & Destructor Documentation

◆ Vec3Pack() [1/7]

JPL::Vec3Pack::Vec3Pack ( )
default

◆ Vec3Pack() [2/7]

JPL_INLINE JPL::Vec3Pack::Vec3Pack ( float  x,
float  y,
float  z 
)
inlinenoexcept

◆ Vec3Pack() [3/7]

JPL_INLINE JPL::Vec3Pack::Vec3Pack ( const float x,
const float y,
const float z 
)
inlinenoexcept

◆ Vec3Pack() [4/7]

JPL_INLINE JPL::Vec3Pack::Vec3Pack ( simd  x,
simd  y,
simd  z 
)
inlinenoexcept

◆ Vec3Pack() [5/7]

template<CVec3 Vec3Type>
JPL_INLINE JPL::Vec3Pack::Vec3Pack ( const Vec3Type &  vec)
inlineexplicitnoexcept

◆ Vec3Pack() [6/7]

JPL_INLINE JPL::Vec3Pack::Vec3Pack ( const simd axis)
inlineexplicitnoexcept

◆ Vec3Pack() [7/7]

template<CVec3 Vec3Type>
JPL_INLINE JPL::Vec3Pack::Vec3Pack ( const Vec3Type &  vec1,
const Vec3Type &  vec2,
const Vec3Type &  vec3,
const Vec3Type &  vec4 
)
inline

Member Function Documentation

◆ IsEqual()

JPL_INLINE bool JPL::Vec3Pack::IsEqual ( const Vec3Pack other) const

Check if all components of all lanes match.

◆ Length()

JPL_INLINE simd JPL::Vec3Pack::Length ( ) const
inlinenoexcept

◆ LengthSquared()

JPL_INLINE simd JPL::Vec3Pack::LengthSquared ( ) const
inlinenoexcept

◆ load()

template<CVec3 Vec3Type>
JPL_INLINE void JPL::Vec3Pack::load ( std::span< const Vec3Type >  inVecs)
inline

◆ Normalize()

JPL_INLINE Vec3Pack & JPL::Vec3Pack::Normalize ( )
inlinenoexcept

◆ operator*() [1/2]

template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE Vec3Pack JPL::Vec3Pack::operator* ( Arg  Scale) const
inlinenoexcept

◆ operator*() [2/2]

JPL_INLINE Vec3Pack JPL::Vec3Pack::operator* ( simd  Scale) const
inlinenoexcept

◆ operator*=() [1/3]

template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE Vec3Pack & JPL::Vec3Pack::operator*= ( Arg  Scale)
inlinenoexcept

◆ operator*=() [2/3]

JPL_INLINE Vec3Pack & JPL::Vec3Pack::operator*= ( const Vec3Pack  Other)
inline

◆ operator*=() [3/3]

JPL_INLINE Vec3Pack & JPL::Vec3Pack::operator*= ( simd  Scale)
inlinenoexcept

◆ operator+()

JPL_INLINE Vec3Pack JPL::Vec3Pack::operator+ ( const Vec3Pack V) const
inline

◆ operator+=()

JPL_INLINE void JPL::Vec3Pack::operator+= ( const Vec3Pack V)
inlinenoexcept

◆ operator-() [1/2]

JPL_INLINE Vec3Pack JPL::Vec3Pack::operator- ( ) const
inline

◆ operator-() [2/2]

JPL_INLINE Vec3Pack JPL::Vec3Pack::operator- ( const Vec3Pack V) const
inline

◆ operator/() [1/2]

template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE Vec3Pack JPL::Vec3Pack::operator/ ( Arg  Scale) const
inlinenoexcept

◆ operator/() [2/2]

JPL_INLINE Vec3Pack JPL::Vec3Pack::operator/ ( simd  Scale) const
inlinenoexcept

◆ operator/=() [1/2]

template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE Vec3Pack & JPL::Vec3Pack::operator/= ( Arg  Scale)
inlinenoexcept

◆ operator/=() [2/2]

JPL_INLINE Vec3Pack & JPL::Vec3Pack::operator/= ( simd  Scale)
inlinenoexcept

◆ select() [1/2]

static JPL_INLINE Vec3Pack JPL::Vec3Pack::select ( const simd_mask conditionMask,
const Vec3Pack ifTrue,
const Vec3Pack ifFalse 
)
inlinestatic

Component-wise select, returns 'ifTrue' if mask is true, 'ifFalse' otherwise Uses the same mask for all components.

◆ select() [2/2]

static JPL_INLINE Vec3Pack JPL::Vec3Pack::select ( const Vec3MaskPack conditionMasks,
const Vec3Pack ifTrue,
const Vec3Pack ifFalse 
)
inlinestatic

Component-wise select, returns 'ifTrue' if mask is true, 'ifFalse' otherwise Uses individual masks per component.

◆ store() [1/2]

JPL_INLINE void JPL::Vec3Pack::store ( float outX,
float outY,
float outZ 
) const
inline

Pointers must point to storate allocated for at least simd::size() num of floats each.

◆ store() [2/2]

template<CVec3 Vec3Type>
JPL_INLINE void JPL::Vec3Pack::store ( std::span< Vec3Type >  outVecs) const
inline

◆ Zero()

static JPL_INLINE Vec3Pack JPL::Vec3Pack::Zero ( )
inlinestaticnoexcept

Member Data Documentation

◆ X

simd JPL::Vec3Pack::X

◆ Y

simd JPL::Vec3Pack::Y

◆ Z

simd JPL::Vec3Pack::Z

The documentation for this struct was generated from the following file: