planc
Parallel Lowrank Approximation with Non-negativity Constraints
Public Member Functions | List of all members
planc::DistIO< MATTYPE > Class Template Reference

#include <distio.hpp>

Public Member Functions

 DistIO (const MPICommunicator &mpic, const iodistributions &iod)
 
void readInput (const std::string file_name, UWORD m=0, UWORD n=0, UWORD k=0, double sparsity=0, UWORD pr=0, UWORD pc=0, normtype i_normalization=NONE)
 We need m,n,pr,pc only for rand matrices. More...
 
void writeOutput (const MAT &W, const MAT &H, const std::string &output_file_name)
 Writes the factor matrix as output_file_name_W_MPISIZE_MPIRANK. More...
 
void writeRandInput ()
 
const MATTYPE & Arows () const
 
const MATTYPE & Acols () const
 
const MATTYPE & A () const
 
const MPICommunicatormpicomm () const
 

Detailed Description

template<class MATTYPE>
class planc::DistIO< MATTYPE >

Definition at line 26 of file distio.hpp.

Constructor & Destructor Documentation

◆ DistIO()

template<class MATTYPE>
planc::DistIO< MATTYPE >::DistIO ( const MPICommunicator mpic,
const iodistributions iod 
)
inline

Definition at line 313 of file distio.hpp.

Member Function Documentation

◆ A()

template<class MATTYPE>
const MATTYPE& planc::DistIO< MATTYPE >::A ( ) const
inline

Definition at line 484 of file distio.hpp.

◆ Acols()

template<class MATTYPE>
const MATTYPE& planc::DistIO< MATTYPE >::Acols ( ) const
inline

Definition at line 483 of file distio.hpp.

◆ Arows()

template<class MATTYPE>
const MATTYPE& planc::DistIO< MATTYPE >::Arows ( ) const
inline

Definition at line 482 of file distio.hpp.

◆ mpicomm()

template<class MATTYPE>
const MPICommunicator& planc::DistIO< MATTYPE >::mpicomm ( ) const
inline

Definition at line 485 of file distio.hpp.

◆ readInput()

template<class MATTYPE>
void planc::DistIO< MATTYPE >::readInput ( const std::string  file_name,
UWORD  m = 0,
UWORD  n = 0,
UWORD  k = 0,
double  sparsity = 0,
UWORD  pr = 0,
UWORD  pc = 0,
normtype  i_normalization = NONE 
)
inline

We need m,n,pr,pc only for rand matrices.

If otherwise we are expecting the file will hold all the details. If we are loading by file name we dont need distio flag. If the filename is rand_lowrank/rand_uniform, appropriate random functions will be called. Otherwise, it will be loaded from file.

Parameters
[in]file_name.For random matrices rand_lowrank/rand_uniform
[in]m- globalm. Needed only for random matrices. otherwise, we will know from file.
[in]n- globaln. Needed only for random matrices
[in]k- low rank. Used for generating synthetic lowrank matrices.
[in]sparsity- sparsity factor between 0-1 for sparse matrices.
[in]pr- Number of row processors in the 2D processor grid
[in]pc- Number of columnn processors in the 2D processor grid
[in]normalization- L2 column normalization of input matrix.

Definition at line 331 of file distio.hpp.

◆ writeOutput()

template<class MATTYPE>
void planc::DistIO< MATTYPE >::writeOutput ( const MAT W,
const MAT H,
const std::string &  output_file_name 
)
inline

Writes the factor matrix as output_file_name_W_MPISIZE_MPIRANK.

Parameters
[in]LocalW factor matrix
[in]LocalH factor matrix
[in]outputfile name

Definition at line 439 of file distio.hpp.

◆ writeRandInput()

template<class MATTYPE>
void planc::DistIO< MATTYPE >::writeRandInput ( )
inline

Definition at line 447 of file distio.hpp.


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