27 template<
class T,
typename... properties>
29 const Kokkos::View<T*, properties...>& view,
30 const Kokkos::View<int8*, Kokkos::LayoutLeft, Kokkos::HostSpace>& flag,
35 T maxValue = largestNegative<T>();
36 for(label i=start; i<end; ++i)
44 template<
typename T,
typename... properties>
47 const Kokkos::View<T*, properties...>& view,
48 const Kokkos::View<int8*, Kokkos::LayoutLeft, Kokkos::HostSpace>& flag,
54 T maxValue = largestNegative<T>();
56 auto RP = Kokkos::RangePolicy<
57 Kokkos::IndexType<size_t>,
58 typename Kokkos::View<T, properties...>::execution_space >(start, end);
60 Kokkos::parallel_reduce(
"pointFieldAlgorithms-maxActive",
63 if(flag[i] ==
ActivePoint) valueToUpdate =
max(view[i],valueToUpdate);
65 Kokkos::Max<T>( maxValue )
72 template<
typename T,
typename... properties>
75 const Kokkos::View<T*, properties...>& view,
76 const Kokkos::View<int8*, Kokkos::LayoutLeft>& flag,
82 T maxValue = largestNegative<T>();
84 auto RP = Kokkos::RangePolicy<
85 Kokkos::IndexType<size_t>,
86 typename Kokkos::View<T, properties...>::execution_space >(start, end);
88 Kokkos::parallel_reduce(
"pointFieldAlgorithms-maxActive",
91 if(flag[i] ==
ActivePoint) valueToUpdate =
max(view[i],valueToUpdate);
93 Kokkos::Max<T>( maxValue )
98 template<
class T,
class MemorySpace>
104 return max(pField.VectorField());
106 const auto len = pField.
size();
107 if constexpr ( pField.isHostAccessible())
113 static_cast<size_t>(0),
120 static_cast<size_t>(0),
129 static_cast<size_t>(0),
138 template<
class s
ide,
class T,
class MemorySpace=
void>
142 return max(pField.VectorField());
144 auto len = pField.
size();
146 if constexpr (std::is_same<side,HostSide>::value)
150 pField.hostViewAll(),
152 static_cast<size_t>(0),
157 pField.hostViewAll(),
159 static_cast<size_t>(0),
167 static_cast<size_t>(0),