|
LMMS
|
#include <juce_SIMDRegister.h>
Classes | |
| struct | ElementAccess |
Public Types | |
| using | ElementType = Type |
| using | value_type = ElementType |
| using | MaskType = typename SIMDInternal::MaskTypeFor<ElementType>::type |
| using | PrimitiveType = typename SIMDInternal::PrimitiveType<ElementType>::type |
| using | NativeOps = SIMDNativeOps<PrimitiveType> |
| using | vSIMDType = typename NativeOps::vSIMDType |
| using | vMaskType = SIMDRegister<MaskType> |
| using | vMaskSIMDType = typename vMaskType::vSIMDType |
| using | CmplxOps = CmplxSIMDOps<ElementType> |
Public Attributes | |
| vSIMDType | value |
Static Public Attributes | |
| static constexpr size_t | SIMDRegisterSize = sizeof (vSIMDType) |
| static constexpr size_t | SIMDNumElements = SIMDRegisterSize / sizeof (ElementType) |
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 |
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 available 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 sufficiently 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 sufficiently aligned for SIMD vector operations.
Note that using SIMDRegister without enabling optimizations will result in code with very poor performance.
@tags{DSP}
| using juce::dsp::SIMDRegister< Type >::CmplxOps = CmplxSIMDOps<ElementType> |
Wrapper for operations which need to be handled differently for complex and scalar types (used internally).
| using juce::dsp::SIMDRegister< Type >::ElementType = Type |
The type that represents the individual constituents of the SIMD Register
| 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.
| using juce::dsp::SIMDRegister< Type >::NativeOps = SIMDNativeOps<PrimitiveType> |
The native operations for this platform and type combination (used internally)
| using juce::dsp::SIMDRegister< Type >::PrimitiveType = typename SIMDInternal::PrimitiveType<ElementType>::type |
The native primitive type (used internally).
| using juce::dsp::SIMDRegister< Type >::value_type = ElementType |
STL compatible value_type definition (same as ElementType).
| using juce::dsp::SIMDRegister< Type >::vMaskSIMDType = typename vMaskType::vSIMDType |
The internal native type for the corresponding mask type (used internally).
| using juce::dsp::SIMDRegister< Type >::vMaskType = SIMDRegister<MaskType> |
The corresponding integer SIMDRegister type (used internally).
| using juce::dsp::SIMDRegister< Type >::vSIMDType = typename NativeOps::vSIMDType |
The native type (used internally).
|
inlinedefaultnoexcept |
Default constructor.
|
inlinenoexcept |
Constructs an object from the native SIMD type.
|
inlinenoexcept |
Constructs an object from a scalar type by broadcasting it to all elements.
|
inlinestaticnoexcept |
Returns the absolute value of each element.
|
inlinenoexcept |
Copies the elements of the SIMDRegister to a scalar array in memory.
|
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.
|
inlinestaticnoexcept |
Creates a new SIMDRegister from the corresponding scalar primitive. The scalar is extended to all elements of the vector.
|
inlinestaticnoexcept |
Creates a new SIMDRegister from the internal SIMD type (for example __mm128 for single-precision floating point on SSE architectures).
|
inlinestaticnoexcept |
Creates a new SIMDRegister from the first SIMDNumElements of a scalar array.
|
inlinenoexcept |
Returns the idx-th element of the receiver. Note that this does not check if idx is larger than the native register size.
|
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.
|
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.
|
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.
|
inlinestaticnoexcept |
Checks if the given pointer is sufficiently aligned for using SIMD operations.
|
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.
|
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.
|
inlinestaticnoexcept |
Returns a new vector where each element is the maximum of the corresponding element of a and b.
|
inlinestaticnoexcept |
Returns a new vector where each element is the minimum of the corresponding element of a and b.
|
inlinestaticnoexcept |
Multiplies b and c and adds the result to a.
|
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.
|
inlinenoexcept |
Returns true if any element-wise comparisons return false.
|
inlinenoexcept |
Returns true if any elements are not equal to the scalar.
|
inlinenoexcept |
Returns a vector where each element is the bit-and'd value of the corresponding element in the receiver and the scalar s.
|
inlinenoexcept |
Returns the bit-and of the receiver and v.
|
inlinenoexcept |
Bit-and each element of the receiver with the scalar s and store the result in the receiver.
|
inlinenoexcept |
Bit-and the receiver with SIMDRegister v and store the result in the receiver.
|
inlinenoexcept |
Returns a vector where each element is the product of the corresponding element in the receiver and the scalar s.
|
inlinenoexcept |
Returns the product of the receiver and v.
|
inlinenoexcept |
Multiplies a scalar to the receiver.
|
inlinenoexcept |
Multiplies another SIMDRegister to the receiver.
|
inlinenoexcept |
Returns a vector where each element is the sum of the corresponding element in the receiver and the scalar s.
|
inlinenoexcept |
Returns the sum of the receiver and v.
|
inlinenoexcept |
Adds a scalar to the receiver.
|
inlinenoexcept |
Adds another SIMDRegister to the receiver.
|
inlinenoexcept |
Returns a vector where each element is the difference of the corresponding element in the receiver and the scalar s.
|
inlinenoexcept |
Returns the difference of the receiver and v.
|
inlinenoexcept |
Subtracts a scalar to the receiver.
|
inlinenoexcept |
Subtracts another SIMDRegister to the receiver.
|
inlinenoexcept |
Broadcasts the scalar to all elements of the receiver.
|
inlinenoexcept |
Returns true if all element-wise comparisons return true.
|
inlinenoexcept |
Returns true if all elements are equal to the scalar.
|
inlinenoexcept |
Returns the idx-th element of the receiver. Note that this does not check if idx is larger than the native register size.
|
inlinenoexcept |
Returns the idx-th element of the receiver. Note that this does not check if idx is larger than the native register size.
|
inlinenoexcept |
Returns a vector where each element is the bit-xor'd value of the corresponding element in the receiver and the scalar s.
|
inlinenoexcept |
Returns the bit-xor of the receiver and v.
|
inlinenoexcept |
Bit-xor each element of the receiver with the scalar s and store the result in the receiver.
|
inlinenoexcept |
Bit-xor the receiver with SIMDRegister v and store the result in the receiver.
|
inlinenoexcept |
Returns a vector where each element is the bit-or'd value of the corresponding element in the receiver and the scalar s.
|
inlinenoexcept |
Returns the bit-or of the receiver and v.
|
inlinenoexcept |
Bit-or each element of the receiver with the scalar s and store the result in the receiver.
|
inlinenoexcept |
Bit-or the receiver with SIMDRegister v and store the result in the receiver.
|
inlinenoexcept |
Returns a vector where each element is the bit-inverted value of the corresponding element in the receiver.
|
inlinenoexcept |
Sets the idx-th element of the receiver. Note that this does not check if idx is larger than the native register size.
|
inlinestaticconstexprnoexcept |
Returns the number of elements in this vector.
|
inlinenoexcept |
Returns a scalar which is the sum of all elements of the receiver.
|
inlinestaticprivatenoexcept |
|
inlinestaticprivatenoexcept |
|
inlinestaticprivatenoexcept |
|
inlinestaticnoexcept |
Truncates each element to its integer part. Effectively discards the fractional part of each element. A.k.a. round to zero.
|
staticconstexpr |
The number of elements that this vector can hold.
|
staticconstexpr |
The size in bytes of this register.
| vSIMDType juce::dsp::SIMDRegister< Type >::value |