10 #ifndef MUELU_MATRIXCONSTRUCTION_HPP
11 #define MUELU_MATRIXCONSTRUCTION_HPP
13 #include "Kokkos_Core.hpp"
14 #if KOKKOS_VERSION >= 40799
15 #include "KokkosKernels_ArithTraits.hpp"
17 #include "Kokkos_ArithTraits.hpp"
24 #ifdef MUELU_COALESCE_DROP_DEBUG
29 namespace MueLu::MatrixConstruction {
40 template <
class local_matrix_type,
class functor_type,
class... remaining_functor_types>
48 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
57 #ifdef MUELU_COALESCE_DROP_DEBUG
58 std::string functorName;
69 #ifdef MUELU_COALESCE_DROP_DEBUG
70 std::string mangledFunctorName =
typeid(decltype(
functor)).name();
72 char* demangledFunctorName = 0;
73 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
74 functorName = demangledFunctorName;
85 #ifdef MUELU_COALESCE_DROP_DEBUG
86 std::string mangledFunctorName =
typeid(decltype(
functor)).name();
88 char* demangledFunctorName = 0;
89 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
90 functorName = demangledFunctorName;
94 KOKKOS_INLINE_FUNCTION
96 #ifdef MUELU_COALESCE_DROP_DEBUG
98 Kokkos::printf(
"\nStarting on row %d\n", rlid);
100 auto row =
A.rowConst(rlid);
102 Kokkos::printf(
"indices: ");
104 auto clid = row.colidx(k);
105 Kokkos::printf(
"%5d ", clid);
107 Kokkos::printf(
"\n");
109 Kokkos::printf(
"values: ");
111 auto val = row.value(k);
112 Kokkos::printf(
"%5f ", val);
114 Kokkos::printf(
"\n");
120 #ifdef MUELU_COALESCE_DROP_DEBUG
122 Kokkos::printf(
"%s\n", functorName.c_str());
124 auto row =
A.rowConst(rlid);
125 const size_t offset =
A.graph.row_map(rlid);
127 Kokkos::printf(
"decisions: ");
129 Kokkos::printf(
"%5d ",
results(offset + k));
131 Kokkos::printf(
"\n");
139 template <
class local_matrix_type,
class functor_type>
147 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
155 #ifdef MUELU_COALESCE_DROP_DEBUG
156 std::string functorName;
166 #ifdef MUELU_COALESCE_DROP_DEBUG
167 std::string mangledFunctorName =
typeid(decltype(
functor)).name();
169 char* demangledFunctorName = 0;
170 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
171 functorName = demangledFunctorName;
181 #ifdef MUELU_COALESCE_DROP_DEBUG
182 std::string mangledFunctorName =
typeid(decltype(
functor)).name();
184 char* demangledFunctorName = 0;
185 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
186 functorName = demangledFunctorName;
190 KOKKOS_INLINE_FUNCTION
192 #ifdef MUELU_COALESCE_DROP_DEBUG
194 Kokkos::printf(
"\nStarting on row %d\n", rlid);
196 auto row =
A.rowConst(rlid);
198 Kokkos::printf(
"indices: ");
200 auto clid = row.colidx(k);
201 Kokkos::printf(
"%5d ", clid);
203 Kokkos::printf(
"\n");
205 Kokkos::printf(
"values: ");
207 auto val = row.value(k);
208 Kokkos::printf(
"%5f ", val);
210 Kokkos::printf(
"\n");
216 #ifdef MUELU_COALESCE_DROP_DEBUG
217 Kokkos::printf(
"%s\n", functorName.c_str());
219 auto row =
A.rowConst(rlid);
220 const size_t offset =
A.graph.row_map(rlid);
222 Kokkos::printf(
"decisions: ");
224 Kokkos::printf(
"%5d ",
results(offset + k));
227 Kokkos::printf(
"\n");
228 Kokkos::printf(
"Done with row %d\n", rlid);
231 size_t start =
A.graph.row_map(rlid);
232 size_t end =
A.graph.row_map(rlid + 1);
233 for (
size_t i = start; i < end; ++i) {
251 template <
class local_matrix_type,
class local_graph_type,
bool lumping>
258 #if KOKKOS_VERSION >= 40799
259 using ATS = KokkosKernels::ArithTraits<scalar_type>;
261 using ATS = Kokkos::ArithTraits<scalar_type>;
281 KOKKOS_INLINE_FUNCTION
283 auto rowA =
A.row(rlid);
284 size_t row_start =
A.graph.row_map(rlid);
292 if constexpr (lumping) {
299 rowFilteredA.colidx(j) = rowA.colidx(k);
300 rowFilteredA.value(j) = rowA.value(k);
302 graph.entries(graph_offset + jj) = rowA.colidx(k);
304 }
else if constexpr (lumping) {
305 diagCorrection += rowA.value(k);
306 rowFilteredA.colidx(j) = rowA.colidx(k);
307 rowFilteredA.value(j) =
zero;
310 rowFilteredA.colidx(j) = rowA.colidx(k);
311 rowFilteredA.value(j) =
zero;
315 if constexpr (lumping) {
316 rowFilteredA.value(diagOffset) += diagCorrection;
318 rowFilteredA.value(diagOffset) =
one;
334 template <
class local_matrix_type, lumpingType lumpingChoice>
341 #if KOKKOS_VERSION >= 40799
342 using ATS = KokkosKernels::ArithTraits<scalar_type>;
344 using ATS = Kokkos::ArithTraits<scalar_type>;
362 KOKKOS_INLINE_FUNCTION
364 auto rowA =
A.row(rlid);
365 size_t K =
A.graph.row_map(rlid);
379 rowFilteredA.colidx(j) = rowA.colidx(k);
380 rowFilteredA.value(j) = rowA.value(k);
382 keptRowSumAbs += ATS::magnitude(rowFilteredA.value(j));
385 }
else if constexpr (lumpingChoice !=
no_lumping) {
386 droppedSum += rowA.value(k);
390 rowFilteredA.value(diagOffset) += droppedSum;
392 rowFilteredA.value(diagOffset) =
one;
394 if (ATS::real(droppedSum) >= ATS::real(
zero)) {
395 rowFilteredA.value(diagOffset) += droppedSum;
399 rowFilteredA.value(k) += droppedSum * ATS::magnitude(rowFilteredA.value(k)) / keptRowSumAbs;
406 template <
class local_matrix_type>
423 template <
class local_matrix_type2>
430 const local_matrix_type2
A;
435 KOKKOS_INLINE_FUNCTION
438 ,
offset(A_.graph.row_map(bsize_ * brlid_))
441 KOKKOS_INLINE_FUNCTION
449 KOKKOS_INLINE_FUNCTION
465 template <
class local_matrix_type,
467 class... remaining_functor_types>
477 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
478 #if KOKKOS_VERSION >= 40799
479 using ATS = KokkosKernels::ArithTraits<local_ordinal_type>;
481 using ATS = Kokkos::ArithTraits<local_ordinal_type>;
498 #ifdef MUELU_COALESCE_DROP_DEBUG
499 std::string functorName;
512 ,
remainingFunctors(A_, blockSize_, ghosted_point_to_block_, results_, filtered_rowptr_, graph_rowptr_, remainingFunctors_...) {
514 #ifdef MUELU_COALESCE_DROP_DEBUG
515 std::string mangledFunctorName =
typeid(decltype(
functor)).name();
517 char* demangledFunctorName = 0;
518 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
519 functorName = demangledFunctorName;
523 KOKKOS_INLINE_FUNCTION
524 void join(Kokkos::pair<local_ordinal_type, local_ordinal_type>& dest,
const Kokkos::pair<local_ordinal_type, local_ordinal_type>& src)
const {
525 dest.first += src.first;
526 dest.second += src.second;
529 KOKKOS_INLINE_FUNCTION
535 KOKKOS_INLINE_FUNCTION
537 auto nnz_filtered = &nnz.first;
538 auto nnz_graph = &nnz.second;
540 #ifdef MUELU_COALESCE_DROP_DEBUG
541 Kokkos::printf(
"\nStarting on block row %d\n", brlid);
544 #ifdef MUELU_COALESCE_DROP_DEBUG
546 Kokkos::printf(
"\nStarting on row %d\n", rlid);
548 auto row =
A.rowConst(rlid);
550 Kokkos::printf(
"indices: ");
552 auto clid = row.colidx(k);
553 Kokkos::printf(
"%5d ", clid);
555 Kokkos::printf(
"\n");
557 Kokkos::printf(
"values: ");
559 auto val = row.value(k);
560 Kokkos::printf(
"%5f ", val);
562 Kokkos::printf(
"\n");
569 #ifdef MUELU_COALESCE_DROP_DEBUG
571 Kokkos::printf(
"%s\n", functorName.c_str());
573 auto row =
A.rowConst(rlid);
574 const size_t offset =
A.graph.row_map(rlid);
576 Kokkos::printf(
"decisions: ");
578 Kokkos::printf(
"%5d ",
results(offset + k));
580 Kokkos::printf(
"\n");
584 #ifdef MUELU_COALESCE_DROP_DEBUG
585 Kokkos::printf(
"Done with row %d\n", rlid);
588 size_t start =
A.graph.row_map(rlid);
589 size_t end =
A.graph.row_map(rlid + 1);
590 for (
size_t i = start; i < end; ++i) {
599 #ifdef MUELU_COALESCE_DROP_DEBUG
600 Kokkos::printf(
"Done with block row %d\nGraph indices ", brlid);
604 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
607 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
609 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
610 block_permutation(i) = i;
612 auto comparator =
comparison.getComparator(brlid);
616 bool alreadyAdded =
false;
619 auto offset =
A.graph.row_map(
blockSize * brlid);
620 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
621 auto idx = offset + block_permutation(i);
622 auto clid =
A.graph.entries(idx);
626 if (bclid > prev_bclid)
627 alreadyAdded =
false;
633 #ifdef MUELU_COALESCE_DROP_DEBUG
634 Kokkos::printf(
"%5d ", bclid);
639 #ifdef MUELU_COALESCE_DROP_DEBUG
640 Kokkos::printf(
"\n");
647 template <
class local_matrix_type,
658 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
659 #if KOKKOS_VERSION >= 40799
660 using ATS = KokkosKernels::ArithTraits<local_ordinal_type>;
662 using ATS = Kokkos::ArithTraits<local_ordinal_type>;
675 #ifdef MUELU_COALESCE_DROP_DEBUG
676 std::string functorName;
693 #ifdef MUELU_COALESCE_DROP_DEBUG
694 std::string mangledFunctorName =
typeid(decltype(
functor)).name();
696 char* demangledFunctorName = 0;
697 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
698 functorName = demangledFunctorName;
702 KOKKOS_INLINE_FUNCTION
703 void join(Kokkos::pair<local_ordinal_type, local_ordinal_type>& dest,
const Kokkos::pair<local_ordinal_type, local_ordinal_type>& src)
const {
704 dest.first += src.first;
705 dest.second += src.second;
708 KOKKOS_INLINE_FUNCTION
713 KOKKOS_INLINE_FUNCTION
715 auto nnz_filtered = &nnz.first;
716 auto nnz_graph = &nnz.second;
718 #ifdef MUELU_COALESCE_DROP_DEBUG
719 Kokkos::printf(
"\nStarting on block row %d\n", brlid);
722 #ifdef MUELU_COALESCE_DROP_DEBUG
724 Kokkos::printf(
"\nStarting on row %d\n", rlid);
726 auto row =
A.rowConst(rlid);
728 Kokkos::printf(
"indices: ");
730 auto clid = row.colidx(k);
731 Kokkos::printf(
"%5d ", clid);
733 Kokkos::printf(
"\n");
735 Kokkos::printf(
"values: ");
737 auto val = row.value(k);
738 Kokkos::printf(
"%5f ", val);
740 Kokkos::printf(
"\n");
746 #ifdef MUELU_COALESCE_DROP_DEBUG
748 Kokkos::printf(
"%s\n", functorName.c_str());
750 auto row =
A.rowConst(rlid);
751 const size_t offset =
A.graph.row_map(rlid);
753 Kokkos::printf(
"decisions: ");
755 Kokkos::printf(
"%5d ",
results(offset + k));
757 Kokkos::printf(
"\n");
761 #ifdef MUELU_COALESCE_DROP_DEBUG
762 Kokkos::printf(
"Done with row %d\n", rlid);
765 size_t start =
A.graph.row_map(rlid);
766 size_t end =
A.graph.row_map(rlid + 1);
767 for (
size_t i = start; i < end; ++i) {
776 #ifdef MUELU_COALESCE_DROP_DEBUG
777 Kokkos::printf(
"Done with block row %d\nGraph indices ", brlid);
781 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
784 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
786 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
787 block_permutation(i) = i;
789 auto comparator =
comparison.getComparator(brlid);
793 bool alreadyAdded =
false;
796 auto offset =
A.graph.row_map(
blockSize * brlid);
797 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
798 auto idx = offset + block_permutation(i);
799 auto clid =
A.graph.entries(idx);
803 if (bclid > prev_bclid)
804 alreadyAdded =
false;
810 #ifdef MUELU_COALESCE_DROP_DEBUG
811 Kokkos::printf(
"%5d ", bclid);
816 #ifdef MUELU_COALESCE_DROP_DEBUG
817 Kokkos::printf(
"\n");
831 template <
class local_matrix_type,
bool lumping,
bool reuse>
839 #if KOKKOS_VERSION >= 40799
840 using ATS = KokkosKernels::ArithTraits<scalar_type>;
842 using ATS = Kokkos::ArithTraits<scalar_type>;
844 #if KOKKOS_VERSION >= 40799
845 using OTS = KokkosKernels::ArithTraits<local_ordinal_type>;
847 using OTS = Kokkos::ArithTraits<local_ordinal_type>;
879 KOKKOS_INLINE_FUNCTION
882 auto rowA =
A.row(rlid);
883 size_t row_start =
A.graph.row_map(rlid);
889 if constexpr (lumping) {
896 rowFilteredA.colidx(j) = rowA.colidx(k);
897 rowFilteredA.value(j) = rowA.value(k);
899 }
else if constexpr (lumping) {
900 diagCorrection += rowA.value(k);
901 if constexpr (reuse) {
902 rowFilteredA.colidx(j) = rowA.colidx(k);
903 rowFilteredA.value(j) =
zero;
906 }
else if constexpr (reuse) {
907 rowFilteredA.colidx(j) = rowA.colidx(k);
908 rowFilteredA.value(j) =
zero;
912 if constexpr (lumping) {
913 rowFilteredA.value(diagOffset) += diagCorrection;
915 rowFilteredA.value(diagOffset) =
one;
920 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
923 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
925 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
926 block_permutation(i) = i;
928 auto comparator =
comparison.getComparator(brlid);
932 bool alreadyAdded =
false;
936 auto offset =
A.graph.row_map(
blockSize * brlid);
937 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
938 auto idx = offset + block_permutation(i);
939 auto clid =
A.graph.entries(idx);
943 if (bclid > prev_bclid)
944 alreadyAdded =
false;
948 graph.entries(j) = bclid;
957 template <
class local_matrix_type>
967 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
968 #if KOKKOS_VERSION >= 40799
969 using ATS = KokkosKernels::ArithTraits<local_ordinal_type>;
971 using ATS = Kokkos::ArithTraits<local_ordinal_type>;
992 KOKKOS_INLINE_FUNCTION
995 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
998 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
1000 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
1001 block_permutation(i) = i;
1003 auto comparator =
comparison.getComparator(brlid);
1007 bool alreadyAdded =
false;
1010 auto offset =
A.graph.row_map(
blockSize * brlid);
1011 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
1012 auto idx = offset + block_permutation(i);
1013 auto clid =
A.graph.entries(idx);
1017 if (bclid > prev_bclid)
1018 alreadyAdded =
false;
1021 if (!alreadyAdded) {
1023 alreadyAdded =
true;
1024 #ifdef MUELU_COALESCE_DROP_DEBUG
1025 Kokkos::printf(
"%5d ", bclid);
1030 #ifdef MUELU_COALESCE_DROP_DEBUG
1031 Kokkos::printf(
"\n");
1038 template <
class local_matrix_type>
1046 #if KOKKOS_VERSION >= 40799
1047 using ATS = KokkosKernels::ArithTraits<scalar_type>;
1049 using ATS = Kokkos::ArithTraits<scalar_type>;
1051 #if KOKKOS_VERSION >= 40799
1052 using OTS = KokkosKernels::ArithTraits<local_ordinal_type>;
1054 using OTS = Kokkos::ArithTraits<local_ordinal_type>;
1060 local_matrix_type
A;
1080 KOKKOS_INLINE_FUNCTION
1083 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
1086 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
1088 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
1089 block_permutation(i) = i;
1091 auto comparator =
comparison.getComparator(brlid);
1095 bool alreadyAdded =
false;
1099 auto offset =
A.graph.row_map(
blockSize * brlid);
1100 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
1101 auto idx = offset + block_permutation(i);
1102 auto clid =
A.graph.entries(idx);
1106 if (bclid > prev_bclid)
1107 alreadyAdded =
false;
1110 if (!alreadyAdded) {
1111 mergedA.graph.entries(j) = bclid;
1114 alreadyAdded =
true;
1121 template <
class local_matrix_type,
class local_graph_type>
1129 local_matrix_type
A;
1139 KOKKOS_INLINE_FUNCTION
1141 auto rowA =
A.row(rlid);
1142 size_t row_start =
A.graph.row_map(rlid);
1147 graph.entries(graph_offset + jj) = rowA.colidx(k);
typename local_matrix_type::ordinal_type local_ordinal_type
KOKKOS_INLINE_FUNCTION bool operator()(size_t x, size_t y) const
Kokkos::ArithTraits< local_ordinal_type > OTS
typename local_matrix_type::memory_space memory_space
typename ATS::magnitudeType magnitudeType
Kokkos::ArithTraits< scalar_type > ATS
typename local_matrix_type::memory_space memory_space
block_indices_view_type ghosted_point_to_block
Kokkos::View< DecisionType *, memory_space > results_view
typename local_matrix_type::memory_space memory_space
Kokkos::ArithTraits< local_ordinal_type > OTS
Comparator< local_matrix_type > comparator_type
Kokkos::View< local_ordinal_type *, memory_space > permutation_type
typename local_matrix_type::row_map_type::non_const_type rowptr_type
Kokkos::View< DecisionType *, memory_space > results_view
KOKKOS_INLINE_FUNCTION void operatorRow(const local_ordinal_type rlid) const
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type rlid, local_ordinal_type &nnz, const bool &final) const
Kokkos::View< DecisionType *, memory_space > results_view
KOKKOS_INLINE_FUNCTION void operatorRow(const local_ordinal_type rlid) const
typename local_matrix_type::row_map_type::non_const_type rowptr_type
typename local_matrix_type::memory_space memory_space
permutation_type permutation
KOKKOS_INLINE_FUNCTION comparator_type getComparator(local_ordinal_type brlid) const
magnitudeType dirichletThreshold
const local_matrix_type2 A
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type rlid) const
block_indices_view_type ghosted_point_to_block
Kokkos::View< DecisionType *, memory_space > results_view
const block_indices_view_type ghosted_point_to_block
magnitudeType dirichletThreshold
typename local_matrix_type::value_type scalar_type
PointwiseCountingFunctor(local_matrix_type &A_, results_view &results_, rowptr_type &rowptr_, functor_type &functor_)
permutation_type permutation
PointwiseCountingFunctor< local_matrix_type, remaining_functor_types...> remainingFunctors
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::View< DecisionType *, memory_space > results_view
typename local_matrix_type::value_type scalar_type
rowptr_type filtered_rowptr
typename local_matrix_type::ordinal_type local_ordinal_type
local_ordinal_type blockSize
VectorCountingFunctor< local_matrix_type, remaining_functor_types...> remainingFunctors
typename local_matrix_type::memory_space memory_space
local_matrix_type filteredA
rowptr_type merged_rowptr
PointwiseCountingFunctor(local_matrix_type &A_, results_view &results_, rowptr_type &rowptr_, bool firstFunctor_, functor_type &functor_, remaining_functor_types &...remainingFunctors_)
Kokkos::View< local_ordinal_type *, memory_space > permutation_type
permutation_type permutation
Kokkos::ArithTraits< scalar_type > ATS
const local_ordinal_type offset
local_ordinal_type blockSize
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type brlid, Kokkos::pair< local_ordinal_type, local_ordinal_type > &nnz, const bool &final) const
BlockRowComparison< local_matrix_type > comparison
block_indices_view_type ghosted_point_to_block
typename local_matrix_type::ordinal_type local_ordinal_type
typename local_matrix_type::memory_space memory_space
typename local_matrix_type::value_type scalar_type
BlockRowComparison< local_matrix_type > comparison
typename local_matrix_type::ordinal_type local_ordinal_type
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
typename local_matrix_type::value_type scalar_type
Kokkos::View< DecisionType *, memory_space > results_view
Kokkos::ArithTraits< local_ordinal_type > ATS
typename local_matrix_type::memory_space memory_space
BlockRowComparison< local_matrix_type > comparison
Kokkos::View< DecisionType *, memory_space > results_view
typename local_matrix_type::ordinal_type local_ordinal_type
typename local_matrix_type::row_map_type::non_const_type rowptr_type
Kokkos::ArithTraits< local_ordinal_type > ATS
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
typename local_matrix_type::value_type scalar_type
typename local_matrix_type::memory_space memory_space
PointwiseFillNoReuseFunctor(local_matrix_type &A_, results_view &results_, local_matrix_type &filteredA_, magnitudeType dirichletThreshold_)
typename local_matrix_type::row_map_type::non_const_type rowptr_type
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type rlid) const
rowptr_type filtered_rowptr
KOKKOS_INLINE_FUNCTION void serialHeapSort(view_type &v, comparator_type comparator)
typename local_matrix_type::value_type scalar_type
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 ATS::magnitudeType magnitudeType
Functor that executes a sequence of sub-functors on each block of rows.
typename local_matrix_type::ordinal_type local_ordinal_type
Kokkos::ArithTraits< scalar_type > ATS
typename local_matrix_type::ordinal_type local_ordinal_type
Kokkos::ArithTraits< scalar_type > ATS
PointwiseCountingFunctor(local_matrix_type &A_, results_view &results_, rowptr_type &rowptr_, functor_type &functor_, remaining_functor_types &...remainingFunctors_)
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_)
block_indices_view_type ghosted_point_to_block
PointwiseCountingFunctor(local_matrix_type &A_, results_view &results_, rowptr_type &rowptr_, bool firstFunctor_, functor_type &functor_)
Kokkos::View< local_ordinal_type *, memory_space > permutation_type
typename local_matrix_type::memory_space memory_space
Functor that fills the filtered matrix while reusing the graph of the matrix before dropping...
local_ordinal_type blockSize
block_indices_view_type ghosted_point_to_block
Kokkos::ArithTraits< local_ordinal_type > ATS
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_)
MergeCountFunctor(local_matrix_type &A_, local_ordinal_type blockSize_, block_indices_view_type ghosted_point_to_block_, rowptr_type &merged_rowptr_)
Functor that executes a sequence of sub-functors on each row for a problem with blockSize == 1...
Kokkos::View< DecisionType *, memory_space > results_view
local_ordinal_type blockSize
typename local_matrix_type::ordinal_type local_ordinal_type
typename local_matrix_type2::ordinal_type local_ordinal_type
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type rlid) const
magnitudeType dirichletThreshold
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type brlid, Kokkos::pair< local_ordinal_type, local_ordinal_type > &nnz, const bool &final) const
typename local_matrix_type::ordinal_type local_ordinal_type
local_ordinal_type blockSize
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_)
typename local_matrix_type::value_type scalar_type
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type rlid, local_ordinal_type &nnz, const bool &final) const
Kokkos::View< local_ordinal_type *, memory_space > permutation_type
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type brlid, local_ordinal_type &nnz_graph, const bool &final) const
typename local_matrix_type::row_map_type::non_const_type rowptr_type
typename local_matrix_type::value_type scalar_type
typename local_matrix_type::memory_space memory_space
typename local_matrix_type::memory_space memory_space
typename ATS::magnitudeType magnitudeType
typename local_matrix_type::value_type scalar_type
typename local_matrix_type::value_type scalar_type
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
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::staticcrsgraph_type local_graph_type
Functor does not reuse the graph of the matrix for a problem with blockSize == 1. ...
typename ATS::magnitudeType magnitudeType
local_matrix_type filteredA
BlockRowComparison< local_matrix_type > comparison
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type brlid) const
block_indices_view_type ghosted_point_to_block
BlockRowComparison(local_matrix_type &A_, local_ordinal_type bsize_, block_indices_view_type ghosted_point_to_block_)
Kokkos::View< DecisionType *, memory_space > results_view
BlockRowComparison< local_matrix_type > comparison
typename local_matrix_type2::memory_space memory_space
permutation_type permutation
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
permutation_type permutation
Kokkos::View< local_ordinal_type *, memory_space > permutation_type
GraphConstruction(local_matrix_type &A_, results_view &results_, local_graph_type &graph_)
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type brlid) const
typename local_matrix_type::ordinal_type local_ordinal_type
local_matrix_type mergedA
MergeFillFunctor(local_matrix_type &A_, local_ordinal_type blockSize_, block_indices_view_type ghosted_point_to_block_, local_matrix_type &mergedA_)
local_matrix_type filteredA
Kokkos::View< DecisionType *, memory_space > results_view
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
typename local_matrix_type::staticcrsgraph_type local_graph_type