28 template<
class T,
typename... properties>
30 const Kokkos::View<T*, properties...>& view,
31 const Kokkos::View<int8*, Kokkos::LayoutLeft, Kokkos::HostSpace>& flag,
36 T maxValue = largestNegative<T>();
37 for(
label i=start; i<end; ++i)
45 template<
typename T,
typename... properties>
48 const Kokkos::View<T*, properties...>& view,
49 const Kokkos::View<int8*, Kokkos::LayoutLeft, Kokkos::HostSpace>& flag,
55 T maxValue = largestNegative<T>();
57 auto RP = Kokkos::RangePolicy<
58 Kokkos::IndexType<size_t>,
59 typename Kokkos::View<T, properties...>::execution_space >(start, end);
61 Kokkos::parallel_reduce(
"pointFieldAlgorithms-maxActive",
64 if(flag[i] ==
ActivePoint) valueToUpdate =
max(view[i],valueToUpdate);
66 Kokkos::Max<T>( maxValue )
73 template<
typename T,
typename... properties>
76 const Kokkos::View<T*, properties...>& view,
77 const Kokkos::View<int8*, Kokkos::LayoutLeft>& flag,
83 T maxValue = largestNegative<T>();
85 auto RP = Kokkos::RangePolicy<
86 Kokkos::IndexType<size_t>,
87 typename Kokkos::View<T, properties...>::execution_space >(start, end);
89 Kokkos::parallel_reduce(
"pointFieldAlgorithms-maxActive",
92 if(flag[i] ==
ActivePoint) valueToUpdate =
max(view[i],valueToUpdate);
94 Kokkos::Max<T>( maxValue )
99 template<
class T,
class MemorySpace>
105 return max(pField.VectorField());
107 const auto len = pField.size();
108 if constexpr ( pField.isHostAccessible())
112 pField.deviceVectorAll(),
114 static_cast<size_t>(0),
119 pField.deviceVectorAll(),
121 static_cast<size_t>(0),
128 pField.deviceVectorAll(),
130 static_cast<size_t>(0),
139 template<
class s
ide,
class T,
class MemorySpace=
void>
143 return max(pField.VectorField());
145 auto len = pField.size();
147 if constexpr (std::is_same<side,HostSide>::value)
151 pField.hostVectorAll(),
153 static_cast<size_t>(0),
158 pField.hostVectorAll(),
160 static_cast<size_t>(0),
166 pField.deviceVectorAll(),
168 static_cast<size_t>(0),