MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::itl::detail::gmres_workspace< Value > Struct Template Reference

gmres's vectors, allocated once per solve rather than per restart cycle and per Arnoldi step: kmax + 1 basis vectors were zero-filled on every cycle (about 250 MB at n = 1e6 and restart 30), and two vectors were allocated on every step (issue 924). More...

#include <gmres.hpp>

Public Member Functions

 gmres_workspace (std::size_t n, int kmax)

Public Attributes

std::vector< vec::dense_vector< Value > > V
mat::dense2D< Value > H
vec::dense_vector< Value > g
vec::dense_vector< Value > cs
vec::dense_vector< Value > sn
vec::dense_vector< Value > y
vec::dense_vector< Value > r0
vec::dense_vector< Value > r
vec::dense_vector< Value > w_tmp
vec::dense_vector< Value > w
bool r0_tested = false
 r0 holds b - A x for the current x, and iter has already tested its norm: set by a cycle that ends without converging, so the next cycle starts from it without a second product with A or a second test.

Detailed Description

template<typename Value>
struct mtl::itl::detail::gmres_workspace< Value >

gmres's vectors, allocated once per solve rather than per restart cycle and per Arnoldi step: kmax + 1 basis vectors were zero-filled on every cycle (about 250 MB at n = 1e6 and restart 30), and two vectors were allocated on every step (issue 924).

Constructor & Destructor Documentation

◆ gmres_workspace()

template<typename Value>
mtl::itl::detail::gmres_workspace< Value >::gmres_workspace ( std::size_t n,
int kmax )
inline

Member Data Documentation

◆ cs

template<typename Value>
vec::dense_vector<Value> mtl::itl::detail::gmres_workspace< Value >::cs

◆ g

template<typename Value>
vec::dense_vector<Value> mtl::itl::detail::gmres_workspace< Value >::g

◆ H

template<typename Value>
mat::dense2D<Value> mtl::itl::detail::gmres_workspace< Value >::H

◆ r

template<typename Value>
vec::dense_vector<Value> mtl::itl::detail::gmres_workspace< Value >::r

◆ r0

template<typename Value>
vec::dense_vector<Value> mtl::itl::detail::gmres_workspace< Value >::r0

◆ r0_tested

template<typename Value>
bool mtl::itl::detail::gmres_workspace< Value >::r0_tested = false

r0 holds b - A x for the current x, and iter has already tested its norm: set by a cycle that ends without converging, so the next cycle starts from it without a second product with A or a second test.

◆ sn

template<typename Value>
vec::dense_vector<Value> mtl::itl::detail::gmres_workspace< Value >::sn

◆ V

template<typename Value>
std::vector<vec::dense_vector<Value> > mtl::itl::detail::gmres_workspace< Value >::V

◆ w

template<typename Value>
vec::dense_vector<Value> mtl::itl::detail::gmres_workspace< Value >::w

◆ w_tmp

template<typename Value>
vec::dense_vector<Value> mtl::itl::detail::gmres_workspace< Value >::w_tmp

◆ y

template<typename Value>
vec::dense_vector<Value> mtl::itl::detail::gmres_workspace< Value >::y

The documentation for this struct was generated from the following file:
  • /home/runner/work/mtl5/mtl5/include/mtl/itl/krylov/gmres.hpp