monolish
0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
|
Linear Operator imitating Matrix. More...
#include <monolish_coo.hpp>
Public Member Functions | |
void | convert (COO< Float > &coo) |
Convert LinearOperator from COO. More... | |
void | convert (CRS< Float > &crs) |
void | convert_to_Dense (Dense< Float > &dense) const |
void | device_free () const |
free data on GPU More... | |
size_t | get_col () const |
get # of col More... | |
bool | get_device_mem_stat () const |
true: sended, false: not send More... | |
std::function< vector< Float >const vector< Float > &)> | get_matvec () const |
get multiplication function of matrix and vector More... | |
bool | get_matvec_init_flag () const |
get flag that shows matvec is defined or not More... | |
std::function< vector< Float >const vector< Float > &)> | get_rmatvec () const |
get multiplication function of (Hermitian) transposed matrix and vector C = A; More... | |
bool | get_rmatvec_init_flag () const |
get flag that shows rmatvec is defined or not More... | |
size_t | get_row () const |
get # of row More... | |
LinearOperator () | |
LinearOperator (const LinearOperator< Float > &linearoperator) | |
Create LinearOperator from LinearOperator. More... | |
LinearOperator (const size_t M, const size_t N) | |
declare LinearOperator More... | |
LinearOperator (const size_t M, const size_t N, const std::function< vector< Float >(const vector< Float > &)> &MATVEC) | |
declare LinearOperator More... | |
LinearOperator (const size_t M, const size_t N, const std::function< vector< Float >(const vector< Float > &)> &MATVEC, const std::function< vector< Float >(const vector< Float > &)> &RMATVEC) | |
declare LinearOperator More... | |
LinearOperator (COO< Float > &coo) | |
Create LinearOperator from COO. More... | |
LinearOperator (CRS< Float > &crs) | |
void | nonfree_recv () const |
recv. data to GPU (w/o free) More... | |
void | operator= (const LinearOperator< Float > &mat) |
operator copy More... | |
void | recv () const |
recv. data to GPU, and free data on GPU More... | |
void | send () const |
send data to GPU More... | |
void | set_device_mem_stat (bool status) |
void | set_matvec (const std::function< vector< Float >(const vector< Float > &)> &MATVEC) |
set multiplication function of matrix and vector More... | |
void | set_rmatvec (const std::function< vector< Float >(const vector< Float > &)> &RMATVEC) |
set multiplication function of (Hermitian) transposed matrix and vector More... | |
std::string | type () const |
get format name "LinearOperator" More... | |
~LinearOperator () | |
destructor of LinearOperator, free GPU memory More... | |
Private Attributes | |
size_t | colN |
# of col More... | |
bool | gpu_status = false |
true: sended, false: not send More... | |
std::function< vector< Float >const vector< Float > &)> | matvec |
pseudo multiplication function of matrix and vector More... | |
bool | matvec_init_flag |
flag that shows matvec is defined or not More... | |
std::function< vector< Float >const vector< Float > &)> | rmatvec |
pseudo multiplication function of (Hermitian) transposed matrix and vector More... | |
bool | rmatvec_init_flag |
flag that shows rmatvec is defined or not More... | |
size_t | rowN |
# of row More... | |
Linear Operator imitating Matrix.
Definition at line 30 of file monolish_coo.hpp.
|
inline |
Definition at line 69 of file monolish_linearoperator.hpp.
template monolish::matrix::LinearOperator< Float >::LinearOperator | ( | const size_t | M, |
const size_t | N | ||
) |
declare LinearOperator
M | # of row |
N | # of col |
Definition at line 17 of file linearoperator_constructor.cpp.
monolish::matrix::LinearOperator< Float >::LinearOperator | ( | const size_t | M, |
const size_t | N, | ||
const std::function< vector< Float >(const vector< Float > &)> & | MATVEC | ||
) |
declare LinearOperator
M | # of row |
N | # of col |
MATVEC | multiplication function of matrix and vector |
monolish::matrix::LinearOperator< Float >::LinearOperator | ( | const size_t | M, |
const size_t | N, | ||
const std::function< vector< Float >(const vector< Float > &)> & | MATVEC, | ||
const std::function< vector< Float >(const vector< Float > &)> & | RMATVEC | ||
) |
declare LinearOperator
M | # of row |
N | # of col |
MATVEC | multiplication function of matrix and vector |
RMATVEC | multiplication function of (Hermitian) transposed matrix and vector |
|
inline |
Create LinearOperator from COO.
coo | Source COO format matrix |
Definition at line 130 of file monolish_linearoperator.hpp.
|
inline |
Definition at line 134 of file monolish_linearoperator.hpp.
monolish::matrix::LinearOperator< Float >::LinearOperator | ( | const LinearOperator< Float > & | linearoperator | ) |
Create LinearOperator from LinearOperator.
LinearOperator | format LinearOperator |
|
inline |
destructor of LinearOperator, free GPU memory
Definition at line 286 of file monolish_linearoperator.hpp.
void monolish::matrix::LinearOperator< Float >::convert | ( | COO< Float > & | coo | ) |
Convert LinearOperator from COO.
coo | COO format matrix |
void monolish::matrix::LinearOperator< Float >::convert | ( | CRS< Float > & | crs | ) |
template void monolish::matrix::LinearOperator< Float >::convert_to_Dense | ( | Dense< Float > & | dense | ) | const |
|
inline |
free data on GPU
Definition at line 267 of file monolish_linearoperator.hpp.
|
inline |
get # of col
Definition at line 164 of file monolish_linearoperator.hpp.
|
inline |
true: sended, false: not send
Definition at line 273 of file monolish_linearoperator.hpp.
|
inline |
get multiplication function of matrix and vector
Definition at line 173 of file monolish_linearoperator.hpp.
|
inline |
get flag that shows matvec is defined or not
Definition at line 196 of file monolish_linearoperator.hpp.
|
inline |
get multiplication function of (Hermitian) transposed matrix and vector C = A;
Definition at line 185 of file monolish_linearoperator.hpp.
|
inline |
get flag that shows rmatvec is defined or not
Definition at line 205 of file monolish_linearoperator.hpp.
|
inline |
get # of row
Definition at line 155 of file monolish_linearoperator.hpp.
|
inline |
recv. data to GPU (w/o free)
Definition at line 259 of file monolish_linearoperator.hpp.
template void monolish::matrix::LinearOperator< Float >::operator= | ( | const LinearOperator< Float > & | mat | ) |
operator copy
Definition at line 9 of file copy_linearoperator.cpp.
|
inline |
recv. data to GPU, and free data on GPU
Definition at line 251 of file monolish_linearoperator.hpp.
|
inline |
send data to GPU
Definition at line 243 of file monolish_linearoperator.hpp.
|
inline |
Definition at line 275 of file monolish_linearoperator.hpp.
template void monolish::matrix::LinearOperator< Float >::set_matvec | ( | const std::function< vector< Float >(const vector< Float > &)> & | MATVEC | ) |
set multiplication function of matrix and vector
Definition at line 102 of file linearoperator_constructor.cpp.
template void monolish::matrix::LinearOperator< Float >::set_rmatvec | ( | const std::function< vector< Float >(const vector< Float > &)> & | RMATVEC | ) |
set multiplication function of (Hermitian) transposed matrix and vector
Definition at line 114 of file linearoperator_constructor.cpp.
|
inline |
get format name "LinearOperator"
Definition at line 235 of file monolish_linearoperator.hpp.
|
private |
# of col
Definition at line 40 of file monolish_linearoperator.hpp.
|
mutableprivate |
true: sended, false: not send
Definition at line 55 of file monolish_linearoperator.hpp.
|
private |
pseudo multiplication function of matrix and vector
Definition at line 60 of file monolish_linearoperator.hpp.
|
private |
flag that shows matvec is defined or not
Definition at line 45 of file monolish_linearoperator.hpp.
|
private |
pseudo multiplication function of (Hermitian) transposed matrix and vector
Definition at line 66 of file monolish_linearoperator.hpp.
|
private |
flag that shows rmatvec is defined or not
Definition at line 50 of file monolish_linearoperator.hpp.
|
private |
# of row
Definition at line 35 of file monolish_linearoperator.hpp.