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

#include <DistData.hpp>

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

Public Member Functions

 DistDataBase (size_t m, size_t n, mpi::Comm comm)
 
 DistDataBase (mpi::Comm comm)
 
 DistDataBase (size_t m, size_t n, Data< T, Allocator > &other_data, mpi::Comm comm)
 
 DistDataBase (size_t m, size_t n, size_t owned_rows, size_t owned_cols, vector< T, Allocator > &other_vector, mpi::Comm comm)
 
mpi::Comm GetComm ()
 
int GetSize ()
 
int GetRank ()
 
size_t row ()
 
size_t col ()
 
size_t row_owned ()
 
size_t col_owned ()
 
- Public Member Functions inherited from hmlp::Data< T, Allocator >
 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 ()
 
- Public Member Functions inherited from hmlp::mpi::MPIObject
 MPIObject (mpi::Comm comm)
 
void AssignCommunicator (mpi::Comm &comm)
 
mpi::Comm GetComm ()
 
mpi::Comm GetPrivateComm ()
 
int GetCommSize ()
 
int GetCommRank ()
 
int Comm_size ()
 
int Comm_rank ()
 
int Barrier ()
 
int PrivateBarrier ()
 

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::DistDataBase< T, Allocator >

use default stl allocator

Constructor & Destructor Documentation

template<class T, class Allocator = std::allocator<T>>
hmlp::DistDataBase< T, Allocator >::DistDataBase ( size_t  m,
size_t  n,
mpi::Comm  comm 
)
inline

Default constructor

template<class T, class Allocator = std::allocator<T>>
hmlp::DistDataBase< T, Allocator >::DistDataBase ( mpi::Comm  comm)
inline

Constrcut a zero matrix (but mpi::Comm is still required)

template<class T, class Allocator = std::allocator<T>>
hmlp::DistDataBase< T, Allocator >::DistDataBase ( size_t  m,
size_t  n,
Data< T, Allocator > &  other_data,
mpi::Comm  comm 
)
inline

Copy constructor for hmlp::Data.

template<class T, class Allocator = std::allocator<T>>
hmlp::DistDataBase< T, Allocator >::DistDataBase ( size_t  m,
size_t  n,
size_t  owned_rows,
size_t  owned_cols,
vector< T, Allocator > &  other_vector,
mpi::Comm  comm 
)
inline

Copy constructor for std::vector.

Member Function Documentation

template<class T, class Allocator = std::allocator<T>>
mpi::Comm hmlp::DistDataBase< T, Allocator >::GetComm ( )
inline

MPI support

template<class T, class Allocator = std::allocator<T>>
size_t hmlp::DistDataBase< T, Allocator >::row ( )
inline

Get total row and column numbers across all MPI ranks

template<class T, class Allocator = std::allocator<T>>
size_t hmlp::DistDataBase< T, Allocator >::row_owned ( )
inline

Get row and column numbers owned by this MPI rank


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