29#ifndef _MPTENSOR_LOAD_HELPER_HPP_
30#define _MPTENSOR_LOAD_HELPER_HPP_
44constexpr bool debug =
false;
50 std::ostringstream
ss;
52 ss << std::setw(4) << std::setfill(
'0') <<
comm_rank;
58 std::ostringstream
ss;
60 ss << std::setw(4) << std::setfill(
'0') <<
comm_rank;
67 std::size_t local_size) {
72 fin.read(
reinterpret_cast<char*
>(
data_head),
sizeof(
C) * local_size);
76template <
template <
typename>
class Matrix,
typename C>
78 size_t& local_size, std::vector<int>&
dest_rank,
81 std::vector<size_t>
g_row;
82 std::vector<size_t>
g_col;
114 for (
size_t i = 0;
i < local_size; ++
i) {
120 data.resize(local_size);
124template <
template <
typename>
class Matrix,
typename C>
135 for (
int i = 0;
i <
n; ++
i) {
144 data.resize(local_size);
std::string filename(const std::string &prefix, int proc_size)
Definition common.hpp:32
std::complex< double > complex
Definition complex.hpp:38
List of header files for matrix classes.
void load_local_files(const std::string &prefix, int comm_rank, size_t &local_size, std::vector< int > &dest_rank, std::vector< size_t > &local_idx, std::vector< C > &data, const Matrix< C > &mat)
Definition io_helper.hpp:77
constexpr bool debug
Definition io_helper.hpp:46
void load_binary(const std::string &prefix, int comm_rank, C *data_head, std::size_t local_size)
Definition io_helper.hpp:66
std::string index_filename(const std::string &prefix, int comm_rank)
Definition io_helper.hpp:57
std::string binary_filename(const std::string &prefix, int comm_rank)
Definition io_helper.hpp:49
void load_scalapack(const std::string &prefix, int loaded_comm_size, Matrix< C > &mat)
Definition io_helper.hpp:125
Definition complex.hpp:34