1#ifndef included_AMP_AMG_STRENGTH
2#define included_AMP_AMG_STRENGTH
4#include "AMP/matrices/CSRMatrix.h"
5#include "AMP/solvers/amg/Util.h"
31 auto search = [=](
auto ptrs ) {
32 auto [rowptr, colind, values] = ptrs;
33 for (
lidx_t off = rowptr[i]; off < rowptr[i + 1]; ++off ) {
34 if ( j == colind[off] && values[off] )
40 return search(
diag() ) || search(
offd() );
46 auto loop = [=](
auto ptrs ) {
47 auto [rowptr, colind, values] = ptrs;
48 for (
lidx_t off = rowptr[r]; off < rowptr[r + 1]; ++off ) {
60 auto loop = [=](
auto ptrs,
auto mat_values ) {
61 auto [rowptr, colind, values] = ptrs;
62 for (
lidx_t off = rowptr[r]; off < rowptr[r + 1]; ++off ) {
64 f( colind[off], mat_values[off] );
73 using alloc_t =
typename std::allocator_traits<
122template<norm norm_type>
125template<norm norm_type>
128template<
class StrengthPolicy,
class Mat>
Strength< Mat > compute_soc(csr_view< Mat > A, float threshold)
typename std::allocator_traits< A >::template rebind_alloc< T > rebind_alloc
const mask_t & const_ref_type
constexpr const_ref_type operator[](lidx_t i) const
constexpr ref_type operator[](lidx_t i)
span< const lidx_t > colind
constexpr reference row(lidx_t r) const
typename std::allocator_traits< typename csr_view< Mat >::allocator_type >::template rebind_alloc< mask_t > alloc_t
span< const scalar_t > mat_values
storage(csr_ptrs_t A_ptrs)
typename csr_view< Mat >::csr_ptrs_t csr_ptrs_t
span< const lidx_t > rowptr
constexpr reference row(lidx_t r)
constexpr auto diag_row(lidx_t r) const
constexpr auto offd_row(lidx_t r) const
Strength(csr_view< Mat > A)
const auto offd_mask_data() const
constexpr auto diag_row(lidx_t r)
std::tuple< span< const lidx_t >, span< const lidx_t >, const mask_t * > rep_type
struct AMP::Solver::AMG::Strength::storage d_diag
void do_strong_val(lidx_t r, F &&f) const
typename csr_view< Mat >::mask_t mask_t
void do_strong(lidx_t r, F &&f) const
constexpr lidx_t numLocalRows() const
constexpr auto offd_row(lidx_t r)
const auto diag_mask_data() const
typename csr_view< Mat >::lidx_t lidx_t
bool is_strong(lidx_t i, lidx_t j) const
struct AMP::Solver::AMG::Strength::storage d_offd
typename csr_view< Mat >::scalar_t scalar_t
constexpr size_type size() const noexcept