HMLP: High-performance Machine Learning Primitives
hmlp::View< T > Class Template Reference
Inheritance diagram for hmlp::View< T >:
hmlp::ReadWrite

Public Member Functions

 View ()
 
 View (Data< T > &buff)
 
 View (bool TRANS, Data< T > &buff)
 
void Set (bool TRANS, Data< T > &buff)
 
void Set (Data< T > &buff)
 
void Set (size_t m, size_t n, size_t offm, size_t offn, View< T > *base)
 
template<typename TINDEX >
T & operator() (TINDEX i, TINDEX j)
 
void CopyValuesFrom (View< T > &A)
 
void CopyValuesFrom (Data< T > &A)
 
Data< T > toData ()
 
void Partition2x1 (View< T > &A1, View< T > &A2, size_t mb, SideType side)
 
void ContinueWith2x1 (View< T > &A1, View< T > &A2)
 
void Partition1x2 (View< T > &A1, View< T > &A2, size_t nb, SideType side)
 
void ContinueWith1x2 (View< T > &A1, View< T > &A2)
 
void Partition2x2 (View< T > &A11, View< T > &A12, View< T > &A21, View< T > &A22, size_t mb, size_t nb, QuadrantType quadrant)
 
void ContinueWith2x2 (View< T > &A11, View< T > &A12, View< T > &A21, View< T > &A22)
 
bool IsTransposed ()
 
bool HasTheSameBuffer (Data< T > *target)
 
bool HasUniformBlockSize ()
 
void CreateLeafMatrixBlocks (size_t mb, size_t nb)
 
size_t GetRowBlockSize ()
 
size_t GetColumnBlockSize ()
 
bool HasLeafReadWriteBlocks ()
 
void DependencyAnalysis (ReadWriteType type, Task *task)
 If leaf r/w blocks were created, then the r/w dependency applies to all leaf r/w blocks covered by this view. Otherwise, the r/w dependency only applies to this view.
 
void DependencyAnalysis (size_t i, size_t j, ReadWriteType type, Task *task)
 
void DependencyCleanUp ()
 
size_t row ()
 
size_t col ()
 
size_t ld ()
 
T * data ()
 
void Print ()
 
- Public Member Functions inherited from hmlp::ReadWrite
 ReadWrite ()
 
void DependencyAnalysis (ReadWriteType type, Task *task)
 This is the key function that encode the dependency. More...
 
void DependencyCleanUp ()
 

Additional Inherited Members

- Public Attributes inherited from hmlp::ReadWrite
deque< Task * > read
 
deque< Task * > write
 

Constructor & Destructor Documentation

template<typename T>
hmlp::View< T >::View ( )
inline

empty constructor

template<typename T>
hmlp::View< T >::View ( Data< T > &  buff)
inline

constructor for the buffer

Member Function Documentation

template<typename T>
size_t hmlp::View< T >::col ( )
inline

return the col size of the current view

template<typename T>
void hmlp::View< T >::ContinueWith1x2 ( View< T > &  A1,
View< T > &  A2 
)
inline

A = [ A1, A2; ]

template<typename T>
void hmlp::View< T >::ContinueWith2x1 ( View< T > &  A1,
View< T > &  A2 
)
inline

A = [ A1; A2; ]

template<typename T>
void hmlp::View< T >::CreateLeafMatrixBlocks ( size_t  mb,
size_t  nb 
)
inline

only the base view can have leaf r/w blocks

template<typename T>
T* hmlp::View< T >::data ( )
inline

return the pointer of the current view in the buffer

template<typename T>
size_t hmlp::View< T >::ld ( )
inline

return leading dimension of the buffer

template<typename T>
template<typename TINDEX >
T& hmlp::View< T >::operator() ( TINDEX  i,
TINDEX  j 
)
inline

subview operator

template<typename T>
void hmlp::View< T >::Partition1x2 ( View< T > &  A1,
View< T > &  A2,
size_t  nb,
SideType  side 
)
inline

[ A1, A2; ] = A

readjust mb

setup A1

setup A2

template<typename T>
void hmlp::View< T >::Partition2x1 ( View< T > &  A1,
View< T > &  A2,
size_t  mb,
SideType  side 
)
inline

[ A1; = A A2; ]

readjust mb

setup A1

setup A2

template<typename T>
void hmlp::View< T >::Partition2x2 ( View< T > &  A11,
View< T > &  A12,
View< T > &  A21,
View< T > &  A22,
size_t  mb,
size_t  nb,
QuadrantType  quadrant 
)
inline

A = [ A11, A12; A21, A22; ];

setup A11

setup A12

setup A21

setup A22

template<typename T>
void hmlp::View< T >::Print ( )
inline

print out all information

template<typename T>
size_t hmlp::View< T >::row ( )
inline

return the row size of the current view

template<typename T>
void hmlp::View< T >::Set ( bool  TRANS,
Data< T > &  buff 
)
inline

destructor base case setup

Data<T> is stored in column major

template<typename T>
void hmlp::View< T >::Set ( Data< T > &  buff)
inline

(Default) is none transpose.

template<typename T>
void hmlp::View< T >::Set ( size_t  m,
size_t  n,
size_t  offm,
size_t  offn,
View< T > *  base 
)
inline

non-base case setup

template<typename T>
Data<T> hmlp::View< T >::toData ( )
inline

Return a data copy of the subview


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