monolish  0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
none.cpp
Go to the documentation of this file.
1 #include "../../include/monolish_blas.hpp"
2 #include "../../include/monolish_equation.hpp"
3 #include "../internal/monolish_internal.hpp"
4 
5 namespace monolish {
6 
8 // precond none /////////////////////////
10 template <typename MATRIX, typename T>
12  Logger &logger = Logger::get_instance();
13 
14  // nothing to do
15  (void)(&A);
16 
17  logger.solver_in(monolish_func);
18  logger.solver_out();
19 }
20 template void equation::none<matrix::Dense<float>, float>::create_precond(
22 template void equation::none<matrix::Dense<double>, double>::create_precond(
24 
25 template void equation::none<matrix::CRS<float>, float>::create_precond(
27 template void equation::none<matrix::CRS<double>, double>::create_precond(
29 
30 template <>
31 void equation::none<matrix::LinearOperator<float>, float>::create_precond(
33 template <>
34 void equation::none<matrix::LinearOperator<double>, double>::create_precond(
36 
38 
39 template <typename MATRIX, typename T>
41  vector<T> &z) {
42  Logger &logger = Logger::get_instance();
43  logger.solver_in(monolish_func);
44  blas::copy(r, z);
45  logger.solver_out();
46 }
47 template void equation::none<matrix::Dense<float>, float>::apply_precond(
48  const vector<float> &r, vector<float> &z);
49 template void equation::none<matrix::Dense<double>, double>::apply_precond(
50  const vector<double> &r, vector<double> &z);
51 
52 template void
53 equation::none<matrix::CRS<float>, float>::apply_precond(const vector<float> &r,
54  vector<float> &z);
55 template void equation::none<matrix::CRS<double>, double>::apply_precond(
56  const vector<double> &r, vector<double> &z);
57 
58 template void
60  const vector<float> &r, vector<float> &z);
61 template void
62 equation::none<matrix::LinearOperator<double>, double>::apply_precond(
63  const vector<double> &r, vector<double> &z);
64 
66 
67 template <typename MATRIX, typename T>
69  Logger &logger = Logger::get_instance();
70  logger.solver_in(monolish_func);
71  // nothing to do
72  (void)(&A);
73  (void)(&x);
74  (void)(&b);
75  logger.solver_out();
77 }
78 template int equation::none<matrix::Dense<float>, float>::solve(
80 template int equation::none<matrix::Dense<double>, double>::solve(
82 
83 template int equation::none<matrix::CRS<float>, float>::solve(
85 template int equation::none<matrix::CRS<double>, double>::solve(
87 
88 template int equation::none<matrix::LinearOperator<float>, float>::solve(
90 template int equation::none<matrix::LinearOperator<double>, double>::solve(
92 } // 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::Logger::solver_in
void solver_in(const std::string func_name)
Definition: logger_utils.cpp:7
monolish::matrix::Dense
Dense format Matrix.
Definition: monolish_coo.hpp:28
MONOLISH_SOLVER_SUCCESS
#define MONOLISH_SOLVER_SUCCESS
Definition: monolish_common.hpp:10
monolish::equation::none::solve
int solve(MATRIX &A, vector< Float > &x, vector< Float > &b)
Definition: none.cpp:68
monolish::equation::none::apply_precond
void apply_precond(const vector< Float > &r, vector< Float > &z)
Definition: none.cpp:40
monolish::blas::copy
void copy(const matrix::Dense< double > &A, matrix::Dense< double > &C)
Dense matrix copy (C=A)
Definition: dense_copy.cpp:25
monolish
Definition: monolish_matrix_blas.hpp:9
monolish::Logger::solver_out
void solver_out()
Definition: logger_utils.cpp:35
monolish::equation::none::create_precond
void create_precond(MATRIX &A)
Definition: none.cpp:11
monolish::vector
vector class
Definition: monolish_coo.hpp:25
monolish::equation::none
none solver class(nothing to do)
Definition: monolish_equation.hpp:31
monolish::Logger::get_instance
static Logger & get_instance()
Definition: monolish_logger.hpp:42
monolish::matrix::CRS
Compressed Row Storage (CRS) format Matrix.
Definition: monolish_coo.hpp:29