Om
1.0.0
A universal framework for multimedia simulation
|
A class representing an N-component 32-bit signed-integer SIMD scalar. More...
#include <omSIMDArrayInt32.h>
Public Member Functions | |
SIMDArray () | |
Create a new SIMD scalar with all elements left uninitialized. More... | |
SIMDArray (Int32 value) | |
Create a new SIMD scalar with all elements equal to the specified value. More... | |
SIMDArray (const Int32 *array) | |
Create a new SIMD scalar from the first N values stored at specified pointer's location. More... | |
void | store (Int32 *destination) const |
Store this SIMD scalar starting at the specified destination pointer. More... | |
void | storeUnaligned (Int32 *destination) const |
Store this SIMD scalar starting at the specified unaligned destination pointer. More... | |
Int32 & | operator[] (Index i) |
Get a reference to the value stored at the specified component index in this scalar. More... | |
Int32 | operator[] (Index i) const |
Get the value stored at the specified component index in this scalar. More... | |
const Int32 * | toArray () const |
Get a pointer to the first element in this scalar. More... | |
operator Bool () const | |
Return whether or not any component of this array has the high-order bit set. More... | |
Bool | testMaskAny () const |
Return whether or not any component of this array has the high-order bit set. More... | |
Bool | testMaskAll () const |
Return whether or not all components of this array have the high-order bit set. More... | |
SIMDArray | operator~ () const |
Return the bitwise NOT of this 4D SIMD vector. More... | |
SIMDArray | operator& (const SIMDArray &scalar) const |
Compute the bitwise AND of this 4D SIMD vector with another and return the result. More... | |
SIMDArray | operator| (const SIMDArray &scalar) const |
Compute the bitwise OR of this 4D SIMD vector with another and return the result. More... | |
SIMDArray | operator^ (const SIMDArray &scalar) const |
Compute the bitwise XOR of this 4D SIMD vector with another and return the result. More... | |
SIMDArray & | operator&= (const SIMDArray &scalar) |
Compute the logical AND of this 4D SIMD vector with another and assign it to this vector. More... | |
SIMDArray & | operator|= (const SIMDArray &scalar) |
Compute the logical OR of this 4D SIMD vector with another and assign it to this vector. More... | |
SIMDArray & | operator^= (const SIMDArray &scalar) |
Compute the bitwise XOR of this 4D SIMD vector with another and assign it to this vector. More... | |
SIMDArray< Int32, width > | operator== (const SIMDArray &scalar) const |
Compare two 4D SIMD scalars component-wise for equality. More... | |
SIMDArray< Int32, width > | operator== (const Int32 value) const |
Compare this scalar to a single 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 Int32 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 Int32 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 Int32 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 Int32 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 Int32 value) const |
Perform a component-wise greater-than-or-equal-to comparison between this 4D SIMD scalar and an expanded scalar. More... | |
SIMDArray | operator<< (Int bitShift) const |
Shift each component of the SIMD scalar to the left by the specified amount of bits. More... | |
SIMDArray | operator>> (Int bitShift) const |
Shift each component of the SIMD scalar to the right by the specified amount of bits. 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 Int32 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 Int32 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 Int32 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 Int32 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 Int32 *array) |
Load a SIMD array from the specified aligned pointer to values. More... | |
static SIMDArray | loadUnaligned (const Int32 *array) |
Load a SIMD array from the specified unaligned pointer to values. More... | |
static Size | getAlignment () |
Return the alignment required for objects of this type. More... | |
static Size | getWidth () |
Get the width of this scalar (number of components it has). More... | |
Friends | |
template<Size width2> | |
SIMDArray< Int32, width2 > | abs (const SIMDArray< Int32, width2 > &scalar) |
template<Size width2> | |
SIMDArray< Int32, width2 > | sqrt (const SIMDArray< Int32, width2 > &scalar) |
template<Size width2> | |
SIMDArray< Int32, width2 > | min (const SIMDArray< Int32, width2 > &scalar1, const SIMDArray< Int32, width2 > &scalar2) |
template<Size width2> | |
SIMDArray< Int32, width2 > | max (const SIMDArray< Int32, width2 > &scalar1, const SIMDArray< Int32, width2 > &scalar2) |
template<Size width2> | |
SIMDArray< Int32, width2 > | select (const SIMDArray< Int32, width2 > &selector, const SIMDArray< Int32, width2 > &scalar1, const SIMDArray< Int32, width2 > &scalar2) |
template<Size width2> | |
SIMDArray< Float32, width2 > | select (const SIMDArray< Int32, width2 > &selector, const SIMDArray< Float32, width2 > &scalar1, const SIMDArray< Float32, width2 > &scalar2) |
A class representing an N-component 32-bit signed-integer 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.
|
inline |
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 |
Store this SIMD scalar starting at the specified 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.
|
inline |
Return whether or not any component of this array has the high-order bit set.
|
inline |
Return whether or not any component of this array has the high-order bit set.
|
inline |
Return whether or not all components of this array have the high-order bit set.
|
inline |
Return the bitwise NOT of this 4D SIMD vector.
|
inline |
Compute the bitwise AND of this 4D SIMD vector with another and return the result.
|
inline |
Compute the bitwise OR of this 4D SIMD vector with another and return the result.
|
inline |
Compute the bitwise XOR of this 4D SIMD vector with another and return the result.
|
inline |
Compute the logical AND of this 4D SIMD vector with another and assign it to this vector.
|
inline |
Compute the logical OR of this 4D SIMD vector with another and assign it to this vector.
|
inline |
Compute the bitwise XOR of this 4D SIMD vector with another and assign it to this vector.
|
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 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 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 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 booleans 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 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 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 booleans 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 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 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 |
Shift each component of the SIMD scalar to the left by the specified amount of bits.
This method shifts the contents of each component to the left by the specified amount of bits and inserts zeros.
bitShift | - the number of bits to shift this SIMD scalar by. |
|
inline |
Shift each component of the SIMD scalar to the right by the specified amount of bits.
This method shifts the contents of each component to the right by the specified amount of bits and sign extends the original values..
bitShift | - the number of bits to shift this SIMD scalar by. |
|
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.
|
inlinestatic |
Get the width of this scalar (number of components it has).
|
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 |