blitz
Version 1.0.2
|
The TinyVector class is a one-dimensional, fixed length vector that implements the blitz expression template machinery. More...
#include <et-forward.h>
Public Types | |
typedef P_numtype | T_numtype |
typedef TinyVector< T_numtype, N_length > | T_vector |
typedef FastTV2Iterator< T_numtype, N_length > | T_iterator |
typedef T_numtype * | iterator |
typedef const T_numtype * | const_iterator |
typedef FastTV2CopyIterator< P_numtype, N_length > | T_range_result |
![]() | |
typedef TinyVector< P_numtype, N_length > | T_unwrapped |
Public Member Functions | |
TinyVector () | |
~TinyVector () | |
TinyVector (const TinyVector< T_numtype, N_length > &x) | |
template<typename T_numtype2 > | |
TinyVector (const TinyVector< T_numtype2, N_length > &x) | |
template<typename T_expr > | |
TinyVector (const ETBase< T_expr > &expr) | |
This constructor creates a TinyVector from another ETBase object. More... | |
template<typename T_expr > | |
TinyVector (const _bz_ArrayExpr< T_expr > &expr) | |
This constructor creates a TinyVector specifically from an expression. More... | |
TinyVector (const T_numtype initValue) | |
TinyVector (const T_numtype x[]) | |
TinyVector (T_numtype x0, T_numtype x1) | |
TinyVector (T_numtype x0, T_numtype x1, T_numtype x2) | |
TinyVector (T_numtype x0, T_numtype x1, T_numtype x2, T_numtype x3) | |
TinyVector (T_numtype x0, T_numtype x1, T_numtype x2, T_numtype x3, T_numtype x4) | |
TinyVector (T_numtype x0, T_numtype x1, T_numtype x2, T_numtype x3, T_numtype x4, T_numtype x5) | |
TinyVector (T_numtype x0, T_numtype x1, T_numtype x2, T_numtype x3, T_numtype x4, T_numtype x5, T_numtype x6) | |
TinyVector (T_numtype x0, T_numtype x1, T_numtype x2, T_numtype x3, T_numtype x4, T_numtype x5, T_numtype x6, T_numtype x7) | |
TinyVector (T_numtype x0, T_numtype x1, T_numtype x2, T_numtype x3, T_numtype x4, T_numtype x5, T_numtype x6, T_numtype x7, T_numtype x8) | |
TinyVector (T_numtype x0, T_numtype x1, T_numtype x2, T_numtype x3, T_numtype x4, T_numtype x5, T_numtype x6, T_numtype x7, T_numtype x8, T_numtype x9) | |
TinyVector (T_numtype x0, T_numtype x1, T_numtype x2, T_numtype x3, T_numtype x4, T_numtype x5, T_numtype x6, T_numtype x7, T_numtype x8, T_numtype x9, T_numtype x10) | |
T_iterator | beginFast () const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
T_numtype *restrict | data () |
const T_numtype *restrict | data () const |
T_numtype *restrict | dataFirst () |
const T_numtype *restrict | dataFirst () const |
const TinyVector< int, rank_ > | shape () const |
template<typename P_expr , typename P_updater > | |
void | _bz_assign (P_expr, P_updater) |
T_numtype | operator* () const |
T_vector & | noConst () const |
const T_numtype & | operator() (unsigned i) const |
T_numtype &restrict | operator() (unsigned i) |
T_numtype | operator() (TinyVector< int, 1 > i) const |
template<int N0> | |
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_vector >::T_expr, N0 > > | operator() (IndexPlaceholder< N0 >) const |
const T_numtype & | operator[] (unsigned i) const |
T_numtype &restrict | operator[] (unsigned i) |
const T_numtype & | fastRead (diffType i) const |
bool | isVectorAligned (diffType offset) const |
Since data_ is simd aligned by construction, we just have to check the offest. More... | |
bool | canCollapse (int outerLoopRank, int innerLoopRank) const |
ListInitializationSwitch< T_vector, T_numtype * > | operator= (T_numtype x) |
T_vector & | initialize (T_numtype) |
template<typename T_expr > | |
T_vector & | operator= (const ETBase< T_expr > &) |
template<typename T > | |
T_vector & | operator+= (const T &) |
template<typename T > | |
T_vector & | operator-= (const T &) |
template<typename T > | |
T_vector & | operator*= (const T &) |
template<typename T > | |
T_vector & | operator/= (const T &) |
template<typename T > | |
T_vector & | operator%= (const T &) |
template<typename T > | |
T_vector & | operator^= (const T &) |
template<typename T > | |
T_vector & | operator&= (const T &) |
template<typename T > | |
T_vector & | operator|= (const T &) |
template<typename T > | |
T_vector & | operator>>= (const T &) |
template<typename T > | |
T_vector & | operator<<= (const T &) |
T_numtype *restrict | getInitializationIterator () |
template<typename T_expr , typename T_update > | |
_bz_forceinline void | _tv_evaluate (const T_expr &expr, T_update) |
This function selects evaluation path by calling select_evaluation with a bool argument which is false if the expression only contains TinyVector operands. More... | |
![]() | |
ETBase () | |
ETBase (const ETBase< TinyVector< P_numtype, N_length > > &) | |
TinyVector< P_numtype, N_length > & | unwrap () |
const TinyVector< P_numtype, N_length > & | unwrap () const |
ETBase< TinyVector< P_numtype, N_length > > & | wrap () |
const ETBase< TinyVector< P_numtype, N_length > > & | wrap () const |
Static Public Member Functions | |
static int | base () |
static int | base (int rank) |
static int | dimensions () |
static int | lbound (int rank) |
static int | lbound () |
static int | length (int rank) |
static int | length () |
static int | extent (int rank) |
static int | ordering (int storageRankIndex) |
static int | ordering () |
static int | rank () |
static sizeType | numElements () |
static diffType | stride () |
static diffType | stride (int rank) |
static int | ubound (int rank) |
static int | ubound () |
static bool | lengthCheck (unsigned i) |
Static Public Attributes | |
static const int | rank_ = 1 |
Private Member Functions | |
template<typename T_expr , typename T_update > | |
void | _tv_evaluate (const T_expr &expr, T_update) |
The TinyVector class is a one-dimensional, fixed length vector that implements the blitz expression template machinery.
TinyVector-only expressions are very fast because they usually get reduced to just the unrolled (and vectorized, if enabled) assembly instructions. TinyVectors can also be used in mixed expressions with other ET classes.
typedef const T_numtype* blitz::TinyVector< P_numtype, N_length >::const_iterator |
typedef T_numtype* blitz::TinyVector< P_numtype, N_length >::iterator |
typedef FastTV2Iterator<T_numtype,N_length> blitz::TinyVector< P_numtype, N_length >::T_iterator |
typedef P_numtype blitz::TinyVector< P_numtype, N_length >::T_numtype |
typedef FastTV2CopyIterator<P_numtype, N_length> blitz::TinyVector< P_numtype, N_length >::T_range_result |
typedef TinyVector<T_numtype,N_length> blitz::TinyVector< P_numtype, N_length >::T_vector |
|
inline |
|
inline |
blitz::TinyVector< P_numtype, N_length >::TinyVector | ( | const TinyVector< T_numtype, N_length > & | x | ) |
blitz::TinyVector< P_numtype, N_length >::TinyVector | ( | const TinyVector< T_numtype2, N_length > & | x | ) |
|
inlineexplicit |
This constructor creates a TinyVector from another ETBase object.
It needs to be explicit to avoid all kinds of ambiguities.
|
inline |
This constructor creates a TinyVector specifically from an expression.
This one we do NOT want to be explicit because that breaks simple construction assignments like "TinyVector<double, 1> v = a+b;", forcing the user to explicitly write it like a construction.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void blitz::TinyVector< P_numtype, N_length >::_bz_assign | ( | P_expr | , |
P_updater | |||
) |
_bz_forceinline void blitz::TinyVector< P_numtype, N_length >::_tv_evaluate | ( | const T_expr & | expr, |
T_update | |||
) |
This function selects evaluation path by calling select_evaluation with a bool argument which is false if the expression only contains TinyVector operands.
References blitz::_tv_evaluator< unroll, N_length >::select_evaluation().
|
private |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
T_vector& blitz::TinyVector< P_numtype, N_length >::initialize | ( | T_numtype | ) |
|
inline |
Since data_ is simd aligned by construction, we just have to check the offest.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inlinestatic |
T_vector& blitz::TinyVector< P_numtype, N_length >::operator%= | ( | const T & | ) |
T_vector& blitz::TinyVector< P_numtype, N_length >::operator&= | ( | const T & | ) |
|
inline |
|
inline |
|
inline |
_bz_ArrayExpr<ArrayIndexMapping<typename asExpr<T_vector>::T_expr, N0> > blitz::TinyVector< P_numtype, N_length >::operator() | ( | IndexPlaceholder< N0 > | ) | const |
|
inline |
T_vector& blitz::TinyVector< P_numtype, N_length >::operator*= | ( | const T & | ) |
T_vector& blitz::TinyVector< P_numtype, N_length >::operator+= | ( | const T & | ) |
T_vector& blitz::TinyVector< P_numtype, N_length >::operator-= | ( | const T & | ) |
T_vector& blitz::TinyVector< P_numtype, N_length >::operator/= | ( | const T & | ) |
T_vector& blitz::TinyVector< P_numtype, N_length >::operator<<= | ( | const T & | ) |
|
inline |
T_vector& blitz::TinyVector< P_numtype, N_length >::operator= | ( | const ETBase< T_expr > & | ) |
T_vector& blitz::TinyVector< P_numtype, N_length >::operator>>= | ( | const T & | ) |
|
inline |
|
inline |
T_vector& blitz::TinyVector< P_numtype, N_length >::operator^= | ( | const T & | ) |
T_vector& blitz::TinyVector< P_numtype, N_length >::operator|= | ( | const T & | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Referenced by blitz::TinyVector< diffType, N_rank >::rank().