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.
 
 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.
 
JPH_INLINE float operator[] (uint inCoordinate) const
 Get float component by index.
 
JPH_INLINE floatoperator[] (uint inCoordinate)
 
JPH_INLINE Vec8 operator* (Vec8Arg inV2) const
 Multiply two float vectors.
 
JPH_INLINE Vec8 operator* (float inV2) const
 Multiply vector by float.
 
JPH_INLINE Vec8 operator+ (Vec8Arg inV2) const
 Add two float vectors.
 
JPH_INLINE Vec8 operator- (Vec8Arg inV2) const
 Subtract two float vectors.
 
JPH_INLINE Vec8 operator/ (Vec8Arg inV2) const
 Divide.
 
JPH_INLINE Vec8 Reciprocal () const
 Reciprocal vector.
 
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)
 
JPH_INLINE Vec8 Abs () const
 Get absolute value of all components.
 
JPH_INLINE Vec4 LowerVec4 () const
 Fetch the lower 128 bit from a 256 bit variable.
 
JPH_INLINE Vec4 UpperVec4 () const
 Fetch the higher 128 bit from a 256 bit variable.
 
JPH_INLINE float ReduceMin () const
 Get the minimum value of the 8 floats.
 
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.
 
static JPH_INLINE Vec8 sReplicate (float inV)
 Replicate across all components.
 
static JPH_INLINE Vec8 sSplatX (Vec4Arg inV)
 Replicate the X component of inV to all components.
 
static JPH_INLINE Vec8 sSplatY (Vec4Arg inV)
 Replicate the Y component of inV to all components.
 
static JPH_INLINE Vec8 sSplatZ (Vec4Arg inV)
 Replicate the Z component of inV to all components.
 
static JPH_INLINE Vec8 sFusedMultiplyAdd (Vec8Arg inMul1, Vec8Arg inMul2, Vec8Arg inAdd)
 Calculates inMul1 * inMul2 + inAdd.
 
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.
 
static JPH_INLINE Vec8 sMin (Vec8Arg inV1, Vec8Arg inV2)
 Component wise min.
 
static JPH_INLINE Vec8 sMax (Vec8Arg inV1, Vec8Arg inV2)
 Component wise max.
 
static JPH_INLINE UVec8 sLess (Vec8Arg inV1, Vec8Arg inV2)
 Less than.
 
static JPH_INLINE UVec8 sGreater (Vec8Arg inV1, Vec8Arg inV2)
 Greater than.
 
static JPH_INLINE Vec8 sLoadFloat8 (const float *inV)
 Load from memory.
 
static JPH_INLINE Vec8 sLoadFloat8Aligned (const float *inV)
 Load 8 floats from memory, 32 bytes aligned.
 

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]

union { ... } Vec8

◆ mF32

float Vec8::mF32[8]

◆ mValue

__m256 Vec8::mValue

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