10#ifndef MUELU_MATRIXCONSTRUCTION_HPP
11#define MUELU_MATRIXCONSTRUCTION_HPP
13#include "Kokkos_Core.hpp"
14#include "KokkosKernels_ArithTraits.hpp"
18#include "Xpetra_MatrixFactory.hpp"
20#ifdef MUELU_COALESCE_DROP_DEBUG
36template <
class local_matrix_type,
class functor_type,
class... remaining_functor_types>
44 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
53#ifdef MUELU_COALESCE_DROP_DEBUG
54 std::string functorName;
65#ifdef MUELU_COALESCE_DROP_DEBUG
66 std::string mangledFunctorName =
typeid(
decltype(
functor)).name();
68 char* demangledFunctorName = 0;
69 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
70 functorName = demangledFunctorName;
81#ifdef MUELU_COALESCE_DROP_DEBUG
82 std::string mangledFunctorName =
typeid(
decltype(
functor)).name();
84 char* demangledFunctorName = 0;
85 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
86 functorName = demangledFunctorName;
90 KOKKOS_INLINE_FUNCTION
92#ifdef MUELU_COALESCE_DROP_DEBUG
94 Kokkos::printf(
"\nStarting on row %d\n", rlid);
96 auto row =
A.rowConst(rlid);
98 Kokkos::printf(
"indices: ");
100 auto clid = row.colidx(k);
101 Kokkos::printf(
"%5d ", clid);
103 Kokkos::printf(
"\n");
105 Kokkos::printf(
"values: ");
107 auto val = row.value(k);
108 Kokkos::printf(
"%5f ", val);
110 Kokkos::printf(
"\n");
116#ifdef MUELU_COALESCE_DROP_DEBUG
118 Kokkos::printf(
"%s\n", functorName.c_str());
120 auto row =
A.rowConst(rlid);
121 const size_t offset =
A.graph.row_map(rlid);
123 Kokkos::printf(
"decisions: ");
125 Kokkos::printf(
"%5d ",
results(offset + k));
127 Kokkos::printf(
"\n");
135template <
class local_matrix_type,
class functor_type>
143 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
151#ifdef MUELU_COALESCE_DROP_DEBUG
152 std::string functorName;
162#ifdef MUELU_COALESCE_DROP_DEBUG
163 std::string mangledFunctorName =
typeid(
decltype(
functor)).name();
165 char* demangledFunctorName = 0;
166 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
167 functorName = demangledFunctorName;
177#ifdef MUELU_COALESCE_DROP_DEBUG
178 std::string mangledFunctorName =
typeid(
decltype(
functor)).name();
180 char* demangledFunctorName = 0;
181 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
182 functorName = demangledFunctorName;
186 KOKKOS_INLINE_FUNCTION
188#ifdef MUELU_COALESCE_DROP_DEBUG
190 Kokkos::printf(
"\nStarting on row %d\n", rlid);
192 auto row =
A.rowConst(rlid);
194 Kokkos::printf(
"indices: ");
196 auto clid = row.colidx(k);
197 Kokkos::printf(
"%5d ", clid);
199 Kokkos::printf(
"\n");
201 Kokkos::printf(
"values: ");
203 auto val = row.value(k);
204 Kokkos::printf(
"%5f ", val);
206 Kokkos::printf(
"\n");
212#ifdef MUELU_COALESCE_DROP_DEBUG
213 Kokkos::printf(
"%s\n", functorName.c_str());
215 auto row =
A.rowConst(rlid);
216 const size_t offset =
A.graph.row_map(rlid);
218 Kokkos::printf(
"decisions: ");
220 Kokkos::printf(
"%5d ",
results(offset + k));
223 Kokkos::printf(
"\n");
224 Kokkos::printf(
"Done with row %d\n", rlid);
227 size_t start =
A.graph.row_map(rlid);
228 size_t end =
A.graph.row_map(rlid + 1);
229 for (
size_t i = start; i < end; ++i) {
247template <
class local_matrix_type,
class local_graph_type,
bool lumping>
254 using ATS = KokkosKernels::ArithTraits<scalar_type>;
273 KOKKOS_INLINE_FUNCTION
275 auto rowA =
A.row(rlid);
276 size_t row_start =
A.graph.row_map(rlid);
284 if constexpr (lumping) {
291 rowFilteredA.colidx(j) = rowA.colidx(k);
292 rowFilteredA.value(j) = rowA.value(k);
294 graph.entries(graph_offset + jj) = rowA.colidx(k);
296 }
else if constexpr (lumping) {
297 diagCorrection += rowA.value(k);
298 rowFilteredA.colidx(j) = rowA.colidx(k);
299 rowFilteredA.value(j) =
zero;
302 rowFilteredA.colidx(j) = rowA.colidx(k);
303 rowFilteredA.value(j) =
zero;
307 if constexpr (lumping) {
308 rowFilteredA.value(diagOffset) += diagCorrection;
310 rowFilteredA.value(diagOffset) =
one;
326template <
class local_matrix_type, lumpingType lumpingChoice,
bool constructFilteredA = true>
334 using ATS = KokkosKernels::ArithTraits<scalar_type>;
352 static_assert(constructFilteredA || (lumpingChoice ==
no_lumping));
355 KOKKOS_INLINE_FUNCTION
357 auto rowA =
A.row(rlid);
358 size_t K =
A.graph.row_map(rlid);
371 graph.entries(j) = rowA.colidx(k);
372 if constexpr (constructFilteredA)
375 keptRowSumAbs += ATS::magnitude(
filteredA.values(j));
378 }
else if constexpr (lumpingChoice !=
no_lumping) {
379 droppedSum += rowA.value(k);
383 filteredA.values(diagOffset) += droppedSum;
387 if (ATS::real(droppedSum) >= ATS::real(
zero)) {
388 filteredA.values(diagOffset) += droppedSum;
391 filteredA.values(k) += droppedSum * ATS::magnitude(
filteredA.values(k)) / keptRowSumAbs;
398template <
class local_matrix_type>
415 template <
class local_matrix_type2>
422 const local_matrix_type2
A;
427 KOKKOS_INLINE_FUNCTION
430 ,
offset(A_.graph.row_map(bsize_ * brlid_))
433 KOKKOS_INLINE_FUNCTION
441 KOKKOS_INLINE_FUNCTION
457template <
class local_matrix_type,
459 class... remaining_functor_types>
469 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
470 using ATS = KokkosKernels::ArithTraits<local_ordinal_type>;
486#ifdef MUELU_COALESCE_DROP_DEBUG
487 std::string functorName;
500 ,
remainingFunctors(A_, blockSize_, ghosted_point_to_block_, results_, filtered_rowptr_, graph_rowptr_, remainingFunctors_...) {
502#ifdef MUELU_COALESCE_DROP_DEBUG
503 std::string mangledFunctorName =
typeid(
decltype(
functor)).name();
505 char* demangledFunctorName = 0;
506 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
507 functorName = demangledFunctorName;
511 KOKKOS_INLINE_FUNCTION
512 void join(Kokkos::pair<local_ordinal_type, local_ordinal_type>& dest,
const Kokkos::pair<local_ordinal_type, local_ordinal_type>& src)
const {
513 dest.first += src.first;
514 dest.second += src.second;
517 KOKKOS_INLINE_FUNCTION
523 KOKKOS_INLINE_FUNCTION
525 auto nnz_filtered = &nnz.first;
526 auto nnz_graph = &nnz.second;
528#ifdef MUELU_COALESCE_DROP_DEBUG
529 Kokkos::printf(
"\nStarting on block row %d\n", brlid);
532#ifdef MUELU_COALESCE_DROP_DEBUG
534 Kokkos::printf(
"\nStarting on row %d\n", rlid);
536 auto row =
A.rowConst(rlid);
538 Kokkos::printf(
"indices: ");
540 auto clid = row.colidx(k);
541 Kokkos::printf(
"%5d ", clid);
543 Kokkos::printf(
"\n");
545 Kokkos::printf(
"values: ");
547 auto val = row.value(k);
548 Kokkos::printf(
"%5f ", val);
550 Kokkos::printf(
"\n");
557#ifdef MUELU_COALESCE_DROP_DEBUG
559 Kokkos::printf(
"%s\n", functorName.c_str());
561 auto row =
A.rowConst(rlid);
562 const size_t offset =
A.graph.row_map(rlid);
564 Kokkos::printf(
"decisions: ");
566 Kokkos::printf(
"%5d ",
results(offset + k));
568 Kokkos::printf(
"\n");
572#ifdef MUELU_COALESCE_DROP_DEBUG
573 Kokkos::printf(
"Done with row %d\n", rlid);
576 size_t start =
A.graph.row_map(rlid);
577 size_t end =
A.graph.row_map(rlid + 1);
578 for (
size_t i = start; i < end; ++i) {
587#ifdef MUELU_COALESCE_DROP_DEBUG
588 Kokkos::printf(
"Done with block row %d\nGraph indices ", brlid);
592 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
595 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
597 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
598 block_permutation(i) = i;
600 auto comparator =
comparison.getComparator(brlid);
604 bool alreadyAdded =
false;
607 auto offset =
A.graph.row_map(
blockSize * brlid);
608 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
609 auto idx = offset + block_permutation(i);
610 auto clid =
A.graph.entries(idx);
614 if (bclid > prev_bclid)
615 alreadyAdded =
false;
621#ifdef MUELU_COALESCE_DROP_DEBUG
622 Kokkos::printf(
"%5d ", bclid);
627#ifdef MUELU_COALESCE_DROP_DEBUG
628 Kokkos::printf(
"\n");
635template <
class local_matrix_type,
646 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
647 using ATS = KokkosKernels::ArithTraits<local_ordinal_type>;
658#ifdef MUELU_COALESCE_DROP_DEBUG
659 std::string functorName;
676#ifdef MUELU_COALESCE_DROP_DEBUG
677 std::string mangledFunctorName =
typeid(
decltype(
functor)).name();
679 char* demangledFunctorName = 0;
680 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
681 functorName = demangledFunctorName;
685 KOKKOS_INLINE_FUNCTION
686 void join(Kokkos::pair<local_ordinal_type, local_ordinal_type>& dest,
const Kokkos::pair<local_ordinal_type, local_ordinal_type>& src)
const {
687 dest.first += src.first;
688 dest.second += src.second;
691 KOKKOS_INLINE_FUNCTION
696 KOKKOS_INLINE_FUNCTION
698 auto nnz_filtered = &nnz.first;
699 auto nnz_graph = &nnz.second;
701#ifdef MUELU_COALESCE_DROP_DEBUG
702 Kokkos::printf(
"\nStarting on block row %d\n", brlid);
705#ifdef MUELU_COALESCE_DROP_DEBUG
707 Kokkos::printf(
"\nStarting on row %d\n", rlid);
709 auto row =
A.rowConst(rlid);
711 Kokkos::printf(
"indices: ");
713 auto clid = row.colidx(k);
714 Kokkos::printf(
"%5d ", clid);
716 Kokkos::printf(
"\n");
718 Kokkos::printf(
"values: ");
720 auto val = row.value(k);
721 Kokkos::printf(
"%5f ", val);
723 Kokkos::printf(
"\n");
729#ifdef MUELU_COALESCE_DROP_DEBUG
731 Kokkos::printf(
"%s\n", functorName.c_str());
733 auto row =
A.rowConst(rlid);
734 const size_t offset =
A.graph.row_map(rlid);
736 Kokkos::printf(
"decisions: ");
738 Kokkos::printf(
"%5d ",
results(offset + k));
740 Kokkos::printf(
"\n");
744#ifdef MUELU_COALESCE_DROP_DEBUG
745 Kokkos::printf(
"Done with row %d\n", rlid);
748 size_t start =
A.graph.row_map(rlid);
749 size_t end =
A.graph.row_map(rlid + 1);
750 for (
size_t i = start; i < end; ++i) {
759#ifdef MUELU_COALESCE_DROP_DEBUG
760 Kokkos::printf(
"Done with block row %d\nGraph indices ", brlid);
764 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
767 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
769 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
770 block_permutation(i) = i;
772 auto comparator =
comparison.getComparator(brlid);
776 bool alreadyAdded =
false;
779 auto offset =
A.graph.row_map(
blockSize * brlid);
780 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
781 auto idx = offset + block_permutation(i);
782 auto clid =
A.graph.entries(idx);
786 if (bclid > prev_bclid)
787 alreadyAdded =
false;
793#ifdef MUELU_COALESCE_DROP_DEBUG
794 Kokkos::printf(
"%5d ", bclid);
799#ifdef MUELU_COALESCE_DROP_DEBUG
800 Kokkos::printf(
"\n");
814template <
class local_matrix_type,
bool lumping,
bool reuse,
bool constructFilteredA = true>
822 using ATS = KokkosKernels::ArithTraits<scalar_type>;
823 using OTS = KokkosKernels::ArithTraits<local_ordinal_type>;
854 KOKKOS_INLINE_FUNCTION
856 if constexpr (constructFilteredA) {
858 auto rowA =
A.row(rlid);
859 size_t row_start =
A.graph.row_map(rlid);
865 if constexpr (lumping) {
872 rowFilteredA.colidx(j) = rowA.colidx(k);
873 rowFilteredA.value(j) = rowA.value(k);
875 }
else if constexpr (lumping) {
876 diagCorrection += rowA.value(k);
877 if constexpr (reuse) {
878 rowFilteredA.colidx(j) = rowA.colidx(k);
879 rowFilteredA.value(j) =
zero;
882 }
else if constexpr (reuse) {
883 rowFilteredA.colidx(j) = rowA.colidx(k);
884 rowFilteredA.value(j) =
zero;
888 if constexpr (lumping) {
889 rowFilteredA.value(diagOffset) += diagCorrection;
891 rowFilteredA.value(diagOffset) =
one;
897 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
900 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
902 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
903 block_permutation(i) = i;
905 auto comparator =
comparison.getComparator(brlid);
909 bool alreadyAdded =
false;
913 auto offset =
A.graph.row_map(
blockSize * brlid);
914 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
915 auto idx = offset + block_permutation(i);
916 auto clid =
A.graph.entries(idx);
920 if (bclid > prev_bclid)
921 alreadyAdded =
false;
925 graph.entries(j) = bclid;
934template <
class local_matrix_type>
944 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
945 using ATS = KokkosKernels::ArithTraits<local_ordinal_type>;
965 KOKKOS_INLINE_FUNCTION
968 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
971 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
973 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
974 block_permutation(i) = i;
976 auto comparator =
comparison.getComparator(brlid);
980 bool alreadyAdded =
false;
983 auto offset =
A.graph.row_map(
blockSize * brlid);
984 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
985 auto idx = offset + block_permutation(i);
986 auto clid =
A.graph.entries(idx);
990 if (bclid > prev_bclid)
991 alreadyAdded =
false;
997#ifdef MUELU_COALESCE_DROP_DEBUG
998 Kokkos::printf(
"%5d ", bclid);
1003#ifdef MUELU_COALESCE_DROP_DEBUG
1004 Kokkos::printf(
"\n");
1011template <
class local_matrix_type>
1019 using ATS = KokkosKernels::ArithTraits<scalar_type>;
1020 using OTS = KokkosKernels::ArithTraits<local_ordinal_type>;
1025 local_matrix_type
A;
1045 KOKKOS_INLINE_FUNCTION
1048 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
1051 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
1053 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
1054 block_permutation(i) = i;
1056 auto comparator =
comparison.getComparator(brlid);
1060 bool alreadyAdded =
false;
1064 auto offset =
A.graph.row_map(
blockSize * brlid);
1065 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
1066 auto idx = offset + block_permutation(i);
1067 auto clid =
A.graph.entries(idx);
1071 if (bclid > prev_bclid)
1072 alreadyAdded =
false;
1075 if (!alreadyAdded) {
1076 mergedA.graph.entries(j) = bclid;
1079 alreadyAdded =
true;
1086template <
class local_matrix_type,
class local_graph_type>
1094 local_matrix_type
A;
1104 KOKKOS_INLINE_FUNCTION
1106 auto rowA =
A.row(rlid);
1107 size_t row_start =
A.graph.row_map(rlid);
1112 graph.entries(graph_offset + jj) = rowA.colidx(k);
BlockRowComparison(local_matrix_type &A_, local_ordinal_type bsize_, block_indices_view_type ghosted_point_to_block_)
block_indices_view_type ghosted_point_to_block
typename local_matrix_type::ordinal_type local_ordinal_type
Comparator< local_matrix_type > comparator_type
KOKKOS_INLINE_FUNCTION comparator_type getComparator(local_ordinal_type brlid) const
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
typename local_matrix_type::memory_space memory_space
GraphConstruction(local_matrix_type &A_, results_view &results_, local_graph_type &graph_)
typename local_matrix_type::value_type scalar_type
typename local_matrix_type::memory_space memory_space
Kokkos::View< DecisionType *, memory_space > results_view
typename local_matrix_type::ordinal_type local_ordinal_type
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type rlid) const
typename local_matrix_type::memory_space memory_space
typename local_matrix_type::value_type scalar_type
MergeCountFunctor(local_matrix_type &A_, local_ordinal_type blockSize_, block_indices_view_type ghosted_point_to_block_, rowptr_type &merged_rowptr_)
typename local_matrix_type::row_map_type::non_const_type rowptr_type
KokkosKernels::ArithTraits< local_ordinal_type > ATS
Kokkos::View< DecisionType *, memory_space > results_view
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
rowptr_type merged_rowptr
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type brlid, local_ordinal_type &nnz_graph, const bool &final) const
Kokkos::View< local_ordinal_type *, memory_space > permutation_type
local_ordinal_type blockSize
typename local_matrix_type::ordinal_type local_ordinal_type
BlockRowComparison< local_matrix_type > comparison
permutation_type permutation
block_indices_view_type ghosted_point_to_block
typename local_matrix_type::value_type scalar_type
typename ATS::magnitudeType magnitudeType
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
typename local_matrix_type::staticcrsgraph_type local_graph_type
typename local_matrix_type::ordinal_type local_ordinal_type
typename local_matrix_type::memory_space memory_space
KokkosKernels::ArithTraits< scalar_type > ATS
local_matrix_type mergedA
Kokkos::View< DecisionType *, memory_space > results_view
block_indices_view_type ghosted_point_to_block
Kokkos::View< local_ordinal_type *, memory_space > permutation_type
permutation_type permutation
KokkosKernels::ArithTraits< local_ordinal_type > OTS
BlockRowComparison< local_matrix_type > comparison
local_ordinal_type blockSize
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type brlid) const
MergeFillFunctor(local_matrix_type &A_, local_ordinal_type blockSize_, block_indices_view_type ghosted_point_to_block_, local_matrix_type &mergedA_)
typename local_matrix_type::memory_space memory_space
Kokkos::View< DecisionType *, memory_space > results_view
PointwiseCountingFunctor(local_matrix_type &A_, results_view &results_, rowptr_type &rowptr_, bool firstFunctor_, functor_type &functor_)
typename local_matrix_type::row_map_type::non_const_type rowptr_type
PointwiseCountingFunctor(local_matrix_type &A_, results_view &results_, rowptr_type &rowptr_, functor_type &functor_)
typename local_matrix_type::ordinal_type local_ordinal_type
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type rlid, local_ordinal_type &nnz, const bool &final) const
typename local_matrix_type::value_type scalar_type
Functor that executes a sequence of sub-functors on each row for a problem with blockSize == 1.
typename local_matrix_type::memory_space memory_space
PointwiseCountingFunctor(local_matrix_type &A_, results_view &results_, rowptr_type &rowptr_, bool firstFunctor_, functor_type &functor_, remaining_functor_types &... remainingFunctors_)
Kokkos::View< DecisionType *, memory_space > results_view
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type rlid, local_ordinal_type &nnz, const bool &final) const
typename local_matrix_type::ordinal_type local_ordinal_type
typename local_matrix_type::value_type scalar_type
typename local_matrix_type::row_map_type::non_const_type rowptr_type
PointwiseCountingFunctor< local_matrix_type, remaining_functor_types... > remainingFunctors
PointwiseCountingFunctor(local_matrix_type &A_, results_view &results_, rowptr_type &rowptr_, functor_type &functor_, remaining_functor_types &... remainingFunctors_)
Functor does not reuse the graph of the matrix for a problem with blockSize == 1.
Kokkos::View< DecisionType *, memory_space > results_view
local_matrix_type filteredA
typename local_matrix_type::staticcrsgraph_type local_graph_type
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type rlid) const
KokkosKernels::ArithTraits< scalar_type > ATS
typename local_matrix_type::ordinal_type local_ordinal_type
typename local_matrix_type::value_type scalar_type
magnitudeType dirichletThreshold
PointwiseFillNoReuseFunctor(local_matrix_type &A_, results_view &results_, local_graph_type &graph_, local_matrix_type &filteredA_, magnitudeType dirichletThreshold_)
typename ATS::magnitudeType magnitudeType
typename local_matrix_type::memory_space memory_space
Functor that fills the filtered matrix while reusing the graph of the matrix before dropping,...
magnitudeType dirichletThreshold
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type rlid) const
KokkosKernels::ArithTraits< scalar_type > ATS
typename ATS::magnitudeType magnitudeType
Kokkos::View< DecisionType *, memory_space > results_view
typename local_matrix_type::memory_space memory_space
typename local_matrix_type::value_type scalar_type
local_matrix_type filteredA
typename local_matrix_type::ordinal_type local_ordinal_type
PointwiseFillReuseFunctor(local_matrix_type &A_, results_view &results_, local_matrix_type &filteredA_, local_graph_type &graph_, magnitudeType dirichletThreshold_)
typename local_matrix_type::row_map_type::non_const_type rowptr_type
KOKKOS_INLINE_FUNCTION void join(Kokkos::pair< local_ordinal_type, local_ordinal_type > &dest, const Kokkos::pair< local_ordinal_type, local_ordinal_type > &src) const
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type brlid, Kokkos::pair< local_ordinal_type, local_ordinal_type > &nnz, const bool &final) const
block_indices_view_type ghosted_point_to_block
BlockRowComparison< local_matrix_type > comparison
local_ordinal_type blockSize
Kokkos::View< DecisionType *, memory_space > results_view
Kokkos::View< local_ordinal_type *, memory_space > permutation_type
KokkosKernels::ArithTraits< local_ordinal_type > ATS
typename local_matrix_type::memory_space memory_space
permutation_type permutation
KOKKOS_INLINE_FUNCTION void operatorRow(const local_ordinal_type rlid) const
rowptr_type filtered_rowptr
VectorCountingFunctor(local_matrix_type &A_, local_ordinal_type blockSize_, block_indices_view_type ghosted_point_to_block_, results_view &results_, rowptr_type &filtered_rowptr_, rowptr_type &graph_rowptr_, functor_type &functor_)
typename local_matrix_type::value_type scalar_type
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
typename local_matrix_type::ordinal_type local_ordinal_type
Functor that executes a sequence of sub-functors on each block of rows.
VectorCountingFunctor(local_matrix_type &A_, local_ordinal_type blockSize_, block_indices_view_type ghosted_point_to_block_, results_view &results_, rowptr_type &filtered_rowptr_, rowptr_type &graph_rowptr_, functor_type &functor_, remaining_functor_types &... remainingFunctors_)
typename local_matrix_type::row_map_type::non_const_type rowptr_type
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type brlid, Kokkos::pair< local_ordinal_type, local_ordinal_type > &nnz, const bool &final) const
rowptr_type filtered_rowptr
KokkosKernels::ArithTraits< local_ordinal_type > ATS
block_indices_view_type ghosted_point_to_block
local_ordinal_type blockSize
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
KOKKOS_INLINE_FUNCTION void join(Kokkos::pair< local_ordinal_type, local_ordinal_type > &dest, const Kokkos::pair< local_ordinal_type, local_ordinal_type > &src) const
VectorCountingFunctor< local_matrix_type, remaining_functor_types... > remainingFunctors
Kokkos::View< local_ordinal_type *, memory_space > permutation_type
typename local_matrix_type::ordinal_type local_ordinal_type
BlockRowComparison< local_matrix_type > comparison
permutation_type permutation
KOKKOS_INLINE_FUNCTION void operatorRow(const local_ordinal_type rlid) const
typename local_matrix_type::memory_space memory_space
Kokkos::View< DecisionType *, memory_space > results_view
typename local_matrix_type::value_type scalar_type
KokkosKernels::ArithTraits< local_ordinal_type > OTS
BlockRowComparison< local_matrix_type > comparison
permutation_type permutation
typename local_matrix_type::staticcrsgraph_type local_graph_type
Kokkos::View< local_ordinal_type *, memory_space > permutation_type
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type brlid) const
Kokkos::View< DecisionType *, memory_space > results_view
typename ATS::magnitudeType magnitudeType
magnitudeType dirichletThreshold
VectorFillFunctor(local_matrix_type &A_, local_ordinal_type blockSize_, block_indices_view_type ghosted_point_to_block_, results_view &results_, local_matrix_type &filteredA_, local_graph_type &graph_, magnitudeType dirichletThreshold_)
KokkosKernels::ArithTraits< scalar_type > ATS
typename local_matrix_type::value_type scalar_type
local_ordinal_type blockSize
typename local_matrix_type::ordinal_type local_ordinal_type
local_matrix_type filteredA
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
typename local_matrix_type::memory_space memory_space
block_indices_view_type ghosted_point_to_block
KOKKOS_INLINE_FUNCTION void serialHeapSort(view_type &v, comparator_type comparator)
const local_matrix_type2 A
KOKKOS_INLINE_FUNCTION bool operator()(size_t x, size_t y) const
typename local_matrix_type2::memory_space memory_space
typename local_matrix_type2::ordinal_type local_ordinal_type
const local_ordinal_type offset
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
const block_indices_view_type ghosted_point_to_block
KOKKOS_INLINE_FUNCTION Comparator(const local_matrix_type2 &A_, local_ordinal_type bsize_, local_ordinal_type brlid_, block_indices_view_type ghosted_point_to_block_)