51struct EquilibrationInfo {
52#if KOKKOS_VERSION >= 40799
53 using val_type =
typename KokkosKernels::ArithTraits<ScalarType>::val_type;
55 using val_type =
typename Kokkos::ArithTraits<ScalarType>::val_type;
57#if KOKKOS_VERSION >= 40799
58 using mag_type =
typename KokkosKernels::ArithTraits<val_type>::mag_type;
60 using mag_type =
typename Kokkos::ArithTraits<val_type>::mag_type;
62 using device_type =
typename DeviceType::device_type;
63 using host_device_type =
typename Kokkos::View<mag_type*, device_type>::host_mirror_type::device_type;
64 using HostMirror = EquilibrationInfo<val_type, host_device_type>;
72 EquilibrationInfo(
const std::size_t lclNumRows,
73 const std::size_t lclNumCols,
74 const bool assumeSymmetric_)
75 :
rowNorms(Kokkos::View<mag_type*, device_type>(
"rowNorms", lclNumRows))
76 ,
rowDiagonalEntries(Kokkos::View<val_type*, device_type>(
"rowDiagonalEntries", lclNumRows))
77 ,
colNorms(Kokkos::View<mag_type*, device_type>(
"colNorms", lclNumCols))
79 assumeSymmetric_ ? std::size_t(0) : lclNumCols))
81 assumeSymmetric_ ? std::size_t(0) : lclNumCols))
88 EquilibrationInfo(
const Kokkos::View<mag_type*, device_type>& rowNorms_,
89 const Kokkos::View<val_type*, device_type>& rowDiagonalEntries_,
90 const Kokkos::View<mag_type*, device_type>& colNorms_,
91 const Kokkos::View<val_type*, device_type>& colDiagonalEntries_,
92 const Kokkos::View<mag_type*, device_type>& rowScaledColNorms_,
93 const bool assumeSymmetric_,
96 const bool foundZeroDiag_,
97 const bool foundZeroRowNorm_)
110 template <
class SrcDeviceType>
112 assign(
const EquilibrationInfo<ScalarType, SrcDeviceType>& src) {
122 Kokkos::View<val_type*, device_type>(
"colDiagonalEntries", 0);
129 Kokkos::View<mag_type*, device_type>(
"rowScaledColNorms", 0);
142 typename EquilibrationInfo<val_type, device_type>::HostMirror
144 auto rowNorms_h = Kokkos::create_mirror_view(
rowNorms);
146 auto colNorms_h = Kokkos::create_mirror_view(
colNorms);
150 return HostMirror{rowNorms_h, rowDiagonalEntries_h, colNorms_h,