Loading...
Searching...
No Matches
dsp::SIMDRegister< Type >::ElementAccess Struct Reference

Public Types

using ElementType
 The type that represents the individual constituents of the SIMD Register.
 
using value_type
 STL compatible value_type definition (same as ElementType).
 
using MaskType
 The corresponding primitive integer type, for example, this will be int32_t if type is a float.
 
using PrimitiveType
 The native primitive type (used internally).
 
using NativeOps
 The native operations for this platform and type combination (used internally)
 
using vSIMDType
 The native type (used internally).
 
using vMaskType
 The corresponding integer SIMDRegister type (used internally).
 
using vMaskSIMDType
 The internal native type for the corresponding mask type (used internally).
 
using CmplxOps
 Wrapper for operations which need to be handled differently for complex and scalar types (used internally).
 

Public Member Functions

 ElementAccess (const ElementAccess &)=default
 
 operator Type () const
 
ElementAccessoperator= (Type scalar) noexcept
 
ElementAccessoperator= (const ElementAccess &o) noexcept
 
 SIMDRegister () noexcept=default
 Default constructor.
 
 SIMDRegister (vSIMDType a) noexcept
 Constructs an object from the native SIMD type.
 
 SIMDRegister (Type s) noexcept
 Constructs an object from a scalar type by broadcasting it to all elements.
 
void JUCE_VECTOR_CALLTYPE copyToRawArray (ElementType *a) const noexcept
 Copies the elements of the SIMDRegister to a scalar array in memory.
 
ElementType JUCE_VECTOR_CALLTYPE get (size_t idx) const noexcept
 Returns the idx-th element of the receiver.
 
void JUCE_VECTOR_CALLTYPE set (size_t idx, ElementType v) noexcept
 Sets the idx-th element of the receiver.
 
ElementType JUCE_VECTOR_CALLTYPE operator[] (size_t idx) const noexcept
 Returns the idx-th element of the receiver.
 
ElementAccess JUCE_VECTOR_CALLTYPE operator[] (size_t idx) noexcept
 Returns the idx-th element of the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator+= (SIMDRegister v) noexcept
 Adds another SIMDRegister to the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator+= (ElementType s) noexcept
 Adds a scalar to the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator-= (SIMDRegister v) noexcept
 Subtracts another SIMDRegister to the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator-= (ElementType s) noexcept
 Subtracts a scalar to the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator*= (SIMDRegister v) noexcept
 Multiplies another SIMDRegister to the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator*= (ElementType s) noexcept
 Multiplies a scalar to the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator= (ElementType s) noexcept
 Broadcasts the scalar to all elements of the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator&= (vMaskType v) noexcept
 Bit-and the receiver with SIMDRegister v and store the result in the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator&= (MaskType s) noexcept
 Bit-and each element of the receiver with the scalar s and store the result in the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator|= (vMaskType v) noexcept
 Bit-or the receiver with SIMDRegister v and store the result in the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator|= (MaskType s) noexcept
 Bit-or each element of the receiver with the scalar s and store the result in the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator^= (vMaskType v) noexcept
 Bit-xor the receiver with SIMDRegister v and store the result in the receiver.
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator^= (MaskType s) noexcept
 Bit-xor each element of the receiver with the scalar s and store the result in the receiver.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator+ (SIMDRegister v) const noexcept
 Returns the sum of the receiver and v.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator+ (ElementType s) const noexcept
 Returns a vector where each element is the sum of the corresponding element in the receiver and the scalar s.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator- (SIMDRegister v) const noexcept
 Returns the difference of the receiver and v.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator- (ElementType s) const noexcept
 Returns a vector where each element is the difference of the corresponding element in the receiver and the scalar s.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator* (SIMDRegister v) const noexcept
 Returns the product of the receiver and v.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator* (ElementType s) const noexcept
 Returns a vector where each element is the product of the corresponding element in the receiver and the scalar s.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator& (vMaskType v) const noexcept
 Returns the bit-and of the receiver and v.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator& (MaskType s) const noexcept
 Returns a vector where each element is the bit-and'd value of the corresponding element in the receiver and the scalar s.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator| (vMaskType v) const noexcept
 Returns the bit-or of the receiver and v.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator| (MaskType s) const noexcept
 Returns a vector where each element is the bit-or'd value of the corresponding element in the receiver and the scalar s.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator^ (vMaskType v) const noexcept
 Returns the bit-xor of the receiver and v.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator^ (MaskType s) const noexcept
 Returns a vector where each element is the bit-xor'd value of the corresponding element in the receiver and the scalar s.
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator~ () const noexcept
 Returns a vector where each element is the bit-inverted value of the corresponding element in the receiver.
 
bool JUCE_VECTOR_CALLTYPE operator== (SIMDRegister other) const noexcept
 Returns true if all element-wise comparisons return true.
 
bool JUCE_VECTOR_CALLTYPE operator== (Type s) const noexcept
 Returns true if all elements are equal to the scalar.
 
bool JUCE_VECTOR_CALLTYPE operator!= (SIMDRegister other) const noexcept
 Returns true if any element-wise comparisons return false.
 
bool JUCE_VECTOR_CALLTYPE operator!= (Type s) const noexcept
 Returns true if any elements are not equal to the scalar.
 
ElementType sum () const noexcept
 Returns a scalar which is the sum of all elements of the receiver.
 

Static Public Member Functions

static constexpr size_t size () noexcept
 Returns the number of elements in this vector.
 
static SIMDRegister JUCE_VECTOR_CALLTYPE expand (ElementType s) noexcept
 Creates a new SIMDRegister from the corresponding scalar primitive.
 
static SIMDRegister JUCE_VECTOR_CALLTYPE fromNative (vSIMDType a) noexcept
 Creates a new SIMDRegister from the internal SIMD type (for example __mm128 for single-precision floating point on SSE architectures).
 
static SIMDRegister JUCE_VECTOR_CALLTYPE fromRawArray (const ElementType *a) noexcept
 Creates a new SIMDRegister from the first SIMDNumElements of a scalar array.
 
static vMaskType JUCE_VECTOR_CALLTYPE equal (SIMDRegister a, SIMDRegister b) noexcept
 Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is equal to the corresponding element of b, or zero otherwise.
 
static vMaskType JUCE_VECTOR_CALLTYPE notEqual (SIMDRegister a, SIMDRegister b) noexcept
 Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is not equal to the corresponding element of b, or zero otherwise.
 
static vMaskType JUCE_VECTOR_CALLTYPE lessThan (SIMDRegister a, SIMDRegister b) noexcept
 Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is less than to the corresponding element of b, or zero otherwise.
 
static vMaskType JUCE_VECTOR_CALLTYPE lessThanOrEqual (SIMDRegister a, SIMDRegister b) noexcept
 Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is than or equal to the corresponding element of b, or zero otherwise.
 
static vMaskType JUCE_VECTOR_CALLTYPE greaterThan (SIMDRegister a, SIMDRegister b) noexcept
 Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is greater than to the corresponding element of b, or zero otherwise.
 
static vMaskType JUCE_VECTOR_CALLTYPE greaterThanOrEqual (SIMDRegister a, SIMDRegister b) noexcept
 Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is greater than or equal to the corresponding element of b, or zero otherwise.
 
static SIMDRegister JUCE_VECTOR_CALLTYPE min (SIMDRegister a, SIMDRegister b) noexcept
 Returns a new vector where each element is the minimum of the corresponding element of a and b.
 
static SIMDRegister JUCE_VECTOR_CALLTYPE max (SIMDRegister a, SIMDRegister b) noexcept
 Returns a new vector where each element is the maximum of the corresponding element of a and b.
 
static SIMDRegister JUCE_VECTOR_CALLTYPE multiplyAdd (SIMDRegister a, const SIMDRegister b, SIMDRegister c) noexcept
 Multiplies b and c and adds the result to a.
 
static SIMDRegister JUCE_VECTOR_CALLTYPE truncate (SIMDRegister a) noexcept
 Truncates each element to its integer part.
 
static SIMDRegister JUCE_VECTOR_CALLTYPE abs (SIMDRegister a) noexcept
 Returns the absolute value of each element.
 
static bool isSIMDAligned (const ElementType *ptr) noexcept
 Checks if the given pointer is sufficiently aligned for using SIMD operations.
 
static ElementTypegetNextSIMDAlignedPtr (ElementType *ptr) noexcept
 Returns the next position in memory where isSIMDAligned returns true.
 

Public Attributes

vSIMDType value
 

Static Public Attributes

static constexpr size_t SIMDRegisterSize
 The size in bytes of this register.
 
static constexpr size_t SIMDNumElements
 The number of elements that this vector can hold.
 

Member Typedef Documentation

◆ ElementType

using dsp::SIMDRegister< Type >::ElementType

The type that represents the individual constituents of the SIMD Register.

◆ value_type

using dsp::SIMDRegister< Type >::value_type

STL compatible value_type definition (same as ElementType).

◆ MaskType

using dsp::SIMDRegister< Type >::MaskType

The corresponding primitive integer type, for example, this will be int32_t if type is a float.

◆ PrimitiveType

using dsp::SIMDRegister< Type >::PrimitiveType

The native primitive type (used internally).

◆ NativeOps

using dsp::SIMDRegister< Type >::NativeOps

The native operations for this platform and type combination (used internally)

◆ vSIMDType

using dsp::SIMDRegister< Type >::vSIMDType

The native type (used internally).

◆ vMaskType

using dsp::SIMDRegister< Type >::vMaskType

The corresponding integer SIMDRegister type (used internally).

◆ vMaskSIMDType

using dsp::SIMDRegister< Type >::vMaskSIMDType

The internal native type for the corresponding mask type (used internally).

◆ CmplxOps

using dsp::SIMDRegister< Type >::CmplxOps

Wrapper for operations which need to be handled differently for complex and scalar types (used internally).

Constructor & Destructor Documentation

◆ ElementAccess()

template<typename Type>
dsp::SIMDRegister< Type >::ElementAccess::ElementAccess ( const ElementAccess & )
default

Member Function Documentation

◆ operator Type()

template<typename Type>
dsp::SIMDRegister< Type >::ElementAccess::operator Type ( ) const

◆ operator=() [1/3]

template<typename Type>
ElementAccess & dsp::SIMDRegister< Type >::ElementAccess::operator= ( Type scalar)
noexcept

References ElementAccess().

◆ operator=() [2/3]

template<typename Type>
ElementAccess & dsp::SIMDRegister< Type >::ElementAccess::operator= ( const ElementAccess & o)
noexcept

◆ SIMDRegister() [1/3]

dsp::SIMDRegister< Type >::SIMDRegister ( )
defaultnoexcept

Default constructor.

◆ SIMDRegister() [2/3]

dsp::SIMDRegister< Type >::SIMDRegister ( vSIMDType a)
noexcept

Constructs an object from the native SIMD type.

◆ SIMDRegister() [3/3]

dsp::SIMDRegister< Type >::SIMDRegister ( Type s)
noexcept

Constructs an object from a scalar type by broadcasting it to all elements.

◆ size()

static constexpr size_t dsp::SIMDRegister< Type >::size ( )
staticconstexprnoexcept

Returns the number of elements in this vector.

◆ expand()

static SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::expand ( ElementType s)
staticnoexcept

Creates a new SIMDRegister from the corresponding scalar primitive.

The scalar is extended to all elements of the vector.

◆ fromNative()

static SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::fromNative ( vSIMDType a)
staticnoexcept

Creates a new SIMDRegister from the internal SIMD type (for example __mm128 for single-precision floating point on SSE architectures).

◆ fromRawArray()

static SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::fromRawArray ( const ElementType * a)
staticnoexcept

Creates a new SIMDRegister from the first SIMDNumElements of a scalar array.

◆ copyToRawArray()

void JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::copyToRawArray ( ElementType * a) const
noexcept

Copies the elements of the SIMDRegister to a scalar array in memory.

◆ get()

ElementType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::get ( size_t idx) const
noexcept

Returns the idx-th element of the receiver.

Note that this does not check if idx is larger than the native register size.

◆ set()

void JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::set ( size_t idx,
ElementType v )
noexcept

Sets the idx-th element of the receiver.

Note that this does not check if idx is larger than the native register size.

◆ operator[]() [1/2]

ElementType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator[] ( size_t idx) const
noexcept

Returns the idx-th element of the receiver.

Note that this does not check if idx is larger than the native register size.

◆ operator[]() [2/2]

ElementAccess JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator[] ( size_t idx)
noexcept

Returns the idx-th element of the receiver.

Note that this does not check if idx is larger than the native register size.

◆ operator+=() [1/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator+= ( SIMDRegister v)
noexcept

Adds another SIMDRegister to the receiver.

◆ operator+=() [2/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator+= ( ElementType s)
noexcept

Adds a scalar to the receiver.

◆ operator-=() [1/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator-= ( SIMDRegister v)
noexcept

Subtracts another SIMDRegister to the receiver.

◆ operator-=() [2/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator-= ( ElementType s)
noexcept

Subtracts a scalar to the receiver.

◆ operator*=() [1/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator*= ( SIMDRegister v)
noexcept

Multiplies another SIMDRegister to the receiver.

◆ operator*=() [2/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator*= ( ElementType s)
noexcept

Multiplies a scalar to the receiver.

◆ operator=() [3/3]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator= ( ElementType s)
noexcept

Broadcasts the scalar to all elements of the receiver.

◆ operator&=() [1/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator&= ( vMaskType v)
noexcept

Bit-and the receiver with SIMDRegister v and store the result in the receiver.

◆ operator&=() [2/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator&= ( MaskType s)
noexcept

Bit-and each element of the receiver with the scalar s and store the result in the receiver.

◆ operator|=() [1/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator|= ( vMaskType v)
noexcept

Bit-or the receiver with SIMDRegister v and store the result in the receiver.

◆ operator|=() [2/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator|= ( MaskType s)
noexcept

Bit-or each element of the receiver with the scalar s and store the result in the receiver.

◆ operator^=() [1/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator^= ( vMaskType v)
noexcept

Bit-xor the receiver with SIMDRegister v and store the result in the receiver.

◆ operator^=() [2/2]

SIMDRegister &JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator^= ( MaskType s)
noexcept

Bit-xor each element of the receiver with the scalar s and store the result in the receiver.

◆ operator+() [1/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator+ ( SIMDRegister v) const
noexcept

Returns the sum of the receiver and v.

◆ operator+() [2/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator+ ( ElementType s) const
noexcept

Returns a vector where each element is the sum of the corresponding element in the receiver and the scalar s.

◆ operator-() [1/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator- ( SIMDRegister v) const
noexcept

Returns the difference of the receiver and v.

◆ operator-() [2/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator- ( ElementType s) const
noexcept

Returns a vector where each element is the difference of the corresponding element in the receiver and the scalar s.

◆ operator*() [1/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator* ( SIMDRegister v) const
noexcept

Returns the product of the receiver and v.

◆ operator*() [2/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator* ( ElementType s) const
noexcept

Returns a vector where each element is the product of the corresponding element in the receiver and the scalar s.

◆ operator&() [1/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator& ( vMaskType v) const
noexcept

Returns the bit-and of the receiver and v.

◆ operator&() [2/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator& ( MaskType s) const
noexcept

Returns a vector where each element is the bit-and'd value of the corresponding element in the receiver and the scalar s.

◆ operator|() [1/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator| ( vMaskType v) const
noexcept

Returns the bit-or of the receiver and v.

◆ operator|() [2/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator| ( MaskType s) const
noexcept

Returns a vector where each element is the bit-or'd value of the corresponding element in the receiver and the scalar s.

◆ operator^() [1/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator^ ( vMaskType v) const
noexcept

Returns the bit-xor of the receiver and v.

◆ operator^() [2/2]

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator^ ( MaskType s) const
noexcept

Returns a vector where each element is the bit-xor'd value of the corresponding element in the receiver and the scalar s.

◆ operator~()

SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator~ ( ) const
noexcept

Returns a vector where each element is the bit-inverted value of the corresponding element in the receiver.

◆ operator==() [1/2]

bool JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator== ( SIMDRegister other) const
noexcept

Returns true if all element-wise comparisons return true.

◆ operator==() [2/2]

bool JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator== ( Type s) const
noexcept

Returns true if all elements are equal to the scalar.

◆ operator!=() [1/2]

bool JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator!= ( SIMDRegister other) const
noexcept

Returns true if any element-wise comparisons return false.

◆ operator!=() [2/2]

bool JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::operator!= ( Type s) const
noexcept

Returns true if any elements are not equal to the scalar.

◆ equal()

static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::equal ( SIMDRegister a,
SIMDRegister b )
staticnoexcept

Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is equal to the corresponding element of b, or zero otherwise.

The result can then be used in bit operations defined above to avoid branches in vector SIMD code.

◆ notEqual()

static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::notEqual ( SIMDRegister a,
SIMDRegister b )
staticnoexcept

Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is not equal to the corresponding element of b, or zero otherwise.

The result can then be used in bit operations defined above to avoid branches in vector SIMD code.

◆ lessThan()

static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::lessThan ( SIMDRegister a,
SIMDRegister b )
staticnoexcept

Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is less than to the corresponding element of b, or zero otherwise.

The result can then be used in bit operations defined above to avoid branches in vector SIMD code.

◆ lessThanOrEqual()

static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::lessThanOrEqual ( SIMDRegister a,
SIMDRegister b )
staticnoexcept

Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is than or equal to the corresponding element of b, or zero otherwise.

The result can then be used in bit operations defined above to avoid branches in vector SIMD code.

◆ greaterThan()

static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::greaterThan ( SIMDRegister a,
SIMDRegister b )
staticnoexcept

Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is greater than to the corresponding element of b, or zero otherwise.

The result can then be used in bit operations defined above to avoid branches in vector SIMD code.

◆ greaterThanOrEqual()

static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::greaterThanOrEqual ( SIMDRegister a,
SIMDRegister b )
staticnoexcept

Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is greater than or equal to the corresponding element of b, or zero otherwise.

The result can then be used in bit operations defined above to avoid branches in vector SIMD code.

◆ min()

static SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::min ( SIMDRegister a,
SIMDRegister b )
staticnoexcept

Returns a new vector where each element is the minimum of the corresponding element of a and b.

◆ max()

static SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::max ( SIMDRegister a,
SIMDRegister b )
staticnoexcept

Returns a new vector where each element is the maximum of the corresponding element of a and b.

◆ multiplyAdd()

static SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::multiplyAdd ( SIMDRegister a,
const SIMDRegister b,
SIMDRegister c )
staticnoexcept

Multiplies b and c and adds the result to a.

◆ sum()

ElementType dsp::SIMDRegister< Type >::sum ( ) const
noexcept

Returns a scalar which is the sum of all elements of the receiver.

◆ truncate()

static SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::truncate ( SIMDRegister a)
staticnoexcept

Truncates each element to its integer part.

Effectively discards the fractional part of each element. A.k.a. round to zero.

◆ abs()

static SIMDRegister JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::abs ( SIMDRegister a)
staticnoexcept

Returns the absolute value of each element.

◆ isSIMDAligned()

static bool dsp::SIMDRegister< Type >::isSIMDAligned ( const ElementType * ptr)
staticnoexcept

Checks if the given pointer is sufficiently aligned for using SIMD operations.

◆ getNextSIMDAlignedPtr()

static ElementType * dsp::SIMDRegister< Type >::getNextSIMDAlignedPtr ( ElementType * ptr)
staticnoexcept

Returns the next position in memory where isSIMDAligned returns true.

If the current position in memory is already aligned then this method will simply return the pointer.

Member Data Documentation

◆ SIMDRegisterSize

size_t dsp::SIMDRegister< Type >::SIMDRegisterSize
staticconstexpr

The size in bytes of this register.

◆ SIMDNumElements

size_t dsp::SIMDRegister< Type >::SIMDNumElements
staticconstexpr

The number of elements that this vector can hold.

◆ value

vSIMDType dsp::SIMDRegister< Type >::value
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram