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>
333 using ATS = KokkosKernels::ArithTraits<scalar_type>;
350 KOKKOS_INLINE_FUNCTION
352 auto rowA =
A.row(rlid);
353 size_t K =
A.graph.row_map(rlid);
367 rowFilteredA.colidx(j) = rowA.colidx(k);
368 rowFilteredA.value(j) = rowA.value(k);
370 keptRowSumAbs += ATS::magnitude(rowFilteredA.value(j));
373 }
else if constexpr (lumpingChoice !=
no_lumping) {
374 droppedSum += rowA.value(k);
378 rowFilteredA.value(diagOffset) += droppedSum;
380 rowFilteredA.value(diagOffset) =
one;
382 if (ATS::real(droppedSum) >= ATS::real(
zero)) {
383 rowFilteredA.value(diagOffset) += droppedSum;
387 rowFilteredA.value(k) += droppedSum * ATS::magnitude(rowFilteredA.value(k)) / keptRowSumAbs;
394template <
class local_matrix_type>
411 template <
class local_matrix_type2>
418 const local_matrix_type2
A;
423 KOKKOS_INLINE_FUNCTION
426 ,
offset(A_.graph.row_map(bsize_ * brlid_))
429 KOKKOS_INLINE_FUNCTION
437 KOKKOS_INLINE_FUNCTION
453template <
class local_matrix_type,
455 class... remaining_functor_types>
465 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
466 using ATS = KokkosKernels::ArithTraits<local_ordinal_type>;
482#ifdef MUELU_COALESCE_DROP_DEBUG
483 std::string functorName;
496 ,
remainingFunctors(A_, blockSize_, ghosted_point_to_block_, results_, filtered_rowptr_, graph_rowptr_, remainingFunctors_...) {
498#ifdef MUELU_COALESCE_DROP_DEBUG
499 std::string mangledFunctorName =
typeid(
decltype(
functor)).name();
501 char* demangledFunctorName = 0;
502 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
503 functorName = demangledFunctorName;
507 KOKKOS_INLINE_FUNCTION
508 void join(Kokkos::pair<local_ordinal_type, local_ordinal_type>& dest,
const Kokkos::pair<local_ordinal_type, local_ordinal_type>& src)
const {
509 dest.first += src.first;
510 dest.second += src.second;
513 KOKKOS_INLINE_FUNCTION
519 KOKKOS_INLINE_FUNCTION
521 auto nnz_filtered = &nnz.first;
522 auto nnz_graph = &nnz.second;
524#ifdef MUELU_COALESCE_DROP_DEBUG
525 Kokkos::printf(
"\nStarting on block row %d\n", brlid);
528#ifdef MUELU_COALESCE_DROP_DEBUG
530 Kokkos::printf(
"\nStarting on row %d\n", rlid);
532 auto row =
A.rowConst(rlid);
534 Kokkos::printf(
"indices: ");
536 auto clid = row.colidx(k);
537 Kokkos::printf(
"%5d ", clid);
539 Kokkos::printf(
"\n");
541 Kokkos::printf(
"values: ");
543 auto val = row.value(k);
544 Kokkos::printf(
"%5f ", val);
546 Kokkos::printf(
"\n");
553#ifdef MUELU_COALESCE_DROP_DEBUG
555 Kokkos::printf(
"%s\n", functorName.c_str());
557 auto row =
A.rowConst(rlid);
558 const size_t offset =
A.graph.row_map(rlid);
560 Kokkos::printf(
"decisions: ");
562 Kokkos::printf(
"%5d ",
results(offset + k));
564 Kokkos::printf(
"\n");
568#ifdef MUELU_COALESCE_DROP_DEBUG
569 Kokkos::printf(
"Done with row %d\n", rlid);
572 size_t start =
A.graph.row_map(rlid);
573 size_t end =
A.graph.row_map(rlid + 1);
574 for (
size_t i = start; i < end; ++i) {
583#ifdef MUELU_COALESCE_DROP_DEBUG
584 Kokkos::printf(
"Done with block row %d\nGraph indices ", brlid);
588 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
591 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
593 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
594 block_permutation(i) = i;
596 auto comparator =
comparison.getComparator(brlid);
600 bool alreadyAdded =
false;
603 auto offset =
A.graph.row_map(
blockSize * brlid);
604 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
605 auto idx = offset + block_permutation(i);
606 auto clid =
A.graph.entries(idx);
610 if (bclid > prev_bclid)
611 alreadyAdded =
false;
617#ifdef MUELU_COALESCE_DROP_DEBUG
618 Kokkos::printf(
"%5d ", bclid);
623#ifdef MUELU_COALESCE_DROP_DEBUG
624 Kokkos::printf(
"\n");
631template <
class local_matrix_type,
642 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
643 using ATS = KokkosKernels::ArithTraits<local_ordinal_type>;
654#ifdef MUELU_COALESCE_DROP_DEBUG
655 std::string functorName;
672#ifdef MUELU_COALESCE_DROP_DEBUG
673 std::string mangledFunctorName =
typeid(
decltype(
functor)).name();
675 char* demangledFunctorName = 0;
676 demangledFunctorName = abi::__cxa_demangle(mangledFunctorName.c_str(), 0, 0, &status);
677 functorName = demangledFunctorName;
681 KOKKOS_INLINE_FUNCTION
682 void join(Kokkos::pair<local_ordinal_type, local_ordinal_type>& dest,
const Kokkos::pair<local_ordinal_type, local_ordinal_type>& src)
const {
683 dest.first += src.first;
684 dest.second += src.second;
687 KOKKOS_INLINE_FUNCTION
692 KOKKOS_INLINE_FUNCTION
694 auto nnz_filtered = &nnz.first;
695 auto nnz_graph = &nnz.second;
697#ifdef MUELU_COALESCE_DROP_DEBUG
698 Kokkos::printf(
"\nStarting on block row %d\n", brlid);
701#ifdef MUELU_COALESCE_DROP_DEBUG
703 Kokkos::printf(
"\nStarting on row %d\n", rlid);
705 auto row =
A.rowConst(rlid);
707 Kokkos::printf(
"indices: ");
709 auto clid = row.colidx(k);
710 Kokkos::printf(
"%5d ", clid);
712 Kokkos::printf(
"\n");
714 Kokkos::printf(
"values: ");
716 auto val = row.value(k);
717 Kokkos::printf(
"%5f ", val);
719 Kokkos::printf(
"\n");
725#ifdef MUELU_COALESCE_DROP_DEBUG
727 Kokkos::printf(
"%s\n", functorName.c_str());
729 auto row =
A.rowConst(rlid);
730 const size_t offset =
A.graph.row_map(rlid);
732 Kokkos::printf(
"decisions: ");
734 Kokkos::printf(
"%5d ",
results(offset + k));
736 Kokkos::printf(
"\n");
740#ifdef MUELU_COALESCE_DROP_DEBUG
741 Kokkos::printf(
"Done with row %d\n", rlid);
744 size_t start =
A.graph.row_map(rlid);
745 size_t end =
A.graph.row_map(rlid + 1);
746 for (
size_t i = start; i < end; ++i) {
755#ifdef MUELU_COALESCE_DROP_DEBUG
756 Kokkos::printf(
"Done with block row %d\nGraph indices ", brlid);
760 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
763 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
765 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
766 block_permutation(i) = i;
768 auto comparator =
comparison.getComparator(brlid);
772 bool alreadyAdded =
false;
775 auto offset =
A.graph.row_map(
blockSize * brlid);
776 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
777 auto idx = offset + block_permutation(i);
778 auto clid =
A.graph.entries(idx);
782 if (bclid > prev_bclid)
783 alreadyAdded =
false;
789#ifdef MUELU_COALESCE_DROP_DEBUG
790 Kokkos::printf(
"%5d ", bclid);
795#ifdef MUELU_COALESCE_DROP_DEBUG
796 Kokkos::printf(
"\n");
810template <
class local_matrix_type,
bool lumping,
bool reuse>
818 using ATS = KokkosKernels::ArithTraits<scalar_type>;
819 using OTS = KokkosKernels::ArithTraits<local_ordinal_type>;
850 KOKKOS_INLINE_FUNCTION
853 auto rowA =
A.row(rlid);
854 size_t row_start =
A.graph.row_map(rlid);
860 if constexpr (lumping) {
867 rowFilteredA.colidx(j) = rowA.colidx(k);
868 rowFilteredA.value(j) = rowA.value(k);
870 }
else if constexpr (lumping) {
871 diagCorrection += rowA.value(k);
872 if constexpr (reuse) {
873 rowFilteredA.colidx(j) = rowA.colidx(k);
874 rowFilteredA.value(j) =
zero;
877 }
else if constexpr (reuse) {
878 rowFilteredA.colidx(j) = rowA.colidx(k);
879 rowFilteredA.value(j) =
zero;
883 if constexpr (lumping) {
884 rowFilteredA.value(diagOffset) += diagCorrection;
886 rowFilteredA.value(diagOffset) =
one;
891 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
894 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
896 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
897 block_permutation(i) = i;
899 auto comparator =
comparison.getComparator(brlid);
903 bool alreadyAdded =
false;
907 auto offset =
A.graph.row_map(
blockSize * brlid);
908 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
909 auto idx = offset + block_permutation(i);
910 auto clid =
A.graph.entries(idx);
914 if (bclid > prev_bclid)
915 alreadyAdded =
false;
919 graph.entries(j) = bclid;
928template <
class local_matrix_type>
938 using rowptr_type =
typename local_matrix_type::row_map_type::non_const_type;
939 using ATS = KokkosKernels::ArithTraits<local_ordinal_type>;
959 KOKKOS_INLINE_FUNCTION
962 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
965 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
967 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
968 block_permutation(i) = i;
970 auto comparator =
comparison.getComparator(brlid);
974 bool alreadyAdded =
false;
977 auto offset =
A.graph.row_map(
blockSize * brlid);
978 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
979 auto idx = offset + block_permutation(i);
980 auto clid =
A.graph.entries(idx);
984 if (bclid > prev_bclid)
985 alreadyAdded =
false;
991#ifdef MUELU_COALESCE_DROP_DEBUG
992 Kokkos::printf(
"%5d ", bclid);
997#ifdef MUELU_COALESCE_DROP_DEBUG
998 Kokkos::printf(
"\n");
1005template <
class local_matrix_type>
1013 using ATS = KokkosKernels::ArithTraits<scalar_type>;
1014 using OTS = KokkosKernels::ArithTraits<local_ordinal_type>;
1019 local_matrix_type
A;
1039 KOKKOS_INLINE_FUNCTION
1042 auto block_clids = Kokkos::subview(
A.graph.entries, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
1045 auto block_permutation = Kokkos::subview(
permutation, Kokkos::make_pair(
A.graph.row_map(
blockSize * brlid),
1047 for (
size_t i = 0; i < block_permutation.extent(0); ++i)
1048 block_permutation(i) = i;
1050 auto comparator =
comparison.getComparator(brlid);
1054 bool alreadyAdded =
false;
1058 auto offset =
A.graph.row_map(
blockSize * brlid);
1059 for (
size_t i = 0; i < block_permutation.extent(0); ++i) {
1060 auto idx = offset + block_permutation(i);
1061 auto clid =
A.graph.entries(idx);
1065 if (bclid > prev_bclid)
1066 alreadyAdded =
false;
1069 if (!alreadyAdded) {
1070 mergedA.graph.entries(j) = bclid;
1073 alreadyAdded =
true;
1080template <
class local_matrix_type,
class local_graph_type>
1088 local_matrix_type
A;
1098 KOKKOS_INLINE_FUNCTION
1100 auto rowA =
A.row(rlid);
1101 size_t row_start =
A.graph.row_map(rlid);
1106 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.
typename local_matrix_type::memory_space memory_space
Kokkos::View< DecisionType *, memory_space > results_view
typename local_matrix_type::ordinal_type local_ordinal_type
PointwiseFillNoReuseFunctor(local_matrix_type &A_, results_view &results_, local_matrix_type &filteredA_, magnitudeType dirichletThreshold_)
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type rlid) const
typename ATS::magnitudeType magnitudeType
local_matrix_type filteredA
typename local_matrix_type::value_type scalar_type
KokkosKernels::ArithTraits< scalar_type > ATS
magnitudeType dirichletThreshold
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
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
magnitudeType dirichletThreshold
typename local_matrix_type::ordinal_type local_ordinal_type
local_matrix_type filteredA
typename local_matrix_type::memory_space memory_space
permutation_type permutation
typename ATS::magnitudeType magnitudeType
Kokkos::View< DecisionType *, memory_space > results_view
BlockRowComparison< local_matrix_type > comparison
KokkosKernels::ArithTraits< scalar_type > ATS
KOKKOS_INLINE_FUNCTION void operator()(const local_ordinal_type brlid) const
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_)
Kokkos::View< local_ordinal_type *, memory_space > permutation_type
local_ordinal_type blockSize
block_indices_view_type ghosted_point_to_block
typename local_matrix_type::staticcrsgraph_type local_graph_type
typename local_matrix_type::value_type scalar_type
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_)