Vectorized vector.
More...
#include <VVector.hpp>
List of all members.
Public Types
Public Member Functions
-
VVector ()
- Default constructor.
-
void set (const value &s)
- Set with all vector elements set to the same scalar value.
-
VVector (const VVector &V)
- Copy constructor.
-
template<class T > VVector (const Eagle::Vector< T, N > &V)
- Construct vectorized vector from usual vector of another type.
-
template<class T > VVector (const VVector< N, T > &V)
- Construct vectorized vector from another vectorized vector of another type.
-
VVector (const MixedVector_t &MV)
- Upcast constructor.
-
Eagle::Assignment< Vector_t, 0 > operator= (const value &x)
- Allow assignment per comma operator.
|
|
-
const Vector_t & vec () const
- Access the vectorized vector as an usual vector.
-
Vector_t & vec ()
- Access the vectorized vector as an usual vector.
-
const VVector & vvec () const
- Return the type itself. Useful for base class access in derived classes.
-
VVector & vvec ()
- Return the type itself. Useful for base class access in derived classes.
-
value & operator[] (int i)
- Array operator.
-
const value & operator[] (int i) const
- Array operator.
-
value * ptr (int i=0)
- get actual data storage
-
const value * ptr (int i=0) const
- get actual data storage
-
const value * const_ptr (int i=0) const
- get actual data storage
|
|
-
VVector (const VVector &A, const value &V, const Mult &)
-
VVector (const VVector &A, const value &V, const Div &)
-
VVector (const VVector &L, const VVector &R, const Add &)
-
VVector (const VVector &L, const VVector &R, const Sub &)
-
VVector (const VVector &L, const Sub &)
|
|
Friends
|
|
Detailed Description
template<int N, class value>
class VVector< N, value >
Vectorized vector.
This vector class looks like a usual Vector<>, but splits up its data storage into a vectorized and unvectorized part. The VectorizationTrait<> class tells how many value types may be agglomerated, and which rest needs to be handled manually. This is (of course ;-) ) decided at compile time. For instance, a VVector<4,float> is reduced to a single F32vec4 on an Intel CPU, such that aritmethic operations are casted single CPU instruction.
Note that there is no SIZE member in the vectorized vector, because it may lead to confusion on whether it refers to the number of agglomeration or atomic elements. Use the Vector_t::SIZE to get the number of atomic elements, and inspect the MixedVector_t for getting information about the agglomeration.
A generic way to get the number of atomic elements is also to employ the FiberInfo<> type trait and to inspect FiberInfo<VVector<> >MULTIPLICITY, where the argument may be a VVector or any other type.
- See also:
- Vector
- Examples:
-
InterpolatedVectorDerivative.cpp, NumericalGeodesics3D.cpp, and NumericalGeodesics4D.cpp.
Member Typedef Documentation
template<int N, class value>
The result of mixing an aligned vector with an unaligned vector.
It may be a pure aligned vector (vectorized), a pure unaligned vector (no vectorization), or a partially vectorized and partially un-vectorized vector.