42 #ifndef TPETRA_DETAILS_EQUILIBRATIONINFO_HPP
43 #define TPETRA_DETAILS_EQUILIBRATIONINFO_HPP
48 #include "TpetraCore_config.h"
49 #include "Kokkos_ArithTraits.hpp"
50 #include "Kokkos_Core.hpp"
78 template<
class ScalarType,
class DeviceType>
80 using val_type =
typename Kokkos::ArithTraits<ScalarType>::val_type;
81 using mag_type =
typename Kokkos::ArithTraits<val_type>::mag_type;
82 using device_type =
typename DeviceType::device_type;
83 using host_device_type =
typename Kokkos::View<mag_type*, device_type>::HostMirror::device_type;
94 const std::size_t lclNumCols,
95 const bool assumeSymmetric_) :
96 rowNorms (Kokkos::View<mag_type*, device_type> (
"rowNorms", lclNumRows)),
97 rowDiagonalEntries (Kokkos::View<val_type*, device_type> (
"rowDiagonalEntries", lclNumRows)),
98 colNorms (Kokkos::View<mag_type*, device_type> (
"colNorms", lclNumCols)),
115 const Kokkos::View<val_type*, device_type>& rowDiagonalEntries_,
116 const Kokkos::View<mag_type*, device_type>& colNorms_,
117 const Kokkos::View<val_type*, device_type>& colDiagonalEntries_,
118 const Kokkos::View<mag_type*, device_type>& rowScaledColNorms_,
119 const bool assumeSymmetric_,
120 const bool foundInf_,
121 const bool foundNan_,
122 const bool foundZeroDiag_,
123 const bool foundZeroRowNorm_) :
137 template<
class SrcDeviceType>
146 Kokkos::View<val_type*, device_type> (
"colDiagonalEntries", 0);
153 Kokkos::View<mag_type*, device_type> (
"rowScaledColNorms", 0);
169 auto rowNorms_h = Kokkos::create_mirror_view (
rowNorms);
171 auto colNorms_h = Kokkos::create_mirror_view (
colNorms);
175 return HostMirror {rowNorms_h, rowDiagonalEntries_h, colNorms_h,
238 #endif // TPETRA_DETAILS_EQUILIBRATIONINFO_HPP
Kokkos::View< mag_type *, device_type > colNorms
One-norms of the matrix's columns, distributed via the column Map.
Kokkos::View< mag_type *, device_type > rowNorms
One-norms of the matrix's rows, distributed via the row Map.
bool foundZeroDiag
Found a zero diagonal entry somewhere in the matrix.
bool assumeSymmetric
Whether to assume that the matrix is (globally) symmetric.
Kokkos::View< val_type *, device_type > colDiagonalEntries
Diagonal entries of the matrix, distributed via the column Map.
Struct storing results of Tpetra::computeRowAndColumnOneNorms.
void deep_copy(MultiVector< DS, DL, DG, DN > &dst, const MultiVector< SS, SL, SG, SN > &src)
Copy the contents of the MultiVector src into dst.
Kokkos::View< val_type *, device_type > rowDiagonalEntries
Diagonal entries of the matrix, distributed via the row Map.
Kokkos::View< mag_type *, device_type > rowScaledColNorms
One-norms of the matrix's columns, after the matrix's rows have been scaled by rowNorms.
void assign(const EquilibrationInfo< ScalarType, SrcDeviceType > &src)
Deep-copy src into *this.
bool foundNan
Found a NaN somewhere in the matrix.
bool foundInf
Found an Inf somewhere in the matrix.
bool foundZeroRowNorm
At least one row of the matrix has a zero norm.