monolish
0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
|
Go to the documentation of this file.
2 #include "../../../include/monolish_blas.hpp"
3 #include "../../internal/monolish_internal.hpp"
9 const int nnzrow,
const T val) {
14 throw std::runtime_error(
"error nnzrow <= matrix size");
19 std::random_device seed;
20 std::default_random_engine rng(seed());
22 for (
int i = 0; i < M; i++) {
23 std::uniform_int_distribution<> dist_pos(0, N - 1);
24 for (
int j = 0; j < nnzrow; j++) {
25 int c = dist_pos(rng);
26 if (mat.
at(i, c) != 0)
matrix::COO< T > random_structure_matrix(const int M, const int N, const int nnzrow, const T val)
create random structure matrix (column number is decided by random)
logger class (singleton, for developper class)
void insert(const size_t m, const size_t n, const Float val)
insert element to (m, n)
void sort(bool merge)
sort COO matrix elements (and merge elements)
void util_in(const std::string func_name)
Float at(const size_t i, const size_t j) const
Get matrix element (A(i,j))
Coodinate (COO) format Matrix (need to sort)
static Logger & get_instance()