Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
om::math::SIMDVector3D< T, 4 > Class Template Reference

A class that represents a set of 3D vectors stored in a SIMD-compatible format. More...

#include <omSIMDVector3D.h>

Public Member Functions

 SIMDVector3D ()
 Create a quad 3D SIMD vector with all vector components equal to zero. More...
 
 SIMDVector3D (const VectorND< T, 3 > &vector)
 Create a quad 3D SIMD vector with all of the four vectors equal to the specified vector. More...
 
 SIMDVector3D (const VectorND< T, 3 > &v1, const VectorND< T, 3 > &v2, const VectorND< T, 3 > &v3, const VectorND< T, 3 > &v4)
 Create a quad 3D SIMD vector with each of the four vectors equal to the specified vector. More...
 
 SIMDVector3D (const SIMDScalar< T, 4 > &newX, const SIMDScalar< T, 4 > &newY, const SIMDScalar< T, 4 > &newZ)
 Create a quad 3D SIMD vector with the specified X, Y, and Z SIMDScalars. More...
 
SIMDScalar< T, 4 > getMagnitude () const
 Return the 4-component SIMD scalar magnitude of this quad SIMD 3D vector. More...
 
SIMDScalar< T, 4 > getMagnitudeSquared () const
 Return the 4-component SIMD scalar squared magnitude of this quad SIMD 3D vector. More...
 
SIMDVector3D normalize () const
 Return a normalized copy of this quad SIMD 3D vector. More...
 
SIMDVector3D operator+ (const SIMDVector3D &other) const
 Compute and return the component-wise sum of this quad SIMD 3D vector with another. More...
 
SIMDVector3D operator+ (const SIMDScalar< T, 4 > &quadScalar) const
 Compute and return the component-wise sum of this quad SIMD 3D vector with a quad SIMD scalar. More...
 
SIMDVector3D operator- (const SIMDVector3D &other) const
 Compute and return the component-wise difference of this quad SIMD 3D vector with another. More...
 
SIMDVector3D operator- (const SIMDScalar< T, 4 > &quadScalar) const
 Compute and return the component-wise difference of this quad SIMD 3D vector with a quad SIMD scalar. More...
 
SIMDVector3D operator* (const SIMDVector3D &other) const
 Compute and return the component-wise multiplication of this quad SIMD 3D vector with another. More...
 
SIMDVector3D operator* (const SIMDScalar< T, 4 > &quadScalar) const
 Compute and return the component-wise multiplication of this quad SIMD 3D vector with a quad SIMD scalar. More...
 
SIMDVector3D operator/ (const SIMDScalar< T, 4 > &quadScalar) const
 Compute and return the component-wise quotient of this quad SIMD 3D vector divided by a quad SIMD scalar. More...
 
SIMDVector3Doperator+= (const SIMDVector3D &other) const
 Compute the component-wise sum of this quad SIMD 3D vector with another and assign it to this vector. More...
 
SIMDVector3Doperator+= (const SIMDScalar< T, 4 > &quadScalar) const
 Compute the component-wise sum of this quad SIMD 3D vector with a quad SIMD scalar and assign it to this vector. More...
 
SIMDVector3Doperator-= (const SIMDVector3D &other) const
 Compute the component-wise difference of this quad SIMD 3D vector with another and assign it to this vector. More...
 
SIMDVector3Doperator-= (const SIMDScalar< T, 4 > &quadScalar) const
 Compute the component-wise difference of this quad SIMD 3D vector with a quad SIMD scalar and assign it to this vector. More...
 
SIMDVector3Doperator*= (const SIMDVector3D &other) const
 Compute the component-wise multiplication of this quad SIMD 3D vector with another and assign it to this vector. More...
 
SIMDVector3Doperator*= (const SIMDScalar< T, 4 > &quadScalar) const
 Compute the component-wise multiplication of this quad SIMD 3D vector with a quad SIMD scalar and assign it to this vector. More...
 
SIMDVector3Doperator/= (const SIMDScalar< T, 4 > &quadScalar) const
 Compute the component-wise quotient of this quad SIMD 3D vector divided by a quad SIMD scalar and assign it to this vector. More...
 

Static Public Member Functions

static Size getAlignment ()
 Return the alignment required for objects of this type. More...
 
static Size getWidth ()
 Get the width of this vector (number of 3D vectors it has). More...
 

Public Attributes

SIMDScalar< T, 4 > x
 The X component vector of this SIMDVector3D. More...
 
SIMDScalar< T, 4 > y
 The X component vector of this SIMDVector3D. More...
 
SIMDScalar< T, 4 > z
 The X component vector of this SIMDVector3D. More...
 

Detailed Description

template<typename T>
class om::math::SIMDVector3D< T, 4 >

A class that represents a set of 3D vectors stored in a SIMD-compatible format.

This class is used to store and operate on a set of 3D vectors in a SIMD fashion. The vectors are stored in a structure-of-arrays format that accelerates SIMD operations.

Constructor & Destructor Documentation

template<typename T >
om::math::SIMDVector3D< T, 4 >::SIMDVector3D ( )
inline

Create a quad 3D SIMD vector with all vector components equal to zero.

template<typename T >
om::math::SIMDVector3D< T, 4 >::SIMDVector3D ( const VectorND< T, 3 > &  vector)
inline

Create a quad 3D SIMD vector with all of the four vectors equal to the specified vector.

template<typename T >
om::math::SIMDVector3D< T, 4 >::SIMDVector3D ( const VectorND< T, 3 > &  v1,
const VectorND< T, 3 > &  v2,
const VectorND< T, 3 > &  v3,
const VectorND< T, 3 > &  v4 
)
inline

Create a quad 3D SIMD vector with each of the four vectors equal to the specified vector.

template<typename T >
om::math::SIMDVector3D< T, 4 >::SIMDVector3D ( const SIMDScalar< T, 4 > &  newX,
const SIMDScalar< T, 4 > &  newY,
const SIMDScalar< T, 4 > &  newZ 
)
inline

Create a quad 3D SIMD vector with the specified X, Y, and Z SIMDScalars.

Member Function Documentation

template<typename T >
SIMDScalar<T,4> om::math::SIMDVector3D< T, 4 >::getMagnitude ( ) const
inline

Return the 4-component SIMD scalar magnitude of this quad SIMD 3D vector.

template<typename T >
SIMDScalar<T,4> om::math::SIMDVector3D< T, 4 >::getMagnitudeSquared ( ) const
inline

Return the 4-component SIMD scalar squared magnitude of this quad SIMD 3D vector.

template<typename T >
SIMDVector3D om::math::SIMDVector3D< T, 4 >::normalize ( ) const
inline

Return a normalized copy of this quad SIMD 3D vector.

template<typename T >
SIMDVector3D om::math::SIMDVector3D< T, 4 >::operator+ ( const SIMDVector3D< T, 4 > &  other) const
inline

Compute and return the component-wise sum of this quad SIMD 3D vector with another.

template<typename T >
SIMDVector3D om::math::SIMDVector3D< T, 4 >::operator+ ( const SIMDScalar< T, 4 > &  quadScalar) const
inline

Compute and return the component-wise sum of this quad SIMD 3D vector with a quad SIMD scalar.

template<typename T >
SIMDVector3D om::math::SIMDVector3D< T, 4 >::operator- ( const SIMDVector3D< T, 4 > &  other) const
inline

Compute and return the component-wise difference of this quad SIMD 3D vector with another.

template<typename T >
SIMDVector3D om::math::SIMDVector3D< T, 4 >::operator- ( const SIMDScalar< T, 4 > &  quadScalar) const
inline

Compute and return the component-wise difference of this quad SIMD 3D vector with a quad SIMD scalar.

template<typename T >
SIMDVector3D om::math::SIMDVector3D< T, 4 >::operator* ( const SIMDVector3D< T, 4 > &  other) const
inline

Compute and return the component-wise multiplication of this quad SIMD 3D vector with another.

template<typename T >
SIMDVector3D om::math::SIMDVector3D< T, 4 >::operator* ( const SIMDScalar< T, 4 > &  quadScalar) const
inline

Compute and return the component-wise multiplication of this quad SIMD 3D vector with a quad SIMD scalar.

template<typename T >
SIMDVector3D om::math::SIMDVector3D< T, 4 >::operator/ ( const SIMDScalar< T, 4 > &  quadScalar) const
inline

Compute and return the component-wise quotient of this quad SIMD 3D vector divided by a quad SIMD scalar.

template<typename T >
SIMDVector3D& om::math::SIMDVector3D< T, 4 >::operator+= ( const SIMDVector3D< T, 4 > &  other) const
inline

Compute the component-wise sum of this quad SIMD 3D vector with another and assign it to this vector.

template<typename T >
SIMDVector3D& om::math::SIMDVector3D< T, 4 >::operator+= ( const SIMDScalar< T, 4 > &  quadScalar) const
inline

Compute the component-wise sum of this quad SIMD 3D vector with a quad SIMD scalar and assign it to this vector.

template<typename T >
SIMDVector3D& om::math::SIMDVector3D< T, 4 >::operator-= ( const SIMDVector3D< T, 4 > &  other) const
inline

Compute the component-wise difference of this quad SIMD 3D vector with another and assign it to this vector.

template<typename T >
SIMDVector3D& om::math::SIMDVector3D< T, 4 >::operator-= ( const SIMDScalar< T, 4 > &  quadScalar) const
inline

Compute the component-wise difference of this quad SIMD 3D vector with a quad SIMD scalar and assign it to this vector.

template<typename T >
SIMDVector3D& om::math::SIMDVector3D< T, 4 >::operator*= ( const SIMDVector3D< T, 4 > &  other) const
inline

Compute the component-wise multiplication of this quad SIMD 3D vector with another and assign it to this vector.

template<typename T >
SIMDVector3D& om::math::SIMDVector3D< T, 4 >::operator*= ( const SIMDScalar< T, 4 > &  quadScalar) const
inline

Compute the component-wise multiplication of this quad SIMD 3D vector with a quad SIMD scalar and assign it to this vector.

template<typename T >
SIMDVector3D& om::math::SIMDVector3D< T, 4 >::operator/= ( const SIMDScalar< T, 4 > &  quadScalar) const
inline

Compute the component-wise quotient of this quad SIMD 3D vector divided by a quad SIMD scalar and assign it to this vector.

template<typename T >
static Size om::math::SIMDVector3D< T, 4 >::getAlignment ( )
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.

template<typename T >
static Size om::math::SIMDVector3D< T, 4 >::getWidth ( )
inlinestatic

Get the width of this vector (number of 3D vectors it has).

Member Data Documentation

template<typename T >
SIMDScalar<T,4> om::math::SIMDVector3D< T, 4 >::x

The X component vector of this SIMDVector3D.

template<typename T >
SIMDScalar<T,4> om::math::SIMDVector3D< T, 4 >::y

The X component vector of this SIMDVector3D.

template<typename T >
SIMDScalar<T,4> om::math::SIMDVector3D< T, 4 >::z

The X component vector of this SIMDVector3D.


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