monolish
0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
|
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"
13 if (get_device_mem_stat()) {
14 throw std::runtime_error(
"Error, GPU COO cant use operator==");
17 if (get_row() != mat.
get_row()) {
21 if (get_col() != mat.
get_col()) {
31 if (get_device_mem_stat() ==
true) {
32 if (!(internal::vequal(get_nnz(), val.data(), mat.
val.data(),
true))) {
36 if (!(internal::vequal(get_nnz(), col_index.data(), mat.
col_index.data(),
41 if (!(internal::vequal(get_nnz(), row_index.data(), mat.
row_index.data(),
48 if (!(internal::vequal(get_nnz(), val.data(), mat.
val.data(),
false))) {
52 if (!(internal::vequal(get_nnz(), col_index.data(), mat.
col_index.data(),
57 if (!(internal::vequal(get_nnz(), row_index.data(), mat.
row_index.data(),
67 bool compare_cpu_and_device)
const;
69 bool compare_cpu_and_device)
const;
75 bool ret = equal(mat);
87 bool ret = equal(mat);
101 template <
typename T>
103 Logger &logger = Logger::get_instance();
133 template <
typename T>
135 Logger &logger = Logger::get_instance();
std::vector< int > row_index
Coodinate format row index, which stores row numbers of the non-zero elements (size nnz)
logger class (singleton, for developper class)
bool operator==(const COO< Float > &mat) const
Comparing matricies (A == mat)
size_t get_row() const
get # of row
template bool is_same_structure(const matrix::COO< float > &A, const matrix::COO< float > &B)
bool operator!=(const COO< Float > &mat) const
Comparing matricies (A != mat)
std::vector< Float > val
Coodinate format value array, which stores values of the non-zero elements (size nnz)
void util_in(const std::string func_name)
size_t get_nnz() const
get # of non-zeros
bool get_device_mem_stat() const
false; // true: sended, false: not send
Coodinate (COO) format Matrix (need to sort)
bool equal(const COO< Float > &mat, bool compare_cpu_and_device=false) const
Comparing matricies (A == mat)
size_t get_col() const
get # of col
static Logger & get_instance()
template bool is_same_size(const matrix::COO< float > &A, const matrix::COO< float > &B)
std::vector< int > col_index
Coodinate format column index, which stores column numbers of the non-zero elements (size nnz)