monolish
0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
|
monolish utilities More...
Functions | |
template<typename T > | |
matrix::COO< T > | band_matrix (const int M, const int N, const int W, const T diag_val, const T val) |
create band matrix More... | |
bool | build_with_avx () |
get build option (true: with avx, false: without avx) More... | |
bool | build_with_avx2 () |
get build option (true: with avx2, false: without avx2) More... | |
bool | build_with_avx512 () |
get build option (true: with avx512, false: without avx512) More... | |
bool | build_with_cblas () |
get build option (true: with cblas, false: without cblas (=with intel mkl)) More... | |
bool | build_with_gpu () |
get build option (true: enable gpu, false: disable gpu) More... | |
bool | build_with_lapack () |
get build option (true: with lapack, false: without lapack (=with intel mkl)) More... | |
bool | build_with_mkl () |
get build option (true: with intel mkl, false: without intel mkl) More... | |
template<typename T > | |
auto | device_free (T &x) |
free data of GPU More... | |
template<typename T , typename... Types> | |
auto | device_free (T &x, Types &... args) |
free datas of GPU More... | |
template<typename T > | |
matrix::COO< T > | eye (const int M) |
create band matrix More... | |
template<typename T > | |
matrix::COO< T > | frank_matrix (const int &M) |
create Frank matrix More... | |
template<typename T > | |
T | frank_matrix_eigenvalue (const int &M, const int &N) |
Nth eigenvalue from the bottom of MxM Frank matrix. More... | |
double | get_residual_l2 (const matrix::CRS< double > &A, const vector< double > &x, const vector< double > &y) |
get nrm |b-Ax|_2 More... | |
double | get_residual_l2 (const matrix::CRS< double > &A, const vector< double > &x, const view1D< matrix::Dense< double >, double > &y) |
double | get_residual_l2 (const matrix::CRS< double > &A, const vector< double > &x, const view1D< vector< double >, double > &y) |
double | get_residual_l2 (const matrix::CRS< double > &A, const view1D< matrix::Dense< double >, double > &x, const vector< double > &y) |
double | get_residual_l2 (const matrix::CRS< double > &A, const view1D< matrix::Dense< double >, double > &x, const view1D< matrix::Dense< double >, double > &y) |
double | get_residual_l2 (const matrix::CRS< double > &A, const view1D< matrix::Dense< double >, double > &x, const view1D< vector< double >, double > &y) |
double | get_residual_l2 (const matrix::CRS< double > &A, const view1D< vector< double >, double > &x, const vector< double > &y) |
double | get_residual_l2 (const matrix::CRS< double > &A, const view1D< vector< double >, double > &x, const view1D< matrix::Dense< double >, double > &y) |
double | get_residual_l2 (const matrix::CRS< double > &A, const view1D< vector< double >, double > &x, const view1D< vector< double >, double > &y) |
float | get_residual_l2 (const matrix::CRS< float > &A, const vector< float > &x, const vector< float > &y) |
float | get_residual_l2 (const matrix::CRS< float > &A, const vector< float > &x, const view1D< matrix::Dense< float >, float > &y) |
float | get_residual_l2 (const matrix::CRS< float > &A, const vector< float > &x, const view1D< vector< float >, float > &y) |
float | get_residual_l2 (const matrix::CRS< float > &A, const view1D< matrix::Dense< float >, float > &x, const vector< float > &y) |
float | get_residual_l2 (const matrix::CRS< float > &A, const view1D< matrix::Dense< float >, float > &x, const view1D< matrix::Dense< float >, float > &y) |
float | get_residual_l2 (const matrix::CRS< float > &A, const view1D< matrix::Dense< float >, float > &x, const view1D< vector< float >, float > &y) |
float | get_residual_l2 (const matrix::CRS< float > &A, const view1D< vector< float >, float > &x, const vector< float > &y) |
float | get_residual_l2 (const matrix::CRS< float > &A, const view1D< vector< float >, float > &x, const view1D< matrix::Dense< float >, float > &y) |
float | get_residual_l2 (const matrix::CRS< float > &A, const view1D< vector< float >, float > &x, const view1D< vector< float >, float > &y) |
double | get_residual_l2 (const matrix::Dense< double > &A, const vector< double > &x, const vector< double > &y) |
get nrm |b-Ax|_2 More... | |
double | get_residual_l2 (const matrix::Dense< double > &A, const vector< double > &x, const view1D< matrix::Dense< double >, double > &y) |
double | get_residual_l2 (const matrix::Dense< double > &A, const vector< double > &x, const view1D< vector< double >, double > &y) |
double | get_residual_l2 (const matrix::Dense< double > &A, const view1D< matrix::Dense< double >, double > &x, const vector< double > &y) |
double | get_residual_l2 (const matrix::Dense< double > &A, const view1D< matrix::Dense< double >, double > &x, const view1D< matrix::Dense< double >, double > &y) |
double | get_residual_l2 (const matrix::Dense< double > &A, const view1D< matrix::Dense< double >, double > &x, const view1D< vector< double >, double > &y) |
double | get_residual_l2 (const matrix::Dense< double > &A, const view1D< vector< double >, double > &x, const vector< double > &y) |
double | get_residual_l2 (const matrix::Dense< double > &A, const view1D< vector< double >, double > &x, const view1D< matrix::Dense< double >, double > &y) |
double | get_residual_l2 (const matrix::Dense< double > &A, const view1D< vector< double >, double > &x, const view1D< vector< double >, double > &y) |
float | get_residual_l2 (const matrix::Dense< float > &A, const vector< float > &x, const vector< float > &y) |
float | get_residual_l2 (const matrix::Dense< float > &A, const vector< float > &x, const view1D< matrix::Dense< float >, float > &y) |
float | get_residual_l2 (const matrix::Dense< float > &A, const vector< float > &x, const view1D< vector< float >, float > &y) |
float | get_residual_l2 (const matrix::Dense< float > &A, const view1D< matrix::Dense< float >, float > &x, const vector< float > &y) |
float | get_residual_l2 (const matrix::Dense< float > &A, const view1D< matrix::Dense< float >, float > &x, const view1D< matrix::Dense< float >, float > &y) |
float | get_residual_l2 (const matrix::Dense< float > &A, const view1D< matrix::Dense< float >, float > &x, const view1D< vector< float >, float > &y) |
float | get_residual_l2 (const matrix::Dense< float > &A, const view1D< vector< float >, float > &x, const vector< float > &y) |
float | get_residual_l2 (const matrix::Dense< float > &A, const view1D< vector< float >, float > &x, const view1D< matrix::Dense< float >, float > &y) |
float | get_residual_l2 (const matrix::Dense< float > &A, const view1D< vector< float >, float > &x, const view1D< vector< float >, float > &y) |
double | get_residual_l2 (const matrix::LinearOperator< double > &A, const vector< double > &x, const vector< double > &y) |
get nrm |b-Ax|_2 More... | |
double | get_residual_l2 (const matrix::LinearOperator< double > &A, const vector< double > &x, const view1D< matrix::Dense< double >, double > &y) |
double | get_residual_l2 (const matrix::LinearOperator< double > &A, const vector< double > &x, const view1D< vector< double >, double > &y) |
double | get_residual_l2 (const matrix::LinearOperator< double > &A, const view1D< matrix::Dense< double >, double > &x, const vector< double > &y) |
double | get_residual_l2 (const matrix::LinearOperator< double > &A, const view1D< matrix::Dense< double >, double > &x, const view1D< matrix::Dense< double >, double > &y) |
double | get_residual_l2 (const matrix::LinearOperator< double > &A, const view1D< matrix::Dense< double >, double > &x, const view1D< vector< double >, double > &y) |
double | get_residual_l2 (const matrix::LinearOperator< double > &A, const view1D< vector< double >, double > &x, const vector< double > &y) |
double | get_residual_l2 (const matrix::LinearOperator< double > &A, const view1D< vector< double >, double > &x, const view1D< matrix::Dense< double >, double > &y) |
double | get_residual_l2 (const matrix::LinearOperator< double > &A, const view1D< vector< double >, double > &x, const view1D< vector< double >, double > &y) |
float | get_residual_l2 (const matrix::LinearOperator< float > &A, const vector< float > &x, const vector< float > &y) |
float | get_residual_l2 (const matrix::LinearOperator< float > &A, const vector< float > &x, const view1D< matrix::Dense< float >, float > &y) |
float | get_residual_l2 (const matrix::LinearOperator< float > &A, const vector< float > &x, const view1D< vector< float >, float > &y) |
float | get_residual_l2 (const matrix::LinearOperator< float > &A, const view1D< matrix::Dense< float >, float > &x, const vector< float > &y) |
float | get_residual_l2 (const matrix::LinearOperator< float > &A, const view1D< matrix::Dense< float >, float > &x, const view1D< matrix::Dense< float >, float > &y) |
float | get_residual_l2 (const matrix::LinearOperator< float > &A, const view1D< matrix::Dense< float >, float > &x, const view1D< vector< float >, float > &y) |
float | get_residual_l2 (const matrix::LinearOperator< float > &A, const view1D< vector< float >, float > &x, const vector< float > &y) |
float | get_residual_l2 (const matrix::LinearOperator< float > &A, const view1D< vector< float >, float > &x, const view1D< matrix::Dense< float >, float > &y) |
float | get_residual_l2 (const matrix::LinearOperator< float > &A, const view1D< vector< float >, float > &x, const view1D< vector< float >, float > &y) |
template<typename T , typename U > | |
bool | is_same_device_mem_stat (const T &arg1, const U &arg2) |
compare same device memory status More... | |
template<typename T , typename U , typename... types> | |
bool | is_same_device_mem_stat (const T &arg1, const U &arg2, const types &... args) |
compare same device memory status More... | |
template bool | is_same_size (const matrix::COO< double > &A, const matrix::COO< double > &B) |
template bool | is_same_size (const matrix::COO< float > &A, const matrix::COO< float > &B) |
template<typename T > | |
bool | is_same_size (const matrix::COO< T > &A, const matrix::COO< T > &B) |
compare row and col size More... | |
template bool | is_same_size (const matrix::CRS< double > &A, const matrix::CRS< double > &B) |
template bool | is_same_size (const matrix::CRS< float > &A, const matrix::CRS< float > &B) |
template<typename T > | |
bool | is_same_size (const matrix::CRS< T > &A, const matrix::CRS< T > &B) |
compare row and col size More... | |
template bool | is_same_size (const matrix::Dense< double > &A, const matrix::Dense< double > &B) |
template bool | is_same_size (const matrix::Dense< float > &A, const matrix::Dense< float > &B) |
template<typename T > | |
bool | is_same_size (const matrix::Dense< T > &A, const matrix::Dense< T > &B) |
compare row and col size More... | |
template bool | is_same_size (const matrix::LinearOperator< double > &A, const matrix::LinearOperator< double > &B) |
template bool | is_same_size (const matrix::LinearOperator< float > &A, const matrix::LinearOperator< float > &B) |
template<typename T > | |
bool | is_same_size (const matrix::LinearOperator< T > &A, const matrix::LinearOperator< T > &B) |
compare row and col size More... | |
template<typename T , typename U , typename... types> | |
bool | is_same_size (const T &arg1, const U &arg2, const types &... args) |
compare matrix size More... | |
template<typename T , typename U > | |
bool | is_same_size (const T &x, const U &y) |
compare size of vector or 1Dview (same as is_same_structure()) More... | |
template bool | is_same_structure (const matrix::COO< double > &A, const matrix::COO< double > &B) |
template bool | is_same_structure (const matrix::COO< float > &A, const matrix::COO< float > &B) |
template<typename T > | |
bool | is_same_structure (const matrix::COO< T > &A, const matrix::COO< T > &B) |
compare structure using col_index and row_index, M, and N More... | |
template bool | is_same_structure (const matrix::CRS< double > &A, const matrix::CRS< double > &B) |
template bool | is_same_structure (const matrix::CRS< float > &A, const matrix::CRS< float > &B) |
template<typename T > | |
bool | is_same_structure (const matrix::CRS< T > &A, const matrix::CRS< T > &B) |
compare structure using structure_hash, M, and N More... | |
template bool | is_same_structure (const matrix::Dense< double > &A, const matrix::Dense< double > &B) |
template bool | is_same_structure (const matrix::Dense< float > &A, const matrix::Dense< float > &B) |
template<typename T > | |
bool | is_same_structure (const matrix::Dense< T > &A, const matrix::Dense< T > &B) |
compare structure using M and N (same as is_same_size()) More... | |
template bool | is_same_structure (const matrix::LinearOperator< double > &A, const matrix::LinearOperator< double > &B) |
template bool | is_same_structure (const matrix::LinearOperator< float > &A, const matrix::LinearOperator< float > &B) |
template<typename T > | |
bool | is_same_structure (const matrix::LinearOperator< T > &A, const matrix::LinearOperator< T > &B) |
compare structure using M and N (same as is_same_size()) More... | |
template<typename T , typename... types> | |
bool | is_same_structure (const T &A, const T &B, const types &... args) |
compare matrix structure More... | |
template<typename T , typename U > | |
bool | is_same_structure (const T A, const U B) |
compare matrix structure More... | |
template<typename T > | |
bool | is_same_structure (const vector< T > &x, const vector< T > &y) |
compare structure of vector (same as is_same_size()) More... | |
template<typename T > | |
matrix::COO< T > | laplacian_matrix_1D (const int &M) |
create 1D Laplacian matrix More... | |
template<typename T > | |
T | laplacian_matrix_1D_eigenvalue (const int &M, int N) |
Nth smallest eigenvalue of 1D Laplacian matrix. More... | |
template<typename T > | |
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) More... | |
template<typename T > | |
void | random_vector (vector< T > &vec, const T min, const T max) |
create random vector More... | |
template<typename T > | |
auto | recv (T &x) |
recv. and free data from GPU More... | |
template<typename T , typename... Types> | |
auto | recv (T &x, Types &... args) |
recv. and free datas to GPU More... | |
template<typename T > | |
auto | send (T &x) |
send data to GPU More... | |
template<typename T , typename... Types> | |
auto | send (T &x, Types &... args) |
send datas to GPU More... | |
void | set_log_filename (const std::string filename) |
Specifying the log finename. More... | |
void | set_log_level (const size_t Level) |
Logger utils ///////////////////////////////. More... | |
bool | solver_check (const int err) |
check error More... | |
template<typename T > | |
matrix::COO< T > | toeplitz_plus_hankel_matrix (const int &M, T a0, T a1, T a2) |
create Toeplitz-plus-Hankel matrix More... | |
template<typename T > | |
T | toeplitz_plus_hankel_matrix_eigenvalue (const int &M, int N, T a0, T a1, T a2, T b0, T b1, T b2) |
Nth smallest eigenvalue of GEVP Ax=lBx of Toeplitz-plus-Hankel matrixes A, B. More... | |
template<typename T > | |
matrix::COO< T > | tridiagonal_toeplitz_matrix (const int &M, T a, T b) |
create tridiagonal Toeplitz matrix More... | |
template<typename T > | |
T | tridiagonal_toeplitz_matrix_eigenvalue (const int &M, int N, T a, T b) |
Nth smallest eigenvalue of MxM tridiagonal Toeplitz matrix. More... | |
monolish utilities
matrix::COO< T > monolish::util::band_matrix | ( | const int | M, |
const int | N, | ||
const int | W, | ||
const T | diag_val, | ||
const T | val | ||
) |
create band matrix
M | # of Row |
N | # of col. |
W | half-bandwidth (bandwidth is 2*W+1) |
diag_val | value of diagonal elements |
val | value of non-diagonal elements |
Definition at line 7 of file band_matrix.cpp.
bool monolish::util::build_with_avx | ( | ) |
get build option (true: with avx, false: without avx)
Definition at line 6 of file system_util.cpp.
bool monolish::util::build_with_avx2 | ( | ) |
get build option (true: with avx2, false: without avx2)
Definition at line 14 of file system_util.cpp.
bool monolish::util::build_with_avx512 | ( | ) |
get build option (true: with avx512, false: without avx512)
Definition at line 22 of file system_util.cpp.
bool monolish::util::build_with_cblas | ( | ) |
get build option (true: with cblas, false: without cblas (=with intel mkl))
Definition at line 54 of file system_util.cpp.
bool monolish::util::build_with_gpu | ( | ) |
get build option (true: enable gpu, false: disable gpu)
Definition at line 30 of file system_util.cpp.
bool monolish::util::build_with_lapack | ( | ) |
get build option (true: with lapack, false: without lapack (=with intel mkl))
Definition at line 46 of file system_util.cpp.
bool monolish::util::build_with_mkl | ( | ) |
get build option (true: with intel mkl, false: without intel mkl)
Definition at line 38 of file system_util.cpp.
auto monolish::util::device_free | ( | T & | x | ) |
free data of GPU
Definition at line 627 of file monolish_common.hpp.
auto monolish::util::device_free | ( | T & | x, |
Types &... | args | ||
) |
free datas of GPU
Definition at line 633 of file monolish_common.hpp.
template matrix::COO< float > monolish::util::eye | ( | const int | M | ) |
template matrix::COO< float > monolish::util::frank_matrix | ( | const int & | M | ) |
template float monolish::util::frank_matrix_eigenvalue | ( | const int & | M, |
const int & | N | ||
) |
double monolish::util::get_residual_l2 | ( | const matrix::CRS< double > & | A, |
const vector< double > & | x, | ||
const vector< double > & | y | ||
) |
get nrm |b-Ax|_2
A | CRS matrix (size M x N) |
x | monolish vector (size N) |
y | monolish vector (size M) |
Definition at line 157 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::CRS< double > & | A, |
const vector< double > & | x, | ||
const view1D< matrix::Dense< double >, double > & | y | ||
) |
Definition at line 165 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::CRS< double > & | A, |
const vector< double > & | x, | ||
const view1D< vector< double >, double > & | y | ||
) |
Definition at line 161 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::CRS< double > & | A, |
const view1D< matrix::Dense< double >, double > & | x, | ||
const vector< double > & | y | ||
) |
Definition at line 184 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::CRS< double > & | A, |
const view1D< matrix::Dense< double >, double > & | x, | ||
const view1D< matrix::Dense< double >, double > & | y | ||
) |
Definition at line 194 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::CRS< double > & | A, |
const view1D< matrix::Dense< double >, double > & | x, | ||
const view1D< vector< double >, double > & | y | ||
) |
Definition at line 189 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::CRS< double > & | A, |
const view1D< vector< double >, double > & | x, | ||
const vector< double > & | y | ||
) |
Definition at line 169 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::CRS< double > & | A, |
const view1D< vector< double >, double > & | x, | ||
const view1D< matrix::Dense< double >, double > & | y | ||
) |
Definition at line 179 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::CRS< double > & | A, |
const view1D< vector< double >, double > & | x, | ||
const view1D< vector< double >, double > & | y | ||
) |
Definition at line 174 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::CRS< float > & | A, |
const vector< float > & | x, | ||
const vector< float > & | y | ||
) |
Definition at line 199 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::CRS< float > & | A, |
const vector< float > & | x, | ||
const view1D< matrix::Dense< float >, float > & | y | ||
) |
Definition at line 207 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::CRS< float > & | A, |
const vector< float > & | x, | ||
const view1D< vector< float >, float > & | y | ||
) |
Definition at line 203 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::CRS< float > & | A, |
const view1D< matrix::Dense< float >, float > & | x, | ||
const vector< float > & | y | ||
) |
Definition at line 226 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::CRS< float > & | A, |
const view1D< matrix::Dense< float >, float > & | x, | ||
const view1D< matrix::Dense< float >, float > & | y | ||
) |
Definition at line 236 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::CRS< float > & | A, |
const view1D< matrix::Dense< float >, float > & | x, | ||
const view1D< vector< float >, float > & | y | ||
) |
Definition at line 231 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::CRS< float > & | A, |
const view1D< vector< float >, float > & | x, | ||
const vector< float > & | y | ||
) |
Definition at line 211 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::CRS< float > & | A, |
const view1D< vector< float >, float > & | x, | ||
const view1D< matrix::Dense< float >, float > & | y | ||
) |
Definition at line 221 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::CRS< float > & | A, |
const view1D< vector< float >, float > & | x, | ||
const view1D< vector< float >, float > & | y | ||
) |
Definition at line 216 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::Dense< double > & | A, |
const vector< double > & | x, | ||
const vector< double > & | y | ||
) |
get nrm |b-Ax|_2
A | Dense matrix (size M x N) |
x | monolish vector (size N) |
y | monolish vector (size M) |
Definition at line 72 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::Dense< double > & | A, |
const vector< double > & | x, | ||
const view1D< matrix::Dense< double >, double > & | y | ||
) |
Definition at line 80 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::Dense< double > & | A, |
const vector< double > & | x, | ||
const view1D< vector< double >, double > & | y | ||
) |
Definition at line 76 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::Dense< double > & | A, |
const view1D< matrix::Dense< double >, double > & | x, | ||
const vector< double > & | y | ||
) |
Definition at line 99 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::Dense< double > & | A, |
const view1D< matrix::Dense< double >, double > & | x, | ||
const view1D< matrix::Dense< double >, double > & | y | ||
) |
Definition at line 109 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::Dense< double > & | A, |
const view1D< matrix::Dense< double >, double > & | x, | ||
const view1D< vector< double >, double > & | y | ||
) |
Definition at line 104 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::Dense< double > & | A, |
const view1D< vector< double >, double > & | x, | ||
const vector< double > & | y | ||
) |
Definition at line 84 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::Dense< double > & | A, |
const view1D< vector< double >, double > & | x, | ||
const view1D< matrix::Dense< double >, double > & | y | ||
) |
Definition at line 94 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::Dense< double > & | A, |
const view1D< vector< double >, double > & | x, | ||
const view1D< vector< double >, double > & | y | ||
) |
Definition at line 89 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::Dense< float > & | A, |
const vector< float > & | x, | ||
const vector< float > & | y | ||
) |
Definition at line 114 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::Dense< float > & | A, |
const vector< float > & | x, | ||
const view1D< matrix::Dense< float >, float > & | y | ||
) |
Definition at line 122 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::Dense< float > & | A, |
const vector< float > & | x, | ||
const view1D< vector< float >, float > & | y | ||
) |
Definition at line 118 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::Dense< float > & | A, |
const view1D< matrix::Dense< float >, float > & | x, | ||
const vector< float > & | y | ||
) |
Definition at line 141 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::Dense< float > & | A, |
const view1D< matrix::Dense< float >, float > & | x, | ||
const view1D< matrix::Dense< float >, float > & | y | ||
) |
Definition at line 151 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::Dense< float > & | A, |
const view1D< matrix::Dense< float >, float > & | x, | ||
const view1D< vector< float >, float > & | y | ||
) |
Definition at line 146 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::Dense< float > & | A, |
const view1D< vector< float >, float > & | x, | ||
const vector< float > & | y | ||
) |
Definition at line 126 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::Dense< float > & | A, |
const view1D< vector< float >, float > & | x, | ||
const view1D< matrix::Dense< float >, float > & | y | ||
) |
Definition at line 136 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::Dense< float > & | A, |
const view1D< vector< float >, float > & | x, | ||
const view1D< vector< float >, float > & | y | ||
) |
Definition at line 131 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< double > & | A, |
const vector< double > & | x, | ||
const vector< double > & | y | ||
) |
get nrm |b-Ax|_2
A | LinearOperator (size M x N) |
x | monolish vector (size N) |
y | monolish vector (size M) |
Definition at line 242 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< double > & | A, |
const vector< double > & | x, | ||
const view1D< matrix::Dense< double >, double > & | y | ||
) |
Definition at line 251 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< double > & | A, |
const vector< double > & | x, | ||
const view1D< vector< double >, double > & | y | ||
) |
Definition at line 246 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< double > & | A, |
const view1D< matrix::Dense< double >, double > & | x, | ||
const vector< double > & | y | ||
) |
Definition at line 271 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< double > & | A, |
const view1D< matrix::Dense< double >, double > & | x, | ||
const view1D< matrix::Dense< double >, double > & | y | ||
) |
Definition at line 281 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< double > & | A, |
const view1D< matrix::Dense< double >, double > & | x, | ||
const view1D< vector< double >, double > & | y | ||
) |
Definition at line 276 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< double > & | A, |
const view1D< vector< double >, double > & | x, | ||
const vector< double > & | y | ||
) |
Definition at line 256 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< double > & | A, |
const view1D< vector< double >, double > & | x, | ||
const view1D< matrix::Dense< double >, double > & | y | ||
) |
Definition at line 266 of file equation_utils.cpp.
double monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< double > & | A, |
const view1D< vector< double >, double > & | x, | ||
const view1D< vector< double >, double > & | y | ||
) |
Definition at line 261 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< float > & | A, |
const vector< float > & | x, | ||
const vector< float > & | y | ||
) |
Definition at line 286 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< float > & | A, |
const vector< float > & | x, | ||
const view1D< matrix::Dense< float >, float > & | y | ||
) |
Definition at line 295 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< float > & | A, |
const vector< float > & | x, | ||
const view1D< vector< float >, float > & | y | ||
) |
Definition at line 290 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< float > & | A, |
const view1D< matrix::Dense< float >, float > & | x, | ||
const vector< float > & | y | ||
) |
Definition at line 315 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< float > & | A, |
const view1D< matrix::Dense< float >, float > & | x, | ||
const view1D< matrix::Dense< float >, float > & | y | ||
) |
Definition at line 325 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< float > & | A, |
const view1D< matrix::Dense< float >, float > & | x, | ||
const view1D< vector< float >, float > & | y | ||
) |
Definition at line 320 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< float > & | A, |
const view1D< vector< float >, float > & | x, | ||
const vector< float > & | y | ||
) |
Definition at line 300 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< float > & | A, |
const view1D< vector< float >, float > & | x, | ||
const view1D< matrix::Dense< float >, float > & | y | ||
) |
Definition at line 310 of file equation_utils.cpp.
float monolish::util::get_residual_l2 | ( | const matrix::LinearOperator< float > & | A, |
const view1D< vector< float >, float > & | x, | ||
const view1D< vector< float >, float > & | y | ||
) |
Definition at line 305 of file equation_utils.cpp.
bool monolish::util::is_same_device_mem_stat | ( | const T & | arg1, |
const U & | arg2 | ||
) |
compare same device memory status
Definition at line 431 of file monolish_common.hpp.
bool monolish::util::is_same_device_mem_stat | ( | const T & | arg1, |
const U & | arg2, | ||
const types &... | args | ||
) |
compare same device memory status
Definition at line 443 of file monolish_common.hpp.
template bool monolish::util::is_same_size | ( | const matrix::COO< double > & | A, |
const matrix::COO< double > & | B | ||
) |
template bool monolish::util::is_same_size | ( | const matrix::COO< float > & | A, |
const matrix::COO< float > & | B | ||
) |
bool monolish::util::is_same_size | ( | const matrix::COO< T > & | A, |
const matrix::COO< T > & | B | ||
) |
compare row and col size
A | COO matrix |
B | COO matrix |
Definition at line 134 of file compare_coo.cpp.
template bool monolish::util::is_same_size | ( | const matrix::CRS< double > & | A, |
const matrix::CRS< double > & | B | ||
) |
template bool monolish::util::is_same_size | ( | const matrix::CRS< float > & | A, |
const matrix::CRS< float > & | B | ||
) |
bool monolish::util::is_same_size | ( | const matrix::CRS< T > & | A, |
const matrix::CRS< T > & | B | ||
) |
compare row and col size
A | COO matrix |
B | COO matrix |
Definition at line 125 of file compare_crs.cpp.
template bool monolish::util::is_same_size | ( | const matrix::Dense< double > & | A, |
const matrix::Dense< double > & | B | ||
) |
template bool monolish::util::is_same_size | ( | const matrix::Dense< float > & | A, |
const matrix::Dense< float > & | B | ||
) |
bool monolish::util::is_same_size | ( | const matrix::Dense< T > & | A, |
const matrix::Dense< T > & | B | ||
) |
compare row and col size
A | Dense matrix |
B | Dense matrix |
Definition at line 95 of file compare_dense.cpp.
template bool monolish::util::is_same_size | ( | const matrix::LinearOperator< double > & | A, |
const matrix::LinearOperator< double > & | B | ||
) |
template bool monolish::util::is_same_size | ( | const matrix::LinearOperator< float > & | A, |
const matrix::LinearOperator< float > & | B | ||
) |
bool monolish::util::is_same_size | ( | const matrix::LinearOperator< T > & | A, |
const matrix::LinearOperator< T > & | B | ||
) |
compare row and col size
A | LinearOperator matrix |
B | LinearOperator matrix |
Definition at line 32 of file compare_linearoperator.cpp.
bool monolish::util::is_same_size | ( | const T & | arg1, |
const U & | arg2, | ||
const types &... | args | ||
) |
compare matrix size
Definition at line 419 of file monolish_common.hpp.
bool monolish::util::is_same_size | ( | const T & | x, |
const U & | y | ||
) |
compare size of vector or 1Dview (same as is_same_structure())
x | monolish vector |
y | monolish vector |
Definition at line 358 of file monolish_common.hpp.
template bool monolish::util::is_same_structure | ( | const matrix::COO< double > & | A, |
const matrix::COO< double > & | B | ||
) |
template bool monolish::util::is_same_structure | ( | const matrix::COO< float > & | A, |
const matrix::COO< float > & | B | ||
) |
bool monolish::util::is_same_structure | ( | const matrix::COO< T > & | A, |
const matrix::COO< T > & | B | ||
) |
compare structure using col_index and row_index, M, and N
A | COO matrix |
B | COO matrix |
Definition at line 102 of file compare_coo.cpp.
template bool monolish::util::is_same_structure | ( | const matrix::CRS< double > & | A, |
const matrix::CRS< double > & | B | ||
) |
template bool monolish::util::is_same_structure | ( | const matrix::CRS< float > & | A, |
const matrix::CRS< float > & | B | ||
) |
bool monolish::util::is_same_structure | ( | const matrix::CRS< T > & | A, |
const matrix::CRS< T > & | B | ||
) |
compare structure using structure_hash, M, and N
A | CRS matrix |
B | CRS matrix |
Definition at line 99 of file compare_crs.cpp.
template bool monolish::util::is_same_structure | ( | const matrix::Dense< double > & | A, |
const matrix::Dense< double > & | B | ||
) |
template bool monolish::util::is_same_structure | ( | const matrix::Dense< float > & | A, |
const matrix::Dense< float > & | B | ||
) |
bool monolish::util::is_same_structure | ( | const matrix::Dense< T > & | A, |
const matrix::Dense< T > & | B | ||
) |
compare structure using M and N (same as is_same_size())
A | Dense matrix |
B | Dense matrix |
Definition at line 74 of file compare_dense.cpp.
template bool monolish::util::is_same_structure | ( | const matrix::LinearOperator< double > & | A, |
const matrix::LinearOperator< double > & | B | ||
) |
template bool monolish::util::is_same_structure | ( | const matrix::LinearOperator< float > & | A, |
const matrix::LinearOperator< float > & | B | ||
) |
bool monolish::util::is_same_structure | ( | const matrix::LinearOperator< T > & | A, |
const matrix::LinearOperator< T > & | B | ||
) |
compare structure using M and N (same as is_same_size())
A | LinearOperator matrix |
B | LinearOperator matrix |
Definition at line 10 of file compare_linearoperator.cpp.
bool monolish::util::is_same_structure | ( | const T & | A, |
const T & | B, | ||
const types &... | args | ||
) |
compare matrix structure
Definition at line 344 of file monolish_common.hpp.
bool monolish::util::is_same_structure | ( | const T | A, |
const U | B | ||
) |
compare matrix structure
Definition at line 268 of file monolish_common.hpp.
bool monolish::util::is_same_structure | ( | const vector< T > & | x, |
const vector< T > & | y | ||
) |
compare structure of vector (same as is_same_size())
x | monolish vector |
y | monolish vector |
Definition at line 283 of file monolish_common.hpp.
template matrix::COO< float > monolish::util::laplacian_matrix_1D | ( | const int & | M | ) |
create 1D Laplacian matrix
M | # of row and col |
Definition at line 6 of file laplacian.cpp.
template float monolish::util::laplacian_matrix_1D_eigenvalue | ( | const int & | M, |
int | N | ||
) |
Nth smallest eigenvalue of 1D Laplacian matrix.
M | dimension of tridiagonal Toeplitz matrix |
N | #-th eigenvalue from the bottom |
Definition at line 13 of file laplacian.cpp.
matrix::COO< T > monolish::util::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)
M | # of Row |
N | # of col. |
nnzrow | non-zero elements per row |
val | value of elements |
Definition at line 8 of file random_stracture.cpp.
void monolish::util::random_vector | ( | vector< T > & | vec, |
const T | min, | ||
const T | max | ||
) |
create random vector
vec | allocated vector |
min | min. of random |
max | min. of random |
Definition at line 252 of file monolish_common.hpp.
auto monolish::util::recv | ( | T & | x | ) |
recv. and free data from GPU
Definition at line 612 of file monolish_common.hpp.
auto monolish::util::recv | ( | T & | x, |
Types &... | args | ||
) |
recv. and free datas to GPU
Definition at line 617 of file monolish_common.hpp.
auto monolish::util::send | ( | T & | x | ) |
send data to GPU
Definition at line 598 of file monolish_common.hpp.
auto monolish::util::send | ( | T & | x, |
Types &... | args | ||
) |
send datas to GPU
Definition at line 603 of file monolish_common.hpp.
void monolish::util::set_log_filename | ( | const std::string | filename | ) |
Specifying the log finename.
filename | the log filename |
Definition at line 161 of file logger_utils.cpp.
void monolish::util::set_log_level | ( | const size_t | Level | ) |
Logger utils ///////////////////////////////.
logger util ///
Specifying the log level
Level | loglevel |
Definition at line 156 of file logger_utils.cpp.
bool monolish::util::solver_check | ( | const int | err | ) |
check error
[in] | err | solver err code |
Definition at line 7 of file equation_utils.cpp.
matrix::COO< T > monolish::util::toeplitz_plus_hankel_matrix | ( | const int & | M, |
T | a0, | ||
T | a1, | ||
T | a2 | ||
) |
create Toeplitz-plus-Hankel matrix
M | # of row and col |
a0 | value of diagonal elements |
a1 | value of next-to-diagonal elements |
a2 | value of second-next-to-diagonal elements |
Definition at line 7 of file toeplitz_plus_hankel.cpp.
T monolish::util::toeplitz_plus_hankel_matrix_eigenvalue | ( | const int & | M, |
int | N, | ||
T | a0, | ||
T | a1, | ||
T | a2, | ||
T | b0, | ||
T | b1, | ||
T | b2 | ||
) |
Nth smallest eigenvalue of GEVP Ax=lBx of Toeplitz-plus-Hankel matrixes A, B.
M | dimension of Toeplitz-plus-Hankel marices |
N | #-th eigenvalue from the bottom |
a0,a1,a2 | value of Toeplitz-plus-Hankel matrix A |
b0,b1,b2 | value of TOeplitz-plus-Hankel matrix B |
Definition at line 46 of file toeplitz_plus_hankel.cpp.
matrix::COO< T > monolish::util::tridiagonal_toeplitz_matrix | ( | const int & | M, |
T | a, | ||
T | b | ||
) |
create tridiagonal Toeplitz matrix
M | # of row and col |
a | value of diagonal elements |
b | value of next-to-diagonal elements |
Definition at line 7 of file tridiagonal_toeplitz.cpp.
T monolish::util::tridiagonal_toeplitz_matrix_eigenvalue | ( | const int & | M, |
int | N, | ||
T | a, | ||
T | b | ||
) |
Nth smallest eigenvalue of MxM tridiagonal Toeplitz matrix.
M | dimension of tridiagonal Toeplitz matrix |
N | #-th eigenvalue from the bottom |
a | value of diagonal elements |
b | value of next-to-diagonal elements |
Definition at line 31 of file tridiagonal_toeplitz.cpp.