9#include <kernel/util/memory_arbiter.hpp>
10#include <kernel/util/dist.hpp>
11#include <kernel/solver/base.hpp>
16namespace FEAT::Solver::RichardsonHelper
35 template<
typename DT_,
typename IT_>
50 bool empty()
const {
return (val ==
nullptr) || (num_nnz ==
Index(0)); }
60 template<
typename DT_,
typename IT_,
int NR_,
int NC_>
63 static constexpr int num_row_blocks = NR_;
64 static constexpr int num_col_blocks = NC_;
65 std::array<MetaBlock<DT_, IT_>, std::size_t(NR_) * std::size_t(NC_)> blocks;
67 MetaBlock<DT_, IT_>& at(
int r,
int c) {
return blocks[std::size_t(r) * std::size_t(NC_) + std::size_t(c)]; }
68 const MetaBlock<DT_, IT_>& at(
int r,
int c)
const {
return blocks[std::size_t(r) * std::size_t(NC_) + std::size_t(c)]; }
83 template<
typename DT_,
typename IT_>
88 Index used_elements = 0;
100 template<
typename DT_,
typename IT_>
113 bool empty()
const {
return ranks.empty(); }
121 template<
typename DT_,
typename IT_,
int NC_>
129 std::array<UnitFilterInfo<DT_, IT_>, std::size_t(NC_)>
def_filters;
133 std::array<GateWrapper<DT_, IT_>, std::size_t(NC_)>
gates;
147 bool always_use_parallel_kernel =
false;
150 template<
typename DT_>
153 DT_ def_norm = DT_(0);
154 DT_ def_init = DT_(0);
std::uint64_t Index
Index data type.
Per-meta-row (per-component) gate for the hand-rolled synchronization.
const Memory::Arbiter * freqs
this component's frequency array (type-1 -> type-0 weighting for sync_1)
std::vector< const Memory::Arbiter * > mirror_idx
per-neighbor shared-node (scalar) mirror index arrays
std::vector< Index > mirror_size
per-neighbor number of shared nodes (mirror indices)
std::vector< int > ranks
neighbor ranks (empty => empty gate)
Everything the fused Richardson driver needs for one apply.
std::array< const Memory::Arbiter *, std::size_t(NC_)> vec_rhs
per-component element arbiters of the right-hand-side vector (read-only)
std::array< Memory::Arbiter *, std::size_t(NC_)> vec_cor
per-component element arbiters of the correction scratch vector
std::array< Memory::Arbiter *, std::size_t(NC_)> vec_def
per-component element arbiters of the defect scratch vector
MetaMatrix< DT_, IT_, NC_, NC_ > mat_sys
system matrix A (structure-agnostic; empty cells skipped)
std::array< MetaVectorInfo, std::size_t(NC_)> components
per-component layout (block size + node count)
std::array< GateWrapper< DT_, IT_ >, std::size_t(NC_)> gates
one gate per meta row (some may be empty)
std::array< UnitFilterInfo< DT_, IT_ >, std::size_t(NC_)> def_filters
one defect/correction unit filter per component
std::array< Memory::Arbiter *, std::size_t(NC_)> vec_sol
per-component element arbiters of the solution vector (read-write, iterated in place)
MetaMatrix< DT_, IT_, NC_, NC_ > mat_vanka
AmaVanka approximate-inverse matrix V.
Flat unit-filter (defect/correction) info for a single meta component (phase 1: only UnitFilter / Uni...