monolish  0.14.2
MONOlithic LIner equation Solvers for Highly-parallel architecture
hash.cpp
Go to the documentation of this file.
1 #include "../../include/common/monolish_dense.hpp"
2 #include "../../include/common/monolish_logger.hpp"
3 #include "../../include/common/monolish_matrix.hpp"
4 #include "../internal/monolish_internal.hpp"
5 
6 namespace monolish {
7 namespace matrix {
8 
9 template <typename T> void CRS<T>::compute_hash() {
10  Logger &logger = Logger::get_instance();
11  logger.util_in(monolish_func);
12 
13  structure_hash = internal::vhash(row_ptr.size(), row_ptr.data(), get_row(),
14  get_device_mem_stat());
15  structure_hash = internal::vhash(col_ind.size(), col_ind.data(),
16  structure_hash, get_device_mem_stat());
17 
18  logger.util_out();
19 }
20 template void CRS<double>::compute_hash();
21 template void CRS<float>::compute_hash();
22 
23 } // namespace matrix
24 } // 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::util_out
void util_out()
Definition: logger_utils.cpp:123
monolish::Logger::util_in
void util_in(const std::string func_name)
Definition: logger_utils.cpp:113
monolish
Definition: monolish_matrix_blas.hpp:10
monolish::matrix::CRS::compute_hash
void compute_hash()
compute index array hash (to compare structure)
Definition: hash.cpp:9
monolish::Logger::get_instance
static Logger & get_instance()
Definition: monolish_logger.hpp:42