monolish  0.17.3-dev.16
MONOlithic LInear equation Solvers for Highly-parallel architecture
Functions
monolish::util Namespace Reference

monolish utilities More...

Functions

template<typename T >
matrix::COO< T > asym_band_matrix (const int M, const int N, const int W, const T diag_val, const T Uval, const T Lval)
 create asymmetric band matrix More...
 
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...
 
bool build_with_mpi ()
 get build option (true: enable MPI, false: disable MPI) More...
 
template<typename T >
void device_free (T &x)
 free data of GPU More...
 
template<typename T , typename... Types>
void device_free (T &x, Types &...args)
 free data 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 >
frank_matrix_eigenvalue (const int &M, const int &N)
 Nth eigenvalue from the bottom of MxM Frank matrix. More...
 
int get_default_device ()
 get default device number More...
 
int get_num_devices ()
 get the number of devices 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< tensor::tensor_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< tensor::tensor_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< tensor::tensor_Dense< double >, double > &x, const vector< double > &y)
 
double get_residual_l2 (const matrix::CRS< double > &A, const view1D< tensor::tensor_Dense< double >, double > &x, const view1D< matrix::Dense< double >, double > &y)
 
double get_residual_l2 (const matrix::CRS< double > &A, const view1D< tensor::tensor_Dense< double >, double > &x, const view1D< tensor::tensor_Dense< double >, double > &y)
 
double get_residual_l2 (const matrix::CRS< double > &A, const view1D< tensor::tensor_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< tensor::tensor_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< tensor::tensor_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< tensor::tensor_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< tensor::tensor_Dense< float >, float > &x, const vector< float > &y)
 
float get_residual_l2 (const matrix::CRS< float > &A, const view1D< tensor::tensor_Dense< float >, float > &x, const view1D< matrix::Dense< float >, float > &y)
 
float get_residual_l2 (const matrix::CRS< float > &A, const view1D< tensor::tensor_Dense< float >, float > &x, const view1D< tensor::tensor_Dense< float >, float > &y)
 
float get_residual_l2 (const matrix::CRS< float > &A, const view1D< tensor::tensor_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< tensor::tensor_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< tensor::tensor_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< tensor::tensor_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< tensor::tensor_Dense< double >, double > &x, const vector< double > &y)
 
double get_residual_l2 (const matrix::Dense< double > &A, const view1D< tensor::tensor_Dense< double >, double > &x, const view1D< matrix::Dense< double >, double > &y)
 
double get_residual_l2 (const matrix::Dense< double > &A, const view1D< tensor::tensor_Dense< double >, double > &x, const view1D< tensor::tensor_Dense< double >, double > &y)
 
double get_residual_l2 (const matrix::Dense< double > &A, const view1D< tensor::tensor_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< tensor::tensor_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< tensor::tensor_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< tensor::tensor_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< tensor::tensor_Dense< float >, float > &x, const vector< float > &y)
 
float get_residual_l2 (const matrix::Dense< float > &A, const view1D< tensor::tensor_Dense< float >, float > &x, const view1D< matrix::Dense< float >, float > &y)
 
float get_residual_l2 (const matrix::Dense< float > &A, const view1D< tensor::tensor_Dense< float >, float > &x, const view1D< tensor::tensor_Dense< float >, float > &y)
 
float get_residual_l2 (const matrix::Dense< float > &A, const view1D< tensor::tensor_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< tensor::tensor_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< tensor::tensor_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< tensor::tensor_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< tensor::tensor_Dense< double >, double > &x, const vector< double > &y)
 
double get_residual_l2 (const matrix::LinearOperator< double > &A, const view1D< tensor::tensor_Dense< double >, double > &x, const view1D< matrix::Dense< double >, double > &y)
 
double get_residual_l2 (const matrix::LinearOperator< double > &A, const view1D< tensor::tensor_Dense< double >, double > &x, const view1D< tensor::tensor_Dense< double >, double > &y)
 
double get_residual_l2 (const matrix::LinearOperator< double > &A, const view1D< tensor::tensor_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< tensor::tensor_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)
 
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<typename T >
bool is_same_size (const matrix::COO< T > &A, const matrix::COO< T > &B)
 compare row and col size More...
 
template<typename T >
bool is_same_size (const matrix::CRS< T > &A, const matrix::CRS< T > &B)
 compare row and col size More...
 
template<typename T >
bool is_same_size (const matrix::Dense< T > &A, const matrix::Dense< T > &B)
 compare row and col size More...
 
template<typename T , typename U >
bool is_same_size (const matrix::Dense< U > &A, const view_Dense< T, U > &B)
 compare row and col size More...
 
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 V , typename... types>
bool is_same_size (const T &arg1, const U &arg2, const V &arg3, 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<typename T >
bool is_same_size (const tensor::tensor_COO< T > &A, const tensor::tensor_COO< T > &B)
 compare shape More...
 
template<typename T >
bool is_same_size (const tensor::tensor_Dense< T > &A, const tensor::tensor_Dense< T > &B)
 compare shape More...
 
template<typename T , typename U >
bool is_same_size (const tensor::tensor_Dense< U > &A, const view_tensor_Dense< T, U > &B)
 compare shape More...
 
template<typename T , typename U >
bool is_same_size (const view_Dense< T, U > &A, const matrix::Dense< U > &B)
 compare row and col size More...
 
template<typename T , typename U , typename V >
bool is_same_size (const view_Dense< T, V > &A, const view_Dense< U, V > &B)
 compare row and col size More...
 
template<typename T , typename U >
bool is_same_size (const view_tensor_Dense< T, U > &A, const tensor::tensor_Dense< U > &B)
 compare shape More...
 
template<typename T , typename U , typename V >
bool is_same_size (const view_tensor_Dense< T, V > &A, const view_tensor_Dense< U, V > &B)
 compare shape More...
 
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<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<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<typename T , typename U >
bool is_same_structure (const matrix::Dense< U > &A, const view_Dense< T, U > &B)
 compare structure using M and N (same as is_same_size()) More...
 
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 U , typename V , typename... types>
bool is_same_structure (const T &A, const U &B, const V &C, 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 tensor::tensor_COO< T > &A, const tensor::tensor_COO< T > &B)
 compare structure using col_index and row_index, M, and N More...
 
template<typename T >
bool is_same_structure (const tensor::tensor_Dense< T > &A, const tensor::tensor_Dense< T > &B)
 compare structure using M and N (same as is_same_size()) More...
 
template<typename T , typename U >
bool is_same_structure (const tensor::tensor_Dense< U > &A, const view_tensor_Dense< T, U > &B)
 compare structure using M and N (same as is_same_size()) 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 , typename U >
bool is_same_structure (const vector< U > &x, const view1D< T, U > &y)
 compare structure of vector (same as is_same_size()) More...
 
template<typename T , typename U >
bool is_same_structure (const view1D< T, U > &x, const vector< U > &y)
 compare structure of vector (same as is_same_size()) More...
 
template<typename T , typename U , typename V >
bool is_same_structure (const view1D< T, V > &x, const view1D< U, V > &y)
 compare structure of vector (same as is_same_size()) More...
 
template<typename T , typename U >
bool is_same_structure (const view_Dense< T, U > &A, const matrix::Dense< U > &B)
 compare structure using M and N (same as is_same_size()) More...
 
template<typename T , typename U , typename V >
bool is_same_structure (const view_Dense< T, V > &A, const view_Dense< U, V > &B)
 compare structure using M and N (same as is_same_size()) More...
 
template<typename T , typename U >
bool is_same_structure (const view_tensor_Dense< T, U > &A, const tensor::tensor_Dense< U > &B)
 compare structure using M and N (same as is_same_size()) More...
 
template<typename T , typename U , typename V >
bool is_same_structure (const view_tensor_Dense< T, V > &A, const view_tensor_Dense< U, V > &B)
 compare structure using M and N (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 >
laplacian_matrix_1D_eigenvalue (const int &M, int N)
 Nth smallest eigenvalue of 1D Laplacian matrix. More...
 
template<typename T >
matrix::COO< T > laplacian_matrix_2D_5p (const int M, const int N)
 create two dimensional Laplacian matrix using the five point central difference scheme 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 >
tensor::tensor_COO< T > random_structure_tensor (const size_t K, const size_t M, const size_t N, const size_t L, const size_t nnzrow, const T val)
 create random structure tensor (index is decided by random) More...
 
template<typename T >
tensor::tensor_COO< T > random_structure_tensor (const size_t M, const size_t N, const size_t L, const size_t nnzrow, const T val)
 create random structure tensor (index is decided by random) More...
 
template<typename T >
tensor::tensor_COO< T > random_structure_tensor (const size_t M, const size_t N, const size_t nnzrow, const T val)
 create random structure tensor (index 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 >
void random_vector (vector< T > &vec, const T min, const T max, const std::uint32_t seed)
 create random vector with random seed More...
 
template<typename T >
void recv (T &x)
 recv. and free data from GPU More...
 
template<typename T , typename... Types>
void recv (T &x, Types &...args)
 recv. and free data to GPU More...
 
template<typename T >
void send (T &x)
 send data to GPU More...
 
template<typename T , typename... Types>
void send (T &x, Types &...args)
 send data to GPU More...
 
bool set_default_device (size_t device_num)
 set default device number More...
 
void set_log_filename (const std::string filename)
 Specifying the log finename. More...
 
void set_log_level (const size_t Level)
 Specifying the log level. 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 >
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 >
tridiagonal_toeplitz_matrix_eigenvalue (const int &M, int N, T a, T b)
 Nth smallest eigenvalue of MxM tridiagonal Toeplitz matrix. More...
 

Detailed Description

monolish utilities