monolish  0.14.2
MONOlithic LIner equation Solvers for Highly-parallel architecture
qr.cpp
Go to the documentation of this file.
1 #include "../../../include/monolish_equation.hpp"
2 #include "../../internal/monolish_internal.hpp"
3 
4 namespace monolish {
5 template <typename MATRIX, typename T>
7  Logger &logger = Logger::get_instance();
8  logger.func_in(monolish_func);
9 
10  int ret = -1;
11 
12 #if MONOLISH_USE_NVIDIA_GPU // gpu
13  if (lib == 1) {
14  ret = cusolver_QR(A, x, b);
15  } else {
16  logger.func_out();
17  throw std::runtime_error("error solver.lib is not 1");
18  }
19  logger.func_out();
20 #else
21  (void)(&A);
22  (void)(&x);
23  (void)(&b);
24  throw std::runtime_error("error Cholesky on CPU does not impl.");
25 #endif
26 
27  logger.func_out();
28  return ret;
29 }
30 template int equation::QR<matrix::CRS<double>, double>::solve(
32 template int equation::QR<matrix::CRS<float>, float>::solve(
34 } // namespace monolish
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::func_out
void func_out()
Definition: logger_utils.cpp:80
monolish
Definition: monolish_matrix_blas.hpp:10
monolish::equation::QR::solve
int solve(MATRIX &A, vector< Float > &x, vector< Float > &b)
solve Ax=b
Definition: qr.cpp:6
monolish::equation::QR
QR solver class (Dense, GPU only now). can use set_tol(), get_tol(), set_reorder(),...
Definition: monolish_equation.hpp:248
monolish::vector
vector class
Definition: monolish_coo.hpp:32
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:36
monolish::Logger::func_in
void func_in(const std::string func_name)
Definition: logger_utils.cpp:69