Public Types | Public Member Functions

VVector< N, value > Class Template Reference
[Small constant-size homogeneous structures]

Vectorized vector. More...

#include <VVector.hpp>

List of all members.

Public Types

Public Member Functions

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>
typedef MixedVector< GrandMacOsGCCDivisionCalculator<N,VectorizationTrait<value>::N>::result, typename VectorizationTrait<value>::vectorized_t, N%VectorizationTrait<value>::N, value >::result VVector< N, value >::MixedVector_t

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.