HMLP: High-performance Machine Learning Primitives
hmlp::Data< T, Allocator > Class Template Reference

#include <Data.hpp>

Inheritance diagram for hmlp::Data< T, Allocator >:
hmlp::ReadWrite hmlp::DistDataBase< T, Allocator > hmlp::DistData< ROWDIST, COLDIST, T, Allocator >

Public Member Functions

 Data ()
 
 Data (const Data< T > &other_data)
 
 Data (size_t m, size_t n, const vector< T > &other_vector)
 
 Data (size_t m, size_t n)
 
 Data (size_t m, size_t n, T initT)
 
 Data (size_t m, size_t n, string &filename)
 
void resize (size_t m, size_t n)
 
void resize (size_t m, size_t n, T initT)
 
void reserve (size_t m, size_t n)
 
void clear ()
 
void read (size_t m, size_t n, string &filename)
 
void write (std::string &filename)
 
template<int SKIP_ATTRIBUTES = 0, bool TRANS = false>
void readmtx (size_t m, size_t n, string &filename)
 
tuple< size_t, size_t > shape ()
 
T * rowdata (size_t i)
 
T * columndata (size_t j)
 
getvalue (size_t i)
 
void setvalue (size_t i, T v)
 
getvalue (size_t i, size_t j)
 
void setvalue (size_t i, size_t j, T v)
 
size_t row () const noexcept
 
size_t col () const noexcept
 
T & operator() (size_t i, size_t j)
 
operator() (size_t i, size_t j) const
 
Data< T > operator() (const vector< size_t > &I, const vector< size_t > &J) const
 
pair< T, size_t > ImportantSample (size_t j)
 
Data< T > operator() (const vector< size_t > &jmap)
 
template<typename TINDEX >
void GatherColumns (bool TRANS, vector< TINDEX > &jmap, Data< T > &submatrix)
 
void setvalue (T value)
 
template<bool SYMMETRIC = false>
void rand (T a, T b)
 
template<bool SYMMETRIC = false>
void rand ()
 
void randn (T mu, T sd)
 
void randn ()
 
template<bool USE_LOWRANK = true>
void randspd (T a, T b)
 
void randspd ()
 
bool HasIllegalValue ()
 
void Print ()
 
void WriteFile (char *name)
 
template<typename TINDEX >
double flops (TINDEX na, TINDEX nb)
 
- 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
 

Detailed Description

template<class T, class Allocator = std::allocator<T>>
class hmlp::Data< T, Allocator >

use default stl allocator

Constructor & Destructor Documentation

template<class T, class Allocator = std::allocator<T>>
hmlp::Data< T, Allocator >::Data ( )
inline

Default empty constructor.

template<class T, class Allocator = std::allocator<T>>
hmlp::Data< T, Allocator >::Data ( const Data< T > &  other_data)
inline

Copy constructor for hmlp::Data.

template<class T, class Allocator = std::allocator<T>>
hmlp::Data< T, Allocator >::Data ( size_t  m,
size_t  n,
const vector< T > &  other_vector 
)
inline

TODO: Copy constructor for std::vector.

Member Function Documentation

template<class T, class Allocator = std::allocator<T>>
size_t hmlp::Data< T, Allocator >::col ( ) const
inlinenoexcept

ESSENTIAL: return number of rows

template<class T, class Allocator = std::allocator<T>>
pair<T, size_t> hmlp::Data< T, Allocator >::ImportantSample ( size_t  j)
inline

ESSENTIAL:

template<class T, class Allocator = std::allocator<T>>
T& hmlp::Data< T, Allocator >::operator() ( size_t  i,
size_t  j 
)
inline

ESSENTIAL: return an element

template<class T, class Allocator = std::allocator<T>>
Data<T> hmlp::Data< T, Allocator >::operator() ( const vector< size_t > &  I,
const vector< size_t > &  J 
) const
inline

ESSENTIAL: return a submatrix

template<class T, class Allocator = std::allocator<T>>
template<bool USE_LOWRANK = true>
void hmlp::Data< T, Allocator >::randspd ( a,
b 
)
inline

diagonal dominating

Make sure diagonal dominated

template<class T, class Allocator = std::allocator<T>>
template<int SKIP_ATTRIBUTES = 0, bool TRANS = false>
void hmlp::Data< T, Allocator >::readmtx ( size_t  m,
size_t  n,
string &  filename 
)
inline

Replace all ',' and ';' with white space ' '

template<class T, class Allocator = std::allocator<T>>
size_t hmlp::Data< T, Allocator >::row ( ) const
inlinenoexcept

ESSENTIAL: return number of coumns


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