JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::dsp::SIMDRegister< Type > Struct Template Reference

A wrapper around the platform's native SIMD register type. More...

#include <juce_SIMDRegister.h>

Collaboration diagram for juce::dsp::SIMDRegister< Type >:

Classes

struct  ElementAccess
 

Public Types

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

Public Member Functions

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

Static Public Member Functions

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. More...
 
static SIMDRegister JUCE_VECTOR_CALLTYPE expand (ElementType s) noexcept
 Creates a new SIMDRegister from the corresponding scalar primitive. More...
 
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). More...
 
static SIMDRegister JUCE_VECTOR_CALLTYPE fromRawArray (const ElementType *a) noexcept
 Creates a new SIMDRegister from the first SIMDNumElements of a scalar array. More...
 
static ElementTypegetNextSIMDAlignedPtr (ElementType *ptr) noexcept
 Returns the next position in memory where isSIMDAligned returns true. More...
 
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. More...
 
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. More...
 
static bool isSIMDAligned (const ElementType *ptr) noexcept
 Checks if the given pointer is suffeciently aligned for using SIMD operations. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static SIMDRegister JUCE_VECTOR_CALLTYPE multiplyAdd (SIMDRegister a, const SIMDRegister b, SIMDRegister c) noexcept
 Multiplies b and c and adds the result to a. More...
 
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. More...
 
static constexpr size_t size () noexcept
 Returns the number of elements in this vector. More...
 

Public Attributes

vSIMDType value
 

Static Public Attributes

static constexpr size_t SIMDNumElements = SIMDRegisterSize / sizeof (ElementType)
 The number of elements that this vector can hold. More...
 
static constexpr size_t SIMDRegisterSize = sizeof (vSIMDType)
 The size in bytes of this register. More...
 

Static Private Member Functions

static vMaskType JUCE_VECTOR_CALLTYPE toMaskType (vSIMDType a) noexcept
 
static vSIMDType JUCE_VECTOR_CALLTYPE toVecType (vMaskSIMDType a) noexcept
 
static vSIMDType JUCE_VECTOR_CALLTYPE toVecType (MaskType a) noexcept
 

Detailed Description

template<typename Type>
struct juce::dsp::SIMDRegister< Type >

A wrapper around the platform's native SIMD register type.

This class is only available on SIMD machines. Use JUCE_USE_SIMD to query if SIMD is avaialble for your system.

SIMDRegister<Type> is a templated class representing the native vectorized version of FloatingType. SIMDRegister supports all numerical primitive types and std:complex<float> and std::complex<double> supports and most operations of the corresponding primitive type. Additionally, SIMDRegister can be accessed like an array to extract the individual elements.

If you are using SIMDRegister as a pointer, then you must ensure that the memory is suffeciently aligned for SIMD vector operations. Failing to do so will result in crashes or very slow code. Use SIMDRegister::isSIMDAligned to query if a pointer is suffeciently aligned for SIMD vector operations.

Note that using SIMDRegister without enabling optimizations will result in code with very poor performance.

{DSP}

Member Typedef Documentation

◆ CmplxOps

template<typename Type>
using juce::dsp::SIMDRegister< Type >::CmplxOps = CmplxSIMDOps<ElementType>

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

◆ ElementType

template<typename Type>
using juce::dsp::SIMDRegister< Type >::ElementType = Type

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

◆ MaskType

template<typename Type>
using juce::dsp::SIMDRegister< Type >::MaskType = typename SIMDInternal::MaskTypeFor<ElementType>::type

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

◆ NativeOps

template<typename Type>
using juce::dsp::SIMDRegister< Type >::NativeOps = SIMDNativeOps<PrimitiveType>

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

◆ PrimitiveType

template<typename Type>
using juce::dsp::SIMDRegister< Type >::PrimitiveType = typename SIMDInternal::PrimitiveType<ElementType>::type

The native primitive type (used internally).

◆ value_type

template<typename Type>
using juce::dsp::SIMDRegister< Type >::value_type = ElementType

STL compatible value_type definition (same as ElementType).

◆ vMaskSIMDType

template<typename Type>
using juce::dsp::SIMDRegister< Type >::vMaskSIMDType = typename vMaskType::vSIMDType

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

◆ vMaskType

template<typename Type>
using juce::dsp::SIMDRegister< Type >::vMaskType = SIMDRegister<MaskType>

The corresponding integer SIMDRegister type (used internally).

◆ vSIMDType

template<typename Type>
using juce::dsp::SIMDRegister< Type >::vSIMDType = typename NativeOps::vSIMDType

The native type (used internally).

Constructor & Destructor Documentation

◆ SIMDRegister() [1/3]

template<typename Type>
juce::dsp::SIMDRegister< Type >::SIMDRegister ( )
inlinenoexcept

Default constructor.

◆ SIMDRegister() [2/3]

template<typename Type>
juce::dsp::SIMDRegister< Type >::SIMDRegister ( vSIMDType  a)
inlinenoexcept

Constructs an object from the native SIMD type.

◆ SIMDRegister() [3/3]

template<typename Type>
juce::dsp::SIMDRegister< Type >::SIMDRegister ( Type  s)
inlinenoexcept

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

◆ ~SIMDRegister()

template<typename Type>
juce::dsp::SIMDRegister< Type >::~SIMDRegister ( )
inlinenoexcept

Destrutor.

Member Function Documentation

◆ copyToRawArray()

template<typename Type>
void JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::copyToRawArray ( ElementType a) const
inlinenoexcept

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

References juce::dsp::SIMDRegister< Type >::isSIMDAligned(), and jassert.

◆ equal()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::equal ( SIMDRegister< Type >  a,
SIMDRegister< Type >  b 
)
inlinestaticnoexcept

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.

References juce::dsp::SIMDRegister< Type >::toMaskType().

◆ expand()

template<typename Type>
static SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::expand ( ElementType  s)
inlinestaticnoexcept

Creates a new SIMDRegister from the corresponding scalar primitive.

The scalar is extended to all elements of the vector.

Referenced by juce::dsp::SIMDRegister< Type >::operator==().

◆ fromNative()

template<typename Type>
static SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::fromNative ( vSIMDType  a)
inlinestaticnoexcept

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

Referenced by juce::dsp::SIMDRegister< Type >::toMaskType().

◆ fromRawArray()

template<typename Type>
static SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::fromRawArray ( const ElementType a)
inlinestaticnoexcept

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

References juce::dsp::SIMDRegister< Type >::isSIMDAligned(), and jassert.

◆ get()

template<typename Type>
ElementType JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::get ( size_t  idx) const
inlinenoexcept

Returns the idx-th element of the receiver.

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

References jassert.

◆ getNextSIMDAlignedPtr()

template<typename Type>
static ElementType* juce::dsp::SIMDRegister< Type >::getNextSIMDAlignedPtr ( ElementType ptr)
inlinestaticnoexcept

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.

References juce::snapPointerToAlignment().

◆ greaterThan()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::greaterThan ( SIMDRegister< Type >  a,
SIMDRegister< Type >  b 
)
inlinestaticnoexcept

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.

References juce::dsp::SIMDRegister< Type >::toMaskType().

◆ greaterThanOrEqual()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::greaterThanOrEqual ( SIMDRegister< Type >  a,
SIMDRegister< Type >  b 
)
inlinestaticnoexcept

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.

References juce::dsp::SIMDRegister< Type >::toMaskType().

◆ isSIMDAligned()

template<typename Type>
static bool juce::dsp::SIMDRegister< Type >::isSIMDAligned ( const ElementType ptr)
inlinestaticnoexcept

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

Referenced by juce::dsp::SIMDRegister< Type >::copyToRawArray(), and juce::dsp::SIMDRegister< Type >::fromRawArray().

◆ lessThan()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::lessThan ( SIMDRegister< Type >  a,
SIMDRegister< Type >  b 
)
inlinestaticnoexcept

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.

References juce::dsp::SIMDRegister< Type >::toMaskType().

◆ lessThanOrEqual()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::lessThanOrEqual ( SIMDRegister< Type >  a,
SIMDRegister< Type >  b 
)
inlinestaticnoexcept

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.

References juce::dsp::SIMDRegister< Type >::toMaskType().

◆ max()

template<typename Type>
static SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::max ( SIMDRegister< Type >  a,
SIMDRegister< Type >  b 
)
inlinestaticnoexcept

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

Referenced by juce::jmax().

◆ min()

template<typename Type>
static SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::min ( SIMDRegister< Type >  a,
SIMDRegister< Type >  b 
)
inlinestaticnoexcept

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

Referenced by juce::jmin().

◆ multiplyAdd()

template<typename Type>
static SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::multiplyAdd ( SIMDRegister< Type >  a,
const SIMDRegister< Type >  b,
SIMDRegister< Type >  c 
)
inlinestaticnoexcept

Multiplies b and c and adds the result to a.

◆ notEqual()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::notEqual ( SIMDRegister< Type >  a,
SIMDRegister< Type >  b 
)
inlinestaticnoexcept

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.

References juce::dsp::SIMDRegister< Type >::toMaskType().

◆ operator &() [1/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator& ( vMaskType  v) const
inlinenoexcept

Returns the bit-and of the receiver and v.

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator &() [2/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator& ( MaskType  s) const
inlinenoexcept

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

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator &=() [1/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator&= ( vMaskType  v)
inlinenoexcept

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

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator &=() [2/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator&= ( MaskType  s)
inlinenoexcept

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

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator!=() [1/2]

template<typename Type>
bool JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator!= ( SIMDRegister< Type >  other) const
inlinenoexcept

Returns true if any elements-wise comparisons return false.

◆ operator!=() [2/2]

template<typename Type>
bool JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator!= ( Type  s) const
inlinenoexcept

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

◆ operator*() [1/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator* ( SIMDRegister< Type >  v) const
inlinenoexcept

Returns the product of the receiver and v.

◆ operator*() [2/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator* ( ElementType  s) const
inlinenoexcept

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

◆ operator*=() [1/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator*= ( SIMDRegister< Type >  v)
inlinenoexcept

Multiplies another SIMDRegister to the receiver.

◆ operator*=() [2/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator*= ( ElementType  s)
inlinenoexcept

Multiplies a scalar to the receiver.

◆ operator+() [1/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator+ ( SIMDRegister< Type >  v) const
inlinenoexcept

Returns the sum of the receiver and v.

◆ operator+() [2/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator+ ( ElementType  s) const
inlinenoexcept

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

◆ operator+=() [1/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator+= ( SIMDRegister< Type >  v)
inlinenoexcept

Adds another SIMDRegister to the receiver.

◆ operator+=() [2/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator+= ( ElementType  s)
inlinenoexcept

Adds a scalar to the receiver.

◆ operator-() [1/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator- ( SIMDRegister< Type >  v) const
inlinenoexcept

Returns the difference of the receiver and v.

◆ operator-() [2/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator- ( ElementType  s) const
inlinenoexcept

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

◆ operator-=() [1/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator-= ( SIMDRegister< Type >  v)
inlinenoexcept

Subtracts another SIMDRegister to the receiver.

◆ operator-=() [2/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator-= ( ElementType  s)
inlinenoexcept

Subtracts a scalar to the receiver.

◆ operator=()

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator= ( ElementType  s)
inlinenoexcept

Broadcasts the scalar to all elements of the receiver.

Referenced by juce::dsp::SIMDRegister< Type >::ElementAccess::operator=().

◆ operator==() [1/2]

template<typename Type>
bool JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator== ( SIMDRegister< Type >  other) const
inlinenoexcept

Returns true if all elements-wise comparisons return true.

◆ operator==() [2/2]

template<typename Type>
bool JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator== ( Type  s) const
inlinenoexcept

Returns true if all elements are equal to the scalar.

References juce::dsp::SIMDRegister< Type >::expand().

◆ operator[]() [1/2]

template<typename Type>
ElementType JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator[] ( size_t  idx) const
inlinenoexcept

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]

template<typename Type>
ElementAccess JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator[] ( size_t  idx)
inlinenoexcept

Returns the idx-th element of the receiver.

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

References jassert.

◆ operator^() [1/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator^ ( vMaskType  v) const
inlinenoexcept

Returns the bit-xor of the receiver and v.

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator^() [2/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator^ ( MaskType  s) const
inlinenoexcept

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

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator^=() [1/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator^= ( vMaskType  v)
inlinenoexcept

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

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator^=() [2/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator^= ( MaskType  s)
inlinenoexcept

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

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator|() [1/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator| ( vMaskType  v) const
inlinenoexcept

Returns the bit-or of the receiver and v.

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator|() [2/2]

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator| ( MaskType  s) const
inlinenoexcept

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

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator|=() [1/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator|= ( vMaskType  v)
inlinenoexcept

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

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator|=() [2/2]

template<typename Type>
SIMDRegister& JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator|= ( MaskType  s)
inlinenoexcept

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

References juce::dsp::SIMDRegister< Type >::toVecType().

◆ operator~()

template<typename Type>
SIMDRegister JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::operator~ ( ) const
inlinenoexcept

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

◆ set()

template<typename Type>
void JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::set ( size_t  idx,
ElementType  v 
)
inlinenoexcept

Sets the idx-th element of the receiver.

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

References jassert.

Referenced by juce::dsp::SIMDRegister< Type >::ElementAccess::operator=().

◆ size()

template<typename Type>
static constexpr size_t juce::dsp::SIMDRegister< Type >::size ( )
inlinestaticnoexcept

Returns the number of elements in this vector.

References juce::dsp::SIMDRegister< Type >::SIMDNumElements.

◆ sum()

template<typename Type>
ElementType juce::dsp::SIMDRegister< Type >::sum ( ) const
inlinenoexcept

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

◆ toMaskType()

◆ toVecType() [1/2]

◆ toVecType() [2/2]

template<typename Type>
static vSIMDType JUCE_VECTOR_CALLTYPE juce::dsp::SIMDRegister< Type >::toVecType ( MaskType  a)
inlinestaticprivatenoexcept

Member Data Documentation

◆ SIMDNumElements

template<typename Type>
constexpr size_t juce::dsp::SIMDRegister< Type >::SIMDNumElements = SIMDRegisterSize / sizeof (ElementType)
static

The number of elements that this vector can hold.

Referenced by juce::dsp::SIMDRegister< Type >::size().

◆ SIMDRegisterSize

template<typename Type>
constexpr size_t juce::dsp::SIMDRegister< Type >::SIMDRegisterSize = sizeof (vSIMDType)
static

The size in bytes of this register.

◆ value

template<typename Type>
vSIMDType juce::dsp::SIMDRegister< Type >::value

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