Static Public Member Functions | List of all members
Seldon::TinyVectorLoop< n > Class Template Reference

class used for unrolling loops for operators/functions of TinyVector More...

#include <TinyVector.hxx>

Static Public Member Functions

template<int m, class T0 >
static void Zero (TinyVector< T0, m > &x)
 Sets all components to 0.
 
template<int m, class T0 >
static void FillGreater (TinyVector< T0, m > &x, const T0 &a)
 Fills with a in ascendant order (instead of descendant order for Fill)
 
template<int m, class T0 >
static void InitValue (TinyVector< T0, m > &x, const T0 &a)
 initializes a single value
 
template<int m, class T0 , class T1 >
static void Fill (TinyVector< T0, m > &x, const T1 &a)
 Sets all components to a given value.
 
template<int m, class T0 >
static void Fill (TinyVector< T0, m > &x)
 Sets the vector to [0, 1, 2, 3, ..., n-1].
 
template<int m, class T0 >
static void FillRand (TinyVector< T0, m > &x)
 sets randomly the components with function rand()
 
template<int m, class T0 , class E0 >
static bool IsZero (const TinyVectorExpression< T0, m, E0 > &x)
 returns true if all components are 0
 
template<int m, class T1 , class E , class T0 >
static void Copy (const TinyVectorExpression< T1, m, E > &x, TinyVector< T0, m > &y)
 y = x
 
template<int m, class T1 , class E , class T0 >
static void AddCopy (const TinyVectorExpression< T1, m, E > &x, TinyVector< T0, m > &y)
 y += x
 
template<int m, class T1 , class E , class T0 >
static void DiffCopy (const TinyVectorExpression< T1, m, E > &x, TinyVector< T0, m > &y)
 y -= x

 
template<int m, class T0 , class T1 >
static void CopyVector (const TinyVector< Vector< T0 >, m > &uvec, int j, TinyVector< T1, m > &u)
 u(:) = uvec(:)(j)
 
template<int m, class T0 , class T1 >
static void CopyVector (const TinyVector< T1, m > &u, int j, TinyVector< Vector< T0 >, m > &uvec)
 uvec(:)(j) = u(:)
 
template<int m, class T0 , class T1 >
static void CopyVector (const Vector< T0 > &Vh, int j, TinyVector< T1, m > &tmp)
 tmp(:) = Vh(m*j + :)
 
template<int m, class T >
static void CopyVector (const Vector< complex< T > > &Vh, int j, TinyVector< T, m > &vr, TinyVector< T, m > &vi)
 vr(:) = real(Vh(m*j + :)) and vi(:) = imag(Vh(m*j + :))
 
template<int m, class T0 , class T1 >
static void CopyVector (const TinyVector< T1, m > &tmp, int j, Vector< T0 > &Vh)
 Vh(m*j + :) = tmp(:)
 
template<int m, class T0 , class T1 >
static void AddVector (const Vector< T0 > &Vh, int j, TinyVector< T1, m > &tmp)
 tmp(:) += Vh(offset + :)
 
template<int m, class T0 , class T1 >
static void AddVector (const TinyVector< T1, m > &tmp, int j, Vector< T0 > &Vh)
 Vh(offset + :) += tmp(:)
 
template<int m, class T0 , class T1 >
static void ExtractVector (const Vector< T0 > &Vh, int j, TinyVector< T1, m > &tmp)
 tmp(:) = Vh(offset + :)
 
template<int m, class T0 , class T1 >
static void ExtractVector (const TinyVector< T1, m > &tmp, int j, Vector< T0 > &Vh)
 Vh(offset + :) = tmp(:)
 
template<int m, class T0 , class T1 >
static void ExtractVector (const Vector< Vector< T0 > > &u, int j, int offset, TinyVector< T1, m > &v)
 v(:) = u(offset+:)(j)
 
template<int m, class T0 , class T1 >
static void CopyVector (const TinyVector< T1, m > &v, int j, int offset, Vector< Vector< T0 > > &u)
 u(offset+:)(j) = v(:)
 
template<int p, int m, class T0 , class T1 >
static void ExtractVector (const Vector< Vector< TinyVector< T0, p > > > &u, int j, int k, int offset, TinyVector< T1, m > &v)
 v(:) = u(offset+:)(j)(k)
 
template<int m, class T0 , class T1 >
static void ExtractVector (const Vector< T0 > &Vh, const IVect &row_num, int j, TinyVector< T1, m > &tmp)
 tmp = Vh(row_num(nb+:))
 
template<int m, class T0 , class T1 >
static void ExtractVector (const TinyVector< T1, m > &tmp, const IVect &row_num, int j, Vector< T0 > &Vh)
 Vh(row_num(nb+:)) = tmp.
 
template<class T0 , class T1 >
static void ExtractVector (const Vector< T0 > &x_src, int offset_source, Vector< T1 > &x_dest, int offset_dest)
 x_dest(offset_dest+:) = x_src(offset_source+:)
 
template<int m, class T0 , class T1 >
static void AddVector (const T0 &alpha, const TinyVector< T1, m > &tmp, const IVect &row_num, int j, Vector< T0 > &Vh)
 Vh(row_num(nb+:)) += alpha * tmp.
 
template<int m, class T0 , class T1 >
static void ExtractVectorConj (const Vector< T0 > &Vh, const IVect &row_num, int j, TinyVector< T1, m > &tmp)
 tmp = conj(Vh(row_num(nb+:)))
 
template<int m, class T0 , class T1 >
static void ExtractVectorConj (const TinyVector< T1, m > &tmp, const IVect &row_num, int j, Vector< T0 > &Vh)
 Vh(row_num(nb+:)) = conj(tmp)
 
template<int m, class T0 , class T1 >
static void AddVectorConj (const T0 &alpha, const TinyVector< T1, m > &tmp, const IVect &row_num, int j, Vector< T0 > &Vh)
 Vh(row_num(nb+:)) += alpha * conj(tmp)
 
template<int m, class T0 , class T1 >
static void MltVector (const T1 &alpha, int j, TinyVector< Vector< T0 >, m > &uvec)
 u(:)(j) *= alpha
 
template<int m, class T0 , class T1 , class E0 , class E1 >
static bool Equal (const TinyVectorExpression< T0, m, E0 > &x, const TinyVectorExpression< T1, m, E1 > &y)
 returns x == y
 
template<int m, class T0 , class T1 , class E0 , class E1 >
static bool LessOrEqual (const TinyVectorExpression< T0, m, E0 > &x, const TinyVectorExpression< T1, m, E1 > &y)
 returns x <= y
 
template<int m, class T0 , class T1 , class E0 , class E1 >
static bool Less (const TinyVectorExpression< T0, m, E0 > &x, const TinyVectorExpression< T1, m, E1 > &y)
 returns x < y
 
template<int m, class T0 , class T1 >
static bool EqualInt (const TinyVector< T0, m > &x, const TinyVector< T1, m > &y)
 returns x == y
 
template<int m, class T0 , class T1 >
static bool LessOrEqualInt (const TinyVector< T0, m > &x, const TinyVector< T1, m > &y)
 returns x <= y
 
template<int m, class T0 , class T1 >
static bool LessInt (const TinyVector< T0, m > &x, const TinyVector< T1, m > &y)
 returns x < y
 
template<int m, class T0 , class T1 >
static void Mlt (const T1 &alpha, TinyVector< T0, m > &x)
 Multiplies x by alpha.
 
template<int m, class T0 , class T1 , class T2 , class E0 , class E1 >
static void DotProd (const TinyVectorExpression< T0, m, E0 > &u, const TinyVectorExpression< T1, m, E1 > &v, T2 &scal)
 scal = u.v
 
template<int m, class T0 , class T1 , class T2 , class E0 , class E1 >
static void DotProdConj (const TinyVectorExpression< T0, m, E0 > &u, const TinyVectorExpression< T1, m, E1 > &v, T2 &scal)
 returns (conj(u), v)
 
template<int m, class T0 , class T1 , class E0 >
static void Abs (const TinyVectorExpression< T0, m, E0 > &u, T1 &scal)
 computes scal = \sum |u_i|^2
 
template<int m, class T0 , class T1 , class E0 >
static void NormInf (const TinyVectorExpression< T0, m, E0 > &u, T1 &scal)
 computes scal = max |u_i|^2
 
template<int m, class T0 , class T1 , class E0 >
static void AbsSquare (const TinyVectorExpression< T0, m, E0 > &u, T1 &scal)
 computes scal = \sum |u_i|^2
 
template<int m, class T >
static void Print (const TinyVector< T, m > &V, ostream &out)
 displays V without brackets
 
template<int m, class T >
static ostream & WriteText (const TinyVector< T, m > &V, ostream &out)
 displays V
 
template<int m, class T >
static istream & ReadText (TinyVector< T, m > &V, istream &in)
 reads V
 
template<class T , int m>
static void UpdateMinimum (const TinyVector< T, m > &u, TinyVector< T, m > &v)
 sets v = min(v, u)
 
template<class T , int m>
static void UpdateMaximum (const TinyVector< T, m > &u, TinyVector< T, m > &v)
 sets v = max(v, u)
 

Detailed Description

template<int n>
class Seldon::TinyVectorLoop< n >

class used for unrolling loops for operators/functions of TinyVector

Definition at line 14 of file TinyVector.hxx.


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