Om
1.0.0
A universal framework for multimedia simulation
|
A class representing an N-component 32-bit floating-point SIMD scalar. More...
#include <omSIMDArrayFloat32.h>
Public Member Functions | |
SIMDArray () | |
Create a new SIMD scalar with all elements left uninitialized. More... | |
SIMDArray (Float32 value) | |
Create a new SIMD scalar with all elements equal to the specified value. More... | |
SIMDArray (const Float32 *array) | |
Create a new SIMD scalar from the first N values stored at specified pointer's location. More... | |
Float32 | sumScalar () const |
Return the horizontal sum of all components of this SIMD scalar. More... | |
void | store (Float32 *destination) const |
Store this SIMD scalar starting at the specified aligned destination pointer. More... | |
void | storeUnaligned (Float32 *destination) const |
Store this SIMD scalar starting at the specified unaligned destination pointer. More... | |
Float32 & | operator[] (Index i) |
Get a reference to the value stored at the specified component index in this scalar. More... | |
Float32 | operator[] (Index i) const |
Get the value stored at the specified component index in this scalar. More... | |
const Float32 * | toArray () const |
Get a pointer to the first element in this scalar. More... | |
SIMDArray< Int32, width > | operator== (const SIMDArray &scalar) const |
Compare two 4D SIMD scalars component-wise for equality. More... | |
SIMDArray< Int32, width > | operator== (const Float32 value) const |
Compare this scalar to a single floating point value for equality. More... | |
SIMDArray< Int32, width > | operator!= (const SIMDArray &scalar) const |
Compare two 4D SIMD scalars component-wise for inequality. More... | |
SIMDArray< Int32, width > | operator!= (const Float32 value) const |
Compare this scalar to a single floating point value for inequality. More... | |
SIMDArray< Int32, width > | operator< (const SIMDArray &scalar) const |
Perform a component-wise less-than comparison between this an another 4D SIMD scalar. More... | |
SIMDArray< Int32, width > | operator< (const Float32 value) const |
Perform a component-wise less-than comparison between this 4D SIMD scalar and an expanded scalar. More... | |
SIMDArray< Int32, width > | operator> (const SIMDArray &scalar) const |
Perform a component-wise greater-than comparison between this an another 4D SIMD scalar. More... | |
SIMDArray< Int32, width > | operator> (const Float32 value) const |
Perform a component-wise greater-than comparison between this 4D SIMD scalar and an expanded scalar. More... | |
SIMDArray< Int32, width > | operator<= (const SIMDArray &scalar) const |
Perform a component-wise less-than-or-equal-to comparison between this an another 4D SIMD scalar. More... | |
SIMDArray< Int32, width > | operator<= (const Float32 value) const |
Perform a component-wise less-than-or-equal-to comparison between this 4D SIMD scalar and an expanded scalar. More... | |
SIMDArray< Int32, width > | operator>= (const SIMDArray &scalar) const |
Perform a component-wise greater-than-or-equal-to comparison between this an another 4D SIMD scalar. More... | |
SIMDArray< Int32, width > | operator>= (const Float32 value) const |
Perform a component-wise greater-than-or-equal-to comparison between this 4D SIMD scalar and an expanded scalar. More... | |
SIMDArray | operator- () const |
Negate a scalar. More... | |
SIMDArray | operator+ (const SIMDArray &scalar) const |
Add this scalar to another and return the result. More... | |
SIMDArray | operator+ (const Float32 value) const |
Add a value to every component of this scalar. More... | |
SIMDArray | operator- (const SIMDArray &scalar) const |
Subtract a scalar from this scalar component-wise and return the result. More... | |
SIMDArray | operator- (const Float32 value) const |
Subtract a value from every component of this scalar. More... | |
SIMDArray | operator* (const SIMDArray &scalar) const |
Multiply component-wise this scalar and another scalar. More... | |
SIMDArray | operator* (const Float32 value) const |
Multiply every component of this scalar by a value and return the result. More... | |
SIMDArray | operator/ (const SIMDArray &scalar) const |
Divide this scalar by another scalar component-wise. More... | |
SIMDArray | operator/ (const Float32 value) const |
Divide every component of this scalar by a value and return the result. More... | |
SIMDArray & | operator+= (const SIMDArray &scalar) |
Add a scalar to this scalar, modifying this original scalar. More... | |
SIMDArray & | operator-= (const SIMDArray &scalar) |
Subtract a scalar from this scalar, modifying this original scalar. More... | |
SIMDArray & | operator*= (const SIMDArray &scalar) |
Multiply component-wise this scalar and another scalar and modify this scalar. More... | |
SIMDArray & | operator/= (const SIMDArray &scalar) |
Divide this scalar by another scalar component-wise and modify this scalar. More... | |
data::String | toString () const |
Convert this SIMD array into a human-readable string representation. More... | |
operator data::String () const | |
Convert this SIMD array into a human-readable string representation. More... | |
Static Public Member Functions | |
static SIMDArray | load (const Float32 *array) |
Load a SIMD array from the specified aligned pointer to values. More... | |
static SIMDArray | loadUnaligned (const Float32 *array) |
Load a SIMD array from the specified unaligned pointer to values. More... | |
static Size | getWidth () |
Get the width of this scalar (number of components it has). More... | |
static Size | getAlignment () |
Return the alignment required for objects of this type. More... | |
Friends | |
template<Size width2> | |
SIMDArray< Float32, width2 > | abs (const SIMDArray< Float32, width2 > &scalar) |
template<Size width2> | |
SIMDArray< Float32, width2 > | ceiling (const SIMDArray< Float32, width2 > &scalar) |
template<Size width2> | |
SIMDArray< Float32, width2 > | floor (const SIMDArray< Float32, width2 > &scalar) |
template<Size width2> | |
SIMDArray< Float32, width2 > | sqrt (const SIMDArray< Float32, width2 > &scalar) |
template<Size width2> | |
SIMDArray< Float32, width2 > | min (const SIMDArray< Float32, width2 > &scalar1, const SIMDArray< Float32, width2 > &scalar2) |
template<Size width2> | |
SIMDArray< Float32, width2 > | max (const SIMDArray< Float32, width2 > &scalar1, const SIMDArray< Float32, width2 > &scalar2) |
template<Size width2> | |
SIMDArray< Float32, width2 > | select (const SIMDArray< Int32, width2 > &selector, const SIMDArray< Float32, width2 > &scalar1, const SIMDArray< Float32, width2 > &scalar2) |
template<Size width2> | |
SIMDArray< Float32, width2 > | ln (const SIMDArray< Float32, width2 > &scalar) |
template<Size width2> | |
SIMDArray< Float32, width2 > | log10 (const SIMDArray< Float32, width2 > &scalar) |
template<Size width2> | |
SIMDArray< Float32, width2 > | sin (const SIMDArray< Float32, width2 > &scalar) |
template<Size width2> | |
SIMDArray< Float32, width2 > | cos (const SIMDArray< Float32, width2 > &scalar) |
A class representing an N-component 32-bit floating-point SIMD scalar.
This specialization of the SIMDScalar class uses one or more 4-component SIMD values to simulate an N-wide SIMD register.
|
inline |
Create a new SIMD scalar with all elements left uninitialized.
|
inline |
Create a new SIMD scalar with all elements equal to the specified value.
|
inlineexplicit |
Create a new SIMD scalar from the first N values stored at specified pointer's location.
|
inlinestatic |
Load a SIMD array from the specified aligned pointer to values.
|
inlinestatic |
Load a SIMD array from the specified unaligned pointer to values.
|
inline |
Return the horizontal sum of all components of this SIMD scalar.
|
inline |
Store this SIMD scalar starting at the specified aligned destination pointer.
|
inline |
Store this SIMD scalar starting at the specified unaligned destination pointer.
|
inline |
Get a reference to the value stored at the specified component index in this scalar.
|
inline |
Get the value stored at the specified component index in this scalar.
|
inline |
Get a pointer to the first element in this scalar.
The remaining values are in the next 3 locations after the first element.
|
inlinestatic |
Get the width of this scalar (number of components it has).
|
inline |
Compare two 4D SIMD scalars component-wise for equality.
Return a 4D scalar of booleans indicating the result of the comparison. If each corresponding pair of components is equal, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Compare this scalar to a single floating point value for equality.
Return a 4D scalar of booleans indicating the result of the comparison. The float value is expanded to a 4-wide SIMD scalar and compared with this scalar. If each corresponding pair of components is equal, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Compare two 4D SIMD scalars component-wise for inequality.
Return a 4D scalar of booleans indicating the result of the comparison. If each corresponding pair of components is not equal, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Compare this scalar to a single floating point value for inequality.
Return a 4D scalar of booleans indicating the result of the comparison. The float value is expanded to a 4-wide SIMD scalar and compared with this scalar. If each corresponding pair of components is not equal, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Perform a component-wise less-than comparison between this an another 4D SIMD scalar.
Return a 4D scalar of booleans indicating the result of the comparison. If each corresponding pair of components has this scalar's component less than the other scalar's component, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Perform a component-wise less-than comparison between this 4D SIMD scalar and an expanded scalar.
Return a 4D scalar of booleans indicating the result of the comparison. The float value is expanded to a 4-wide SIMD scalar and compared with this scalar. If each corresponding pair of components has this scalar's component less than the other scalar's component, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Perform a component-wise greater-than comparison between this an another 4D SIMD scalar.
Return a 4D scalar of booleans indicating the result of the comparison. If each corresponding pair of components has this scalar's component greater than the other scalar's component, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Perform a component-wise greater-than comparison between this 4D SIMD scalar and an expanded scalar.
Return a 4D scalar of integers indicating the result of the comparison. The float value is expanded to a 4-wide SIMD scalar and compared with this scalar. If each corresponding pair of components has this scalar's component greater than the other scalar's component, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Perform a component-wise less-than-or-equal-to comparison between this an another 4D SIMD scalar.
Return a 4D scalar of integers indicating the result of the comparison. If each corresponding pair of components has this scalar's component less than or equal to the other scalar's component, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Perform a component-wise less-than-or-equal-to comparison between this 4D SIMD scalar and an expanded scalar.
Return a 4D scalar of integers indicating the result of the comparison. The float value is expanded to a 4-wide SIMD scalar and compared with this scalar. If each corresponding pair of components has this scalar's component less than or equal to the other scalar's component, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Perform a component-wise greater-than-or-equal-to comparison between this an another 4D SIMD scalar.
Return a 4D scalar of integers indicating the result of the comparison. If each corresponding pair of components has this scalar's component greater than or equal to the other scalar's component, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Perform a component-wise greater-than-or-equal-to comparison between this 4D SIMD scalar and an expanded scalar.
Return a 4D scalar of integers indicating the result of the comparison. The float value is expanded to a 4-wide SIMD scalar and compared with this scalar. If each corresponding pair of components has this scalar's component greater than or equal to the other scalar's component, the corresponding result component is non-zero. Otherwise, that result component is equal to zero.
|
inline |
Negate a scalar.
This method negates every component of this 4D SIMD scalar and returns the result, leaving this scalar unmodified.
|
inline |
Add this scalar to another and return the result.
This method adds another scalar to this one, component-wise, and returns this addition. It does not modify either of the original scalars.
scalar | - The scalar to add to this one. |
|
inline |
Add a value to every component of this scalar.
This method adds the value parameter to every component of the scalar, and returns a scalar representing this result. It does not modifiy the original scalar.
value | - The value to add to all components of this scalar. |
|
inline |
Subtract a scalar from this scalar component-wise and return the result.
This method subtracts another scalar from this one, component-wise, and returns this subtraction. It does not modify either of the original scalars.
scalar | - The scalar to subtract from this one. |
|
inline |
Subtract a value from every component of this scalar.
This method subtracts the value parameter from every component of the scalar, and returns a scalar representing this result. It does not modifiy the original scalar.
value | - The value to subtract from all components of this scalar. |
|
inline |
Multiply component-wise this scalar and another scalar.
This operator multiplies each component of this scalar by the corresponding component of the other scalar and returns a scalar representing this result. It does not modify either original scalar.
scalar | - The scalar to multiply this scalar by. |
|
inline |
Multiply every component of this scalar by a value and return the result.
This method multiplies the value parameter with every component of the scalar, and returns a scalar representing this result. It does not modifiy the original scalar.
value | - The value to multiplly with all components of this scalar. |
|
inline |
Divide this scalar by another scalar component-wise.
This operator divides each component of this scalar by the corresponding component of the other scalar and returns a scalar representing this result. It does not modify either original scalar.
scalar | - The scalar to multiply this scalar by. |
|
inline |
Divide every component of this scalar by a value and return the result.
This method Divides every component of the scalar by the value parameter, and returns a scalar representing this result. It does not modifiy the original scalar.
value | - The value to divide all components of this scalar by. |
|
inline |
Add a scalar to this scalar, modifying this original scalar.
This method adds another scalar to this scalar, component-wise, and sets this scalar to have the result of this addition.
scalar | - The scalar to add to this scalar. |
|
inline |
Subtract a scalar from this scalar, modifying this original scalar.
This method subtracts another scalar from this scalar, component-wise, and sets this scalar to have the result of this subtraction.
scalar | - The scalar to subtract from this scalar. |
|
inline |
Multiply component-wise this scalar and another scalar and modify this scalar.
This operator multiplies each component of this scalar by the corresponding component of the other scalar and modifies this scalar to contain the result.
scalar | - The scalar to multiply this scalar by. |
|
inline |
Divide this scalar by another scalar component-wise and modify this scalar.
This operator divides each component of this scalar by the corresponding component of the other scalar and modifies this scalar to contain the result.
scalar | - The scalar to divide this scalar by. |
|
inlinestatic |
Return the alignment required for objects of this type.
For most SIMD types this value will be 16 bytes. If there is no alignment required, 0 is returned.
|
inline |
Convert this SIMD array into a human-readable string representation.
|
inline |
Convert this SIMD array into a human-readable string representation.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |