18 template <
typename Float>
class vector;
20 template <
typename Float>
class Dense;
21 template <
typename Float>
class COO;
22 template <
typename Float>
class CRS;
99 const size_t M,
const size_t N,
115 const size_t M,
const size_t N,
130 const size_t M,
const size_t N,
146 const size_t M,
const size_t N,
214 [[nodiscard]] std::function<vector<Float>(
const vector<Float> &)>
227 [[nodiscard]] std::function<vector<Float>(
const vector<Float> &)>
239 [[nodiscard]] std::function<
253 [[nodiscard]] std::function<
267 return !(
matvec ==
nullptr);
354 [[nodiscard]] std::string
type()
const {
return "LinearOperator"; }
Coodinate (COO) format Matrix (need to sort)
Compressed Row Storage (CRS) format Matrix.
Linear Operator imitating Matrix.
std::function< vector< Float >const vector< Float > &)> rmatvec
pseudo multiplication function of (Hermitian) transposed matrix and vector
void convert(CRS< Float > &crs)
LinearOperator(const size_t M, const size_t N, const std::function< Dense< Float >(const Dense< Float > &)> &MATMUL, const std::function< Dense< Float >(const Dense< Float > &)> &RMATMUL)
declare LinearOperator
void set_matmul_dense(const std::function< matrix::Dense< Float >(const matrix::Dense< Float > &)> &MATMUL)
set multiplication function of matrix and matrix dense
void convert_to_Dense(Dense< Float > &dense) const
std::function< vector< Float >const vector< Float > &)> matvec
pseudo multiplication function of matrix and vector
bool get_device_mem_stat() const
true: sended, false: not send
void set_rmatmul_dense(const std::function< matrix::Dense< Float >(const matrix::Dense< Float > &)> &RMATMUL)
set multiplication function of (Hermitian) transposed matrix and matrix dense
bool get_matmul_dense_init_flag() const
get flag that shows matmul_dense is defined or not
~LinearOperator()
destructor of LinearOperator, free GPU memory
void nonfree_recv() const
recv. data to GPU (w/o free)
bool get_rmatmul_dense_init_flag() const
get flag that shows rmatmul_dense is defined or not
void recv() const
recv. data to GPU, and free data on GPU
bool gpu_status
true: sended, false: not send
void convert(COO< Float > &coo)
Convert LinearOperator from COO.
void set_matvec(const std::function< vector< Float >(const vector< Float > &)> &MATVEC)
set multiplication function of matrix and vector
std::function< Dense< Float >const Dense< Float > &)> rmatmul_dense
pseudo multiplication function of (Hermitian) transposed matrix and dense matrix
bool get_rmatvec_init_flag() const
get flag that shows rmatvec is defined or not
void set_device_mem_stat(bool status)
void diag(view1D< vector< Float >, Float > &vec) const
LinearOperator(const size_t M, const size_t N)
declare LinearOperator
void operator=(const LinearOperator< Float > &mat)
operator copy
LinearOperator(COO< Float > &coo)
Create LinearOperator from COO.
std::function< matrix::Dense< Float >const matrix::Dense< Float > &)> get_rmatmul_dense() const
get multiplication function of (Hermitian) transposed matrix and matrix dense;
void diag(vector< Float > &vec) const
get diag. vector
void set_rmatvec(const std::function< vector< Float >(const vector< Float > &)> &RMATVEC)
set multiplication function of (Hermitian) transposed matrix and vector
void device_free() const
free data on GPU
std::function< vector< Float >const vector< Float > &)> get_rmatvec() const
get multiplication function of (Hermitian) transposed matrix and vector C = A;
void diag(view1D< matrix::Dense< Float >, Float > &vec) const
LinearOperator(const LinearOperator< Float > &linearoperator)
Create LinearOperator from LinearOperator.
std::string type() const
get format name "LinearOperator"
size_t get_col() const
get # of col
size_t get_row() const
get # of row
bool get_matvec_init_flag() const
get flag that shows matvec is defined or not
LinearOperator(Dense< Float > &dense)
LinearOperator(const size_t M, const size_t N, const std::function< vector< Float >(const vector< Float > &)> &MATVEC)
declare LinearOperator
void convert(Dense< Float > &dense)
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
void diag(view1D< tensor::tensor_Dense< Float >, Float > &vec) const
std::function< vector< Float >const vector< Float > &)> get_matvec() const
get multiplication function of matrix and vector
LinearOperator(CRS< Float > &crs)
LinearOperator(const size_t M, const size_t N, const std::function< Dense< Float >(const Dense< Float > &)> &MATMUL)
declare LinearOperator
void send() const
send data to GPU
std::function< Dense< Float >const Dense< Float > &)> matmul_dense
pseudo multiplication function of matrix and dense matrix
std::function< matrix::Dense< Float >const matrix::Dense< Float > &)> get_matmul_dense() const
get multiplication function of matrix and matrix dense