8 #ifndef EXPLICIT_MAPMAKING_MATRIX_HPP_
9 #define EXPLICIT_MAPMAKING_MATRIX_HPP_
15 #include <boost/filesystem.hpp>
17 namespace fs = boost::filesystem;
26 Matrix Dot(
Matrix& right,
char trans_left=
'N',
char trans_right=
'N');
27 std::vector<double>* local_part() {
return &local_part_; }
28 int n_row()
const {
return n_row_; }
29 int n_col()
const {
return n_col_; }
30 Grid* grid() {
return grid_; }
31 std::vector<int>* desc() {
return &desc_; }
32 void PrintLocalPart();
34 void TestAllocation();
35 void TestAllocationVector();
36 void SaveMatrix(fs::path folder);
37 std::vector<double> GetColumn(
int i_col);
38 void LoadMatrix(std::vector<double>& matrix,
int root_proc);
41 Matrix& operator*= (
double factor);
42 Matrix& operator/= (
double factor);
43 friend Matrix LoadMatrix(fs::path folder,
Grid* grid);
46 std::vector<double> local_part_;
47 int block_first_row_ = 0;
48 int n_local_rows_ = 0;
49 int n_local_cols_ = 0;
55 std::vector<int> desc_;
56 std::vector<double> GatherSubmatrix(
int proc,
int i_row,
int i_col=0,
int n_rows=1,
int n_cols=1);
57 void ScatterSubmatrix(std::vector<double>& submatrix,
int proc,
int i_row,
int i_col=0,
int n_rows=1);
60 Matrix LoadMatrix(fs::path folder,
Grid* grid);
68 #endif // EXPLICIT_MAPMAKING_MATRIX_HPP_
hdf5 and binary io helpers
Handle a scalapack grid of processors.
Definition: matrix.hpp:22