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

Public Types

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

Public Member Functions

ElementType JUCE_VECTOR_CALLTYPE operator[] (size_t idx) const noexcept
 Returns the idx-th element of the receiver. More...
 
ElementType &JUCE_VECTOR_CALLTYPE operator[] (size_t idx) noexcept
 Returns the idx-th element of the receiver. More...
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator+= (SIMDRegister v) noexcept
 Adds another SIMDRegister to the receiver. More...
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator-= (SIMDRegister v) noexcept
 Subtracts another SIMDRegister to the receiver. More...
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator*= (SIMDRegister v) noexcept
 Subtracts another SIMDRegister to the receiver. More...
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator= (ElementType s) noexcept
 Broadcasts the scalar to all elements of the receiver. More...
 
SIMDRegister &JUCE_VECTOR_CALLTYPE operator+= (ElementType s) noexcept
 Adds a scalar 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
 Multiplies a scalar to the receiver. 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|= (vMaskType v) noexcept
 Bit-or the reciver with SIMDRegister v and store the result in the receiver. 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-and each element of the reciver with the scalar s 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^= (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+ (SIMDRegister v) const noexcept
 Returns the sum of the receiver and v. More...
 
SIMDRegister JUCE_VECTOR_CALLTYPE operator- (SIMDRegister v) const noexcept
 Returns the difference of the receiver and v. 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 sum of the corresponding element in the receiver and the scalar s. 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* (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 & (vMaskType v) const noexcept
 Returns the bit-and of the receiver and v. 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^ (vMaskType v) const noexcept
 Returns the bit-xor of the receiver and v. 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...
 
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| (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^ (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...
 
ElementType sum () const noexcept
 Returns a scalar which is the sum of all elements of the receiver. More...
 

Static Public Member Functions

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

Public Attributes

vSIMDType value
 

Static Public Attributes

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

Detailed Description

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

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

This class is only availabe 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.

Member Typedef Documentation

◆ ElementType

template<typename Type>
typedef Type dsp::SIMDRegister< Type >::ElementType

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

◆ value_type

template<typename Type>
typedef ElementType dsp::SIMDRegister< Type >::value_type

STL compatible value_type definition (same as ElementType).

◆ MaskType

template<typename Type>
typedef SIMDInternal::MaskTypeFor<ElementType>::type dsp::SIMDRegister< Type >::MaskType

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

◆ PrimitiveType

template<typename Type>
typedef SIMDInternal::PrimitiveType<ElementType>::type dsp::SIMDRegister< Type >::PrimitiveType

The native primitive type (used internally).

◆ NativeOps

template<typename Type>
typedef SIMDNativeOps<PrimitiveType> dsp::SIMDRegister< Type >::NativeOps

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

◆ vSIMDType

template<typename Type>
typedef NativeOps::vSIMDType dsp::SIMDRegister< Type >::vSIMDType

The native type (used internally).

◆ vMaskType

template<typename Type>
typedef SIMDRegister<MaskType> dsp::SIMDRegister< Type >::vMaskType

The corresponding integer SIMDRegister type (used internally).

◆ vMaskSIMDType

template<typename Type>
typedef vMaskType::vSIMDType dsp::SIMDRegister< Type >::vMaskSIMDType

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

◆ CmplxOps

template<typename Type>
typedef CmplxSIMDOps<ElementType> dsp::SIMDRegister< Type >::CmplxOps

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

Member Function Documentation

◆ size()

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

Returns the number of elements in this vector.

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

◆ expand()

template<typename Type>
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.

References dsp::CmplxSIMDOps< Scalar >::expand().

◆ fromNative()

template<typename Type>
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).

Referenced by dsp::SIMDRegister< Type >::getNextSIMDAlignedPtr().

◆ operator[]() [1/2]

template<typename Type>
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.

References jassert, and dsp::SIMDRegister< Type >::value.

◆ operator[]() [2/2]

template<typename Type>
ElementType& 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.

References jassert, and dsp::SIMDRegister< Type >::value.

◆ operator+=() [1/2]

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

Adds another SIMDRegister to the receiver.

◆ operator-=() [1/2]

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

Subtracts another SIMDRegister to the receiver.

◆ operator*=() [1/2]

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

Subtracts another SIMDRegister to the receiver.

References dsp::CmplxSIMDOps< Scalar >::mul().

◆ operator=()

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

Broadcasts the scalar to all elements of the receiver.

References dsp::CmplxSIMDOps< Scalar >::expand().

◆ operator+=() [2/2]

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

Adds a scalar to the receiver.

References dsp::CmplxSIMDOps< Scalar >::expand().

◆ operator-=() [2/2]

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

Subtracts a scalar to the receiver.

References dsp::CmplxSIMDOps< Scalar >::expand().

◆ operator*=() [2/2]

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

Multiplies a scalar to the receiver.

References dsp::CmplxSIMDOps< Scalar >::expand(), and dsp::CmplxSIMDOps< Scalar >::mul().

◆ operator &=() [1/2]

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

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

◆ operator|=() [1/2]

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

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

◆ operator^=() [1/2]

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

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

◆ operator &=() [2/2]

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

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

◆ operator|=() [2/2]

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

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

◆ operator^=() [2/2]

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

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

◆ operator+() [1/2]

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

Returns the sum of the receiver and v.

◆ operator-() [1/2]

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

Returns the difference of the receiver and v.

◆ operator*() [1/2]

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

Returns the product of the receiver and v.

References dsp::CmplxSIMDOps< Scalar >::mul().

◆ operator+() [2/2]

template<typename Type>
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.

References dsp::CmplxSIMDOps< Scalar >::expand().

◆ operator-() [2/2]

template<typename Type>
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.

References dsp::CmplxSIMDOps< Scalar >::expand().

◆ operator*() [2/2]

template<typename Type>
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.

References dsp::CmplxSIMDOps< Scalar >::expand(), and dsp::CmplxSIMDOps< Scalar >::mul().

◆ operator &() [1/2]

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

Returns the bit-and of the receiver and v.

◆ operator|() [1/2]

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

Returns the bit-or of the receiver and v.

◆ operator^() [1/2]

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

Returns the bit-xor of the receiver and v.

◆ operator~()

template<typename Type>
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 &() [2/2]

template<typename Type>
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|() [2/2]

template<typename Type>
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^() [2/2]

template<typename Type>
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.

◆ equal()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::equal ( SIMDRegister< Type >  a,
SIMDRegister< Type >  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()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::notEqual ( SIMDRegister< Type >  a,
SIMDRegister< Type >  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()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::lessThan ( SIMDRegister< Type >  a,
SIMDRegister< Type >  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()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::lessThanOrEqual ( SIMDRegister< Type >  a,
SIMDRegister< Type >  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()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::greaterThan ( SIMDRegister< Type >  a,
SIMDRegister< Type >  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()

template<typename Type>
static vMaskType JUCE_VECTOR_CALLTYPE dsp::SIMDRegister< Type >::greaterThanOrEqual ( SIMDRegister< Type >  a,
SIMDRegister< Type >  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()

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

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

References min().

Referenced by jmin().

◆ max()

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

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

References max().

Referenced by jmax().

◆ multiplyAdd()

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

Multiplies a and b and adds the result to c.

References dsp::CmplxSIMDOps< Scalar >::muladd().

◆ sum()

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

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

References dsp::CmplxSIMDOps< Scalar >::sum().

◆ isSIMDAligned()

template<typename Type>
static bool dsp::SIMDRegister< Type >::isSIMDAligned ( ElementType ptr)
staticnoexcept

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

◆ getNextSIMDAlignedPtr()

template<typename Type>
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.

References dsp::CmplxSIMDOps< Scalar >::expand(), dsp::SIMDRegister< Type >::fromNative(), and snapPointerToAlignment().

Member Data Documentation

◆ SIMDRegisterSize

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

The size in bytes of this register.

◆ SIMDNumElements

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

The number of elements that this vector can hold.

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

◆ value

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

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