Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
Vec8 Class Reference

#include <Vec8.h>

Public Member Functions

JPH_OVERRIDE_NEW_DELETE Vec8 ()=default
 Constructor. More...
 
 Vec8 (const Vec8 &inRHS)=default
 
JPH_INLINE Vec8 (__m256 inRHS)
 
JPH_INLINE Vec8 (Vec4Arg inLo, Vec4Arg inHi)
 Set 256 bit vector from 2 128 bit vectors. More...
 
JPH_INLINE float operator[] (uint inCoordinate) const
 Get float component by index. More...
 
JPH_INLINE float & operator[] (uint inCoordinate)
 
JPH_INLINE Vec8 operator* (Vec8Arg inV2) const
 Multiply two float vectors. More...
 
JPH_INLINE Vec8 operator* (float inV2) const
 Multiply vector by float. More...
 
JPH_INLINE Vec8 operator+ (Vec8Arg inV2) const
 Add two float vectors. More...
 
JPH_INLINE Vec8 operator- (Vec8Arg inV2) const
 Subtract two float vectors. More...
 
JPH_INLINE Vec8 operator/ (Vec8Arg inV2) const
 Divide. More...
 
JPH_INLINE Vec8 Reciprocal () const
 Reciprocal vector. More...
 
template<uint32 SwizzleX, uint32 SwizzleY, uint32 SwizzleZ, uint32 SwizzleW>
JPH_INLINE Vec8 Swizzle () const
 256 bit variant of Vec::Swizzle (no cross 128 bit lane swizzle) More...
 
JPH_INLINE Vec8 Abs () const
 Get absolute value of all components. More...
 
JPH_INLINE Vec4 LowerVec4 () const
 Fetch the lower 128 bit from a 256 bit variable. More...
 
JPH_INLINE Vec4 UpperVec4 () const
 Fetch the higher 128 bit from a 256 bit variable. More...
 
JPH_INLINE float ReduceMin () const
 Get the minimum value of the 8 floats. More...
 
template<uint32 SwizzleX, uint32 SwizzleY, uint32 SwizzleZ, uint32 SwizzleW>
Vec8 Swizzle () const
 

Static Public Member Functions

static JPH_INLINE Vec8 sZero ()
 Vector with all zeros. More...
 
static JPH_INLINE Vec8 sReplicate (float inV)
 Replicate across all components. More...
 
static JPH_INLINE Vec8 sSplatX (Vec4Arg inV)
 Replicate the X component of inV to all components. More...
 
static JPH_INLINE Vec8 sSplatY (Vec4Arg inV)
 Replicate the Y component of inV to all components. More...
 
static JPH_INLINE Vec8 sSplatZ (Vec4Arg inV)
 Replicate the Z component of inV to all components. More...
 
static JPH_INLINE Vec8 sFusedMultiplyAdd (Vec8Arg inMul1, Vec8Arg inMul2, Vec8Arg inAdd)
 Calculates inMul1 * inMul2 + inAdd. More...
 
static JPH_INLINE Vec8 sSelect (Vec8Arg inV1, Vec8Arg inV2, UVec8Arg inControl)
 Component wise select, returns inV1 when highest bit of inControl = 0 and inV2 when highest bit of inControl = 1. More...
 
static JPH_INLINE Vec8 sMin (Vec8Arg inV1, Vec8Arg inV2)
 Component wise min. More...
 
static JPH_INLINE Vec8 sMax (Vec8Arg inV1, Vec8Arg inV2)
 Component wise max. More...
 
static JPH_INLINE UVec8 sLess (Vec8Arg inV1, Vec8Arg inV2)
 Less than. More...
 
static JPH_INLINE UVec8 sGreater (Vec8Arg inV1, Vec8Arg inV2)
 Greater than. More...
 
static JPH_INLINE Vec8 sLoadFloat8 (const float *inV)
 Load from memory. More...
 
static JPH_INLINE Vec8 sLoadFloat8Aligned (const float *inV)
 Load 8 floats from memory, 32 bytes aligned. More...
 

Public Attributes

union {
   __m256   mValue
 
   float   mF32 [8]
 
}; 
 

Constructor & Destructor Documentation

◆ Vec8() [1/4]

JPH_OVERRIDE_NEW_DELETE Vec8::Vec8 ( )
default

Constructor.

Intentionally not initialized for performance reasons

◆ Vec8() [2/4]

Vec8::Vec8 ( const Vec8 inRHS)
default

◆ Vec8() [3/4]

JPH_INLINE Vec8::Vec8 ( __m256  inRHS)
inline

◆ Vec8() [4/4]

JPH_NAMESPACE_BEGIN Vec8::Vec8 ( Vec4Arg  inLo,
Vec4Arg  inHi 
)

Set 256 bit vector from 2 128 bit vectors.

Member Function Documentation

◆ Abs()

Vec8 Vec8::Abs ( ) const

Get absolute value of all components.

◆ LowerVec4()

Vec4 Vec8::LowerVec4 ( ) const

Fetch the lower 128 bit from a 256 bit variable.

◆ operator*() [1/2]

Vec8 Vec8::operator* ( float  inV2) const

Multiply vector by float.

◆ operator*() [2/2]

Vec8 Vec8::operator* ( Vec8Arg  inV2) const

Multiply two float vectors.

◆ operator+()

Vec8 Vec8::operator+ ( Vec8Arg  inV2) const

Add two float vectors.

◆ operator-()

Vec8 Vec8::operator- ( Vec8Arg  inV2) const

Subtract two float vectors.

◆ operator/()

Vec8 Vec8::operator/ ( Vec8Arg  inV2) const

Divide.

◆ operator[]() [1/2]

JPH_INLINE float & Vec8::operator[] ( uint  inCoordinate)
inline

◆ operator[]() [2/2]

JPH_INLINE float Vec8::operator[] ( uint  inCoordinate) const
inline

Get float component by index.

◆ Reciprocal()

Vec8 Vec8::Reciprocal ( ) const

Reciprocal vector.

◆ ReduceMin()

float Vec8::ReduceMin ( ) const

Get the minimum value of the 8 floats.

◆ sFusedMultiplyAdd()

Vec8 Vec8::sFusedMultiplyAdd ( Vec8Arg  inMul1,
Vec8Arg  inMul2,
Vec8Arg  inAdd 
)
static

Calculates inMul1 * inMul2 + inAdd.

◆ sGreater()

UVec8 Vec8::sGreater ( Vec8Arg  inV1,
Vec8Arg  inV2 
)
static

Greater than.

◆ sLess()

UVec8 Vec8::sLess ( Vec8Arg  inV1,
Vec8Arg  inV2 
)
static

Less than.

◆ sLoadFloat8()

Vec8 Vec8::sLoadFloat8 ( const float *  inV)
static

Load from memory.

◆ sLoadFloat8Aligned()

Vec8 Vec8::sLoadFloat8Aligned ( const float *  inV)
static

Load 8 floats from memory, 32 bytes aligned.

◆ sMax()

Vec8 Vec8::sMax ( Vec8Arg  inV1,
Vec8Arg  inV2 
)
static

Component wise max.

◆ sMin()

Vec8 Vec8::sMin ( Vec8Arg  inV1,
Vec8Arg  inV2 
)
static

Component wise min.

◆ sReplicate()

Vec8 Vec8::sReplicate ( float  inV)
static

Replicate across all components.

◆ sSelect()

Vec8 Vec8::sSelect ( Vec8Arg  inV1,
Vec8Arg  inV2,
UVec8Arg  inControl 
)
static

Component wise select, returns inV1 when highest bit of inControl = 0 and inV2 when highest bit of inControl = 1.

◆ sSplatX()

Vec8 Vec8::sSplatX ( Vec4Arg  inV)
static

Replicate the X component of inV to all components.

◆ sSplatY()

Vec8 Vec8::sSplatY ( Vec4Arg  inV)
static

Replicate the Y component of inV to all components.

◆ sSplatZ()

Vec8 Vec8::sSplatZ ( Vec4Arg  inV)
static

Replicate the Z component of inV to all components.

◆ Swizzle() [1/2]

template<uint32 SwizzleX, uint32 SwizzleY, uint32 SwizzleZ, uint32 SwizzleW>
JPH_INLINE Vec8 Vec8::Swizzle ( ) const

256 bit variant of Vec::Swizzle (no cross 128 bit lane swizzle)

◆ Swizzle() [2/2]

template<uint32 SwizzleX, uint32 SwizzleY, uint32 SwizzleZ, uint32 SwizzleW>
Vec8 Vec8::Swizzle ( ) const

◆ sZero()

Vec8 Vec8::sZero ( )
static

Vector with all zeros.

◆ UpperVec4()

Vec4 Vec8::UpperVec4 ( ) const

Fetch the higher 128 bit from a 256 bit variable.

Member Data Documentation

◆ 

union { ... } Vec8::@11

◆ mF32

float Vec8::mF32[8]

◆ mValue

__m256 Vec8::mValue

The documentation for this class was generated from the following files: