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
 
istream & operator>> (istream &is, Shape< N > &s)
 

Constructor & Destructor Documentation

◆ Shape() [1/16]

template<int N>
ltl::ltl::Shape< N >::Shape ( )
inline

◆ Shape() [2/16]

template<int N>
ltl::ltl::Shape< N >::Shape ( const Range r1)
inline

◆ Shape() [3/16]

template<int N>
ltl::ltl::Shape< N >::Shape ( const Range r1,
const Range r2 
)
inline

◆ Shape() [4/16]

template<int N>
ltl::ltl::Shape< N >::Shape ( const Range r1,
const Range r2,
const Range r3 
)
inline

◆ Shape() [5/16]

template<int N>
ltl::ltl::Shape< N >::Shape ( const Range r1,
const Range r2,
const Range r3,
const Range r4 
)
inline

◆ Shape() [6/16]

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

◆ Shape() [7/16]

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

◆ Shape() [8/16]

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

◆ Shape() [9/16]

template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1)
inline

◆ Shape() [10/16]

template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1,
const int  r2 
)
inline

◆ Shape() [11/16]

template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1,
const int  r2,
const int  r3 
)
inline

◆ Shape() [12/16]

template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1,
const int  r2,
const int  r3,
const int  r4 
)
inline

◆ Shape() [13/16]

template<int N>
ltl::ltl::Shape< N >::Shape ( const int  r1,
const int  r2,
const int  r3,
const int  r4,
const int  r5 
)
inline

◆ Shape() [14/16]

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

◆ Shape() [15/16]

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

◆ Shape() [16/16]

template<int N>
ltl::ltl::Shape< N >::Shape ( const Shape< N > &  other)
inline

Member Function Documentation

◆ operator=()

template<int N>
Shape& ltl::ltl::Shape< N >::operator= ( const Shape< N > &  other)
inline

◆ base() [1/2]

template<int N>
int ltl::ltl::Shape< N >::base ( const int  i) const
inline

◆ base() [2/2]

template<int N>
int& ltl::ltl::Shape< N >::base ( const int  i)
inline

◆ last()

template<int N>
int ltl::ltl::Shape< N >::last ( const int  i) const
inline

◆ length() [1/2]

template<int N>
int ltl::ltl::Shape< N >::length ( const int  i) const
inline

◆ length() [2/2]

template<int N>
int& ltl::ltl::Shape< N >::length ( const int  i)
inline

◆ stride() [1/2]

template<int N>
int ltl::ltl::Shape< N >::stride ( const int  i) const
inline

◆ stride() [2/2]

template<int N>
int& ltl::ltl::Shape< N >::stride ( const int  i)
inline

◆ zeroOffset() [1/2]

template<int N>
int ltl::ltl::Shape< N >::zeroOffset ( ) const
inline

◆ zeroOffset() [2/2]

template<int N>
int& ltl::ltl::Shape< N >::zeroOffset ( )
inline

◆ isStorageContiguous()

template<int N>
bool ltl::ltl::Shape< N >::isStorageContiguous ( void  ) const
inline

◆ isUnitStride()

template<int N>
bool ltl::ltl::Shape< N >::isUnitStride ( void  ) const
inline

◆ isConformable()

template<int N>
bool ltl::ltl::Shape< N >::isConformable ( const Shape< N > &  other) const
inline

◆ nelements()

template<int N>
int ltl::ltl::Shape< N >::nelements ( ) const
inline

◆ getShapeForContraction()

template<int N>
Shape< N-1 > ltl::ltl::Shape< N >::getShapeForContraction ( const int  dim) const

◆ calcIsStorageContiguous()

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)

◆ calcNelements()

template<int N>
void ltl::ltl::Shape< N >::calcNelements ( )
inlineprotected

◆ calcZeroOffset()

template<int N>
void ltl::ltl::Shape< N >::calcZeroOffset ( )
inlineprotected

◆ copy()

template<int N>
void ltl::ltl::Shape< N >::copy ( const Shape< N > &  other)
protected

◆ setupSelf()

template<int N>
void ltl::ltl::Shape< N >::setupSelf ( const int  n)
inlineprotected

Friends And Related Function Documentation

◆ MArray

template<int N>
template<class T , int D>
friend class MArray
friend

◆ Shape

template<int N>
template<int D>
friend class Shape
friend

◆ operator>>

template<int N>
istream& operator>> ( istream &  is,
Shape< N > &  s 
)
friend

Member Data Documentation

◆ zeroOffset_

template<int N>
int ltl::ltl::Shape< N >::zeroOffset_
protected

◆ base_

template<int N>
int ltl::ltl::Shape< N >::base_[N]
protected

◆ length_

template<int N>
int ltl::ltl::Shape< N >::length_[N]
protected

◆ stride_

template<int N>
int ltl::ltl::Shape< N >::stride_[N]
protected

◆ isContiguous_

template<int N>
bool ltl::ltl::Shape< N >::isContiguous_
protected

◆ nelements_

template<int N>
int ltl::ltl::Shape< N >::nelements_
protected