10 #ifndef MUELU_MATRIXCONSTRUCTION_HPP
11 #define MUELU_MATRIXCONSTRUCTION_HPP
13 #include "Kokkos_Core.hpp"
14 #include "Kokkos_ArithTraits.hpp"
20 #ifdef MUELU_COALESCE_DROP_DEBUG
25 namespace MueLu::MatrixConstruction {
36 template <
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");
135 template <
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);
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) {
247 template <
class local_matrix_type,
class local_graph_type,
bool lumping>
254 using ATS = Kokkos::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;
322 template <
class local_matrix_type,
bool lumping>
329 using ATS = Kokkos::ArithTraits<scalar_type>;
346 KOKKOS_INLINE_FUNCTION
348 auto rowA =
A.row(rlid);
349 size_t K =
A.graph.row_map(rlid);
355 if constexpr (lumping) {
362 rowFilteredA.colidx(j) = rowA.colidx(k);
363 rowFilteredA.value(j) = rowA.value(k);
365 }
else if constexpr (lumping) {
366 diagCorrection += rowA.value(k);
369 if constexpr (lumping) {
370 rowFilteredA.value(diagOffset) += diagCorrection;
372 rowFilteredA.value(diagOffset) =
one;
377 template <
class local_matrix_type>
394 template <
class local_matrix_type2>
401 const local_matrix_type2
A;
406 KOKKOS_INLINE_FUNCTION
409 ,
offset(A_.graph.row_map(bsize_ * brlid_))
412 KOKKOS_INLINE_FUNCTION
420 KOKKOS_INLINE_FUNCTION
436 template <
class local_matrix_type,
438 class... remaining_functor_types>
448 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
449 using ATS = Kokkos::ArithTraits<local_ordinal_type>;
465 #ifdef MUELU_COALESCE_DROP_DEBUG
466 std::string functorName;
479 ,
remainingFunctors(A_, blockSize_, ghosted_point_to_block_, results_, filtered_rowptr_, graph_rowptr_, remainingFunctors_...) {
481 #ifdef MUELU_COALESCE_DROP_DEBUG
482 std::string mangledFunctorName =
typeid(decltype(
functor)).name();
484 char* demangledFunctorName = 0;
485 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
486 functorName = demangledFunctorName;
490 KOKKOS_INLINE_FUNCTION
491 void join(Kokkos::pair<local_ordinal_type, local_ordinal_type>& dest,
const Kokkos::pair<local_ordinal_type, local_ordinal_type>& src)
const {
492 dest.first += src.first;
493 dest.second += src.second;
496 KOKKOS_INLINE_FUNCTION
502 KOKKOS_INLINE_FUNCTION
504 auto nnz_filtered = &nnz.first;
505 auto nnz_graph = &nnz.second;
507 #ifdef MUELU_COALESCE_DROP_DEBUG
508 Kokkos::printf(
"\nStarting on block row %d\n", brlid);
511 #ifdef MUELU_COALESCE_DROP_DEBUG
513 Kokkos::printf(
"\nStarting on row %d\n", rlid);
515 auto row =
A.rowConst(rlid);
517 Kokkos::printf(
"indices: ");
519 auto clid = row.colidx(k);
520 Kokkos::printf(
"%5d ", clid);
522 Kokkos::printf(
"\n");
524 Kokkos::printf(
"values: ");
526 auto val = row.value(k);
527 Kokkos::printf(
"%5f ", val);
529 Kokkos::printf(
"\n");
536 #ifdef MUELU_COALESCE_DROP_DEBUG
538 Kokkos::printf(
"%s\n", functorName.c_str());
540 auto row =
A.rowConst(rlid);
541 const size_t offset =
A.graph.row_map(rlid);
543 Kokkos::printf(
"decisions: ");
545 Kokkos::printf(
"%5d ",
results(offset + k));
547 Kokkos::printf(
"\n");
551 #ifdef MUELU_COALESCE_DROP_DEBUG
552 Kokkos::printf(
"Done with row %d\n", rlid);
555 size_t start =
A.graph.row_map(rlid);
556 size_t end =
A.graph.row_map(rlid + 1);
557 for (
size_t i = start; i < end; ++i) {
566 #ifdef MUELU_COALESCE_DROP_DEBUG
567 Kokkos::printf(
"Done with block row %d\nGraph indices ", brlid);
571 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
574 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
576 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
577 block_permutation(i) = i;
579 auto comparator =
comparison.getComparator(brlid);
583 bool alreadyAdded =
false;
586 auto offset =
A.graph.row_map(
blockSize * brlid);
587 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
588 auto idx = offset + block_permutation(i);
589 auto clid =
A.graph.entries(idx);
593 if (bclid > prev_bclid)
594 alreadyAdded =
false;
600 #ifdef MUELU_COALESCE_DROP_DEBUG
601 Kokkos::printf(
"%5d ", bclid);
606 #ifdef MUELU_COALESCE_DROP_DEBUG
607 Kokkos::printf(
"\n");
614 template <
class local_matrix_type,
625 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
626 using ATS = Kokkos::ArithTraits<local_ordinal_type>;
638 #ifdef MUELU_COALESCE_DROP_DEBUG
639 std::string functorName;
656 #ifdef MUELU_COALESCE_DROP_DEBUG
657 std::string mangledFunctorName =
typeid(decltype(
functor)).name();
659 char* demangledFunctorName = 0;
660 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
661 functorName = demangledFunctorName;
665 KOKKOS_INLINE_FUNCTION
666 void join(Kokkos::pair<local_ordinal_type, local_ordinal_type>& dest,
const Kokkos::pair<local_ordinal_type, local_ordinal_type>& src)
const {
667 dest.first += src.first;
668 dest.second += src.second;
671 KOKKOS_INLINE_FUNCTION
676 KOKKOS_INLINE_FUNCTION
678 auto nnz_filtered = &nnz.first;
679 auto nnz_graph = &nnz.second;
681 #ifdef MUELU_COALESCE_DROP_DEBUG
682 Kokkos::printf(
"\nStarting on block row %d\n", brlid);
685 #ifdef MUELU_COALESCE_DROP_DEBUG
687 Kokkos::printf(
"\nStarting on row %d\n", rlid);
689 auto row =
A.rowConst(rlid);
691 Kokkos::printf(
"indices: ");
693 auto clid = row.colidx(k);
694 Kokkos::printf(
"%5d ", clid);
696 Kokkos::printf(
"\n");
698 Kokkos::printf(
"values: ");
700 auto val = row.value(k);
701 Kokkos::printf(
"%5f ", val);
703 Kokkos::printf(
"\n");
709 #ifdef MUELU_COALESCE_DROP_DEBUG
711 Kokkos::printf(
"%s\n", functorName.c_str());
713 auto row =
A.rowConst(rlid);
714 const size_t offset =
A.graph.row_map(rlid);
716 Kokkos::printf(
"decisions: ");
718 Kokkos::printf(
"%5d ",
results(offset + k));
720 Kokkos::printf(
"\n");
724 #ifdef MUELU_COALESCE_DROP_DEBUG
725 Kokkos::printf(
"Done with row %d\n", rlid);
728 size_t start =
A.graph.row_map(rlid);
729 size_t end =
A.graph.row_map(rlid + 1);
730 for (
size_t i = start; i < end; ++i) {
739 #ifdef MUELU_COALESCE_DROP_DEBUG
740 Kokkos::printf(
"Done with block row %d\nGraph indices ", brlid);
744 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
747 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
749 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
750 block_permutation(i) = i;
752 auto comparator =
comparison.getComparator(brlid);
756 bool alreadyAdded =
false;
759 auto offset =
A.graph.row_map(
blockSize * brlid);
760 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
761 auto idx = offset + block_permutation(i);
762 auto clid =
A.graph.entries(idx);
766 if (bclid > prev_bclid)
767 alreadyAdded =
false;
773 #ifdef MUELU_COALESCE_DROP_DEBUG
774 Kokkos::printf(
"%5d ", bclid);
779 #ifdef MUELU_COALESCE_DROP_DEBUG
780 Kokkos::printf(
"\n");
794 template <
class local_matrix_type,
bool lumping,
bool reuse>
802 using ATS = Kokkos::ArithTraits<scalar_type>;
803 using OTS = Kokkos::ArithTraits<local_ordinal_type>;
834 KOKKOS_INLINE_FUNCTION
837 auto rowA =
A.row(rlid);
838 size_t row_start =
A.graph.row_map(rlid);
844 if constexpr (lumping) {
851 rowFilteredA.colidx(j) = rowA.colidx(k);
852 rowFilteredA.value(j) = rowA.value(k);
854 }
else if constexpr (lumping) {
855 diagCorrection += rowA.value(k);
856 if constexpr (reuse) {
857 rowFilteredA.colidx(j) = rowA.colidx(k);
858 rowFilteredA.value(j) =
zero;
861 }
else if constexpr (reuse) {
862 rowFilteredA.colidx(j) = rowA.colidx(k);
863 rowFilteredA.value(j) =
zero;
867 if constexpr (lumping) {
868 rowFilteredA.value(diagOffset) += diagCorrection;
870 rowFilteredA.value(diagOffset) =
one;
875 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
878 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
880 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
881 block_permutation(i) = i;
883 auto comparator =
comparison.getComparator(brlid);
887 bool alreadyAdded =
false;
891 auto offset =
A.graph.row_map(
blockSize * brlid);
892 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
893 auto idx = offset + block_permutation(i);
894 auto clid =
A.graph.entries(idx);
898 if (bclid > prev_bclid)
899 alreadyAdded =
false;
903 graph.entries(j) = bclid;
912 template <
class local_matrix_type>
922 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
923 using ATS = Kokkos::ArithTraits<local_ordinal_type>;
943 KOKKOS_INLINE_FUNCTION
946 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
949 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
951 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
952 block_permutation(i) = i;
954 auto comparator =
comparison.getComparator(brlid);
958 bool alreadyAdded =
false;
961 auto offset =
A.graph.row_map(
blockSize * brlid);
962 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
963 auto idx = offset + block_permutation(i);
964 auto clid =
A.graph.entries(idx);
968 if (bclid > prev_bclid)
969 alreadyAdded =
false;
975 #ifdef MUELU_COALESCE_DROP_DEBUG
976 Kokkos::printf(
"%5d ", bclid);
981 #ifdef MUELU_COALESCE_DROP_DEBUG
982 Kokkos::printf(
"\n");
989 template <
class local_matrix_type>
997 using ATS = Kokkos::ArithTraits<scalar_type>;
998 using OTS = Kokkos::ArithTraits<local_ordinal_type>;
1003 local_matrix_type
A;
1023 KOKKOS_INLINE_FUNCTION
1026 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
1029 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
1031 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
1032 block_permutation(i) = i;
1034 auto comparator =
comparison.getComparator(brlid);
1038 bool alreadyAdded =
false;
1042 auto offset =
A.graph.row_map(
blockSize * brlid);
1043 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
1044 auto idx = offset + block_permutation(i);
1045 auto clid =
A.graph.entries(idx);
1049 if (bclid > prev_bclid)
1050 alreadyAdded =
false;
1053 if (!alreadyAdded) {
1054 mergedA.graph.entries(j) = bclid;
1057 alreadyAdded =
true;
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
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
permutation_type permutation
KOKKOS_INLINE_FUNCTION comparator_type getComparator(local_ordinal_type brlid) const
magnitudeType dirichletThreshold
const local_matrix_type2 A
block_indices_view_type ghosted_point_to_block
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::value_type scalar_type
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
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
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
Kokkos::ArithTraits< scalar_type > ATS
typename local_matrix_type::value_type scalar_type
BlockRowComparison< local_matrix_type > comparison
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
typename local_matrix_type::value_type scalar_type
Kokkos::ArithTraits< local_ordinal_type > ATS
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
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_INLINE_FUNCTION void operator()(const local_ordinal_type rlid) const
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
local_matrix_type filteredA
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
Kokkos::View< DecisionType *, memory_space > results_view
Functor that fills the filtered matrix while reusing the graph of the matrix before dropping...
typename local_matrix_type::ordinal_type local_ordinal_type
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_)
PointwiseFillNoReuseFunctor(local_matrix_type &A_, results_view &results_, local_matrix_type &filteredA_, magnitudeType dirichletThreshold_)
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_type2::ordinal_type local_ordinal_type
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::memory_space memory_space
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_)
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::memory_space memory_space
typename local_matrix_type::memory_space memory_space
typename ATS::magnitudeType magnitudeType
magnitudeType dirichletThreshold
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
typename ATS::magnitudeType magnitudeType
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
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