monolish  0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
copy_linearoperator.cpp
Go to the documentation of this file.
1 #include "../../../include/common/monolish_common.hpp"
2 #include "../../../include/monolish_blas.hpp"
3 #include "../../internal/monolish_internal.hpp"
4 
5 namespace monolish {
6 namespace matrix {
7 
8 template <typename T>
9 void LinearOperator<T>::operator=(const LinearOperator<T> &linearoperator) {
10  Logger &logger = Logger::get_instance();
11  logger.util_in(monolish_func);
12 
13  rowN = linearoperator.get_row();
14  colN = linearoperator.get_col();
15 
16  if (linearoperator.get_matvec_init_flag()) {
17  set_matvec(linearoperator.get_matvec());
18  }
19  if (linearoperator.get_rmatvec_init_flag()) {
20  set_rmatvec(linearoperator.get_rmatvec());
21  }
22 
23  logger.util_out();
24 }
25 
26 template void
28 template void
30 
31 } // namespace matrix
32 } // namespace monolish
monolish::matrix::LinearOperator
Linear Operator imitating Matrix.
Definition: monolish_coo.hpp:30
monolish_func
#define monolish_func
Definition: monolish_logger.hpp:9
monolish::Logger
logger class (singleton, for developper class)
Definition: monolish_logger.hpp:19
monolish::matrix::LinearOperator::operator=
void operator=(const LinearOperator< Float > &mat)
operator copy
Definition: copy_linearoperator.cpp:9
monolish::matrix::LinearOperator::get_col
size_t get_col() const
get # of col
Definition: monolish_linearoperator.hpp:164
monolish::Logger::util_out
void util_out()
Definition: logger_utils.cpp:123
monolish::matrix::LinearOperator::get_matvec_init_flag
bool get_matvec_init_flag() const
get flag that shows matvec is defined or not
Definition: monolish_linearoperator.hpp:196
monolish::Logger::util_in
void util_in(const std::string func_name)
Definition: logger_utils.cpp:113
monolish
Definition: monolish_matrix_blas.hpp:9
monolish::matrix::LinearOperator::get_row
size_t get_row() const
get # of row
Definition: monolish_linearoperator.hpp:155
monolish::matrix::LinearOperator::get_rmatvec
std::function< vector< Float >const vector< Float > &)> get_rmatvec() const
get multiplication function of (Hermitian) transposed matrix and vector C = A;
Definition: monolish_linearoperator.hpp:185
monolish::matrix::LinearOperator::get_matvec
std::function< vector< Float >const vector< Float > &)> get_matvec() const
get multiplication function of matrix and vector
Definition: monolish_linearoperator.hpp:173
monolish::Logger::get_instance
static Logger & get_instance()
Definition: monolish_logger.hpp:42
monolish::matrix::LinearOperator::get_rmatvec_init_flag
bool get_rmatvec_init_flag() const
get flag that shows rmatvec is defined or not
Definition: monolish_linearoperator.hpp:205