LTL  2.0.x
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ltl::ltl::Shape< N > Class Template Reference

Public Member Functions

 Shape ()
 
 Shape (const Range &r1)
 
 Shape (const Range &r1, const Range &r2)
 
 Shape (const Range &r1, const Range &r2, const Range &r3)
 
 Shape (const Range &r1, const Range &r2, const Range &r3, const Range &r4)
 
 Shape (const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5)
 
 Shape (const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5, const Range &r6)
 
 Shape (const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5, const Range &r6, const Range &r7)
 
 Shape (const int r1)
 
 Shape (const int r1, const int r2)
 
 Shape (const int r1, const int r2, const int r3)
 
 Shape (const int r1, const int r2, const int r3, const int r4)
 
 Shape (const int r1, const int r2, const int r3, const int r4, const int r5)
 
 Shape (const int r1, const int r2, const int r3, const int r4, const int r5, const int r6)
 
 Shape (const int r1, const int r2, const int r3, const int r4, const int r5, const int r6, const int r7)
 
 Shape (const Shape< N > &other)
 
Shapeoperator= (const Shape< N > &other)
 
int base (const int i) const
 
intbase (const int i)
 
int last (const int i) const
 
int length (const int i) const
 
intlength (const int i)
 
int stride (const int i) const
 
intstride (const int i)
 
int zeroOffset () const
 
intzeroOffset ()
 
bool isStorageContiguous (void) const
 
bool isUnitStride (void) const
 
bool isConformable (const Shape &other) const
 
int nelements () const
 
Shape< N-1 > getShapeForContraction (const int dim) const
 

Protected Member Functions

void calcIsStorageContiguous ()
 
void calcNelements ()
 
void calcZeroOffset ()
 
void copy (const Shape< N > &other)
 
void setupSelf (const int n)
 

Protected Attributes

int zeroOffset_
 
int base_ [N]
 
int length_ [N]
 
int stride_ [N]
 
bool isContiguous_
 
int nelements_
 

Friends

template<class T , int D>
class MArray
 
template<int D>
class Shape
 
std::istream & operator>> (std::istream &is, Shape< N > &s)
 

Constructor & Destructor Documentation

template<int N>
ltl::ltl::Shape< N >::Shape ( )
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const Range r1)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const Range r1,
const Range r2 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const Range r1,
const Range r2,
const Range r3 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const Range r1,
const Range r2,
const Range r3,
const Range r4 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const Range r1,
const Range r2,
const Range r3,
const Range r4,
const Range r5 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const Range r1,
const Range r2,
const Range r3,
const Range r4,
const Range r5,
const Range r6 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const Range r1,
const Range r2,
const Range r3,
const Range r4,
const Range r5,
const Range r6,
const Range r7 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1,
const int  r2 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1,
const int  r2,
const int  r3 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1,
const int  r2,
const int  r3,
const int  r4 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1,
const int  r2,
const int  r3,
const int  r4,
const int  r5 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1,
const int  r2,
const int  r3,
const int  r4,
const int  r5,
const int  r6 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1,
const int  r2,
const int  r3,
const int  r4,
const int  r5,
const int  r6,
const int  r7 
)
inline
template<int N>
ltl::ltl::Shape< N >::Shape ( const Shape< N > &  other)
inline

Member Function Documentation

template<int N>
Shape& ltl::ltl::Shape< N >::operator= ( const Shape< N > &  other)
inline
template<int N>
int ltl::ltl::Shape< N >::base ( const int  i) const
inline
template<int N>
int& ltl::ltl::Shape< N >::base ( const int  i)
inline
template<int N>
int ltl::ltl::Shape< N >::last ( const int  i) const
inline
template<int N>
int ltl::ltl::Shape< N >::length ( const int  i) const
inline
template<int N>
int& ltl::ltl::Shape< N >::length ( const int  i)
inline
template<int N>
int ltl::ltl::Shape< N >::stride ( const int  i) const
inline
template<int N>
int& ltl::ltl::Shape< N >::stride ( const int  i)
inline
template<int N>
int ltl::ltl::Shape< N >::zeroOffset ( ) const
inline
template<int N>
int& ltl::ltl::Shape< N >::zeroOffset ( )
inline
template<int N>
bool ltl::ltl::Shape< N >::isStorageContiguous ( void  ) const
inline
template<int N>
bool ltl::ltl::Shape< N >::isUnitStride ( void  ) const
inline
template<int N>
bool ltl::ltl::Shape< N >::isConformable ( const Shape< N > &  other) const
inline
template<int N>
int ltl::ltl::Shape< N >::nelements ( ) const
inline
template<int N>
Shape< N-1 > ltl::ltl::Shape< N >::getShapeForContraction ( const int  dim) const
template<int N>
void ltl::ltl::Shape< N >::calcIsStorageContiguous ( void  )
inlineprotected

The storage is contiguous if for every dimension i = 1..N-1 stride(i)*length(i) == stride(i+1) This assumes the dimensions are ordered! (c.f. blitz-version below which does not require this assumption)

template<int N>
void ltl::ltl::Shape< N >::calcNelements ( )
inlineprotected
template<int N>
void ltl::ltl::Shape< N >::calcZeroOffset ( )
inlineprotected
template<int N>
void ltl::ltl::Shape< N >::copy ( const Shape< N > &  other)
protected
template<int N>
void ltl::ltl::Shape< N >::setupSelf ( const int  n)
inlineprotected

Friends And Related Function Documentation

template<int N>
template<class T , int D>
friend class MArray
friend
template<int N>
template<int D>
friend class Shape
friend
template<int N>
std::istream& operator>> ( std::istream &  is,
Shape< N > &  s 
)
friend

Member Data Documentation

template<int N>
int ltl::ltl::Shape< N >::zeroOffset_
protected
template<int N>
int ltl::ltl::Shape< N >::base_[N]
protected
template<int N>
int ltl::ltl::Shape< N >::length_[N]
protected
template<int N>
int ltl::ltl::Shape< N >::stride_[N]
protected
template<int N>
bool ltl::ltl::Shape< N >::isContiguous_
protected
template<int N>
int ltl::ltl::Shape< N >::nelements_
protected