43 #ifndef __Panzer_DOFManager_Functors_hpp__
44 #define __Panzer_DOFManager_Functors_hpp__
46 #include "Kokkos_Core.hpp"
47 #include "Phalanx_KokkosDeviceTypes.hpp"
50 namespace dof_functors {
53 template <
typename ReductionDataType,
typename view_t>
55 using policy_t = Kokkos::MDRangePolicy<typename view_t::execution_space, Kokkos::Rank<2>>;
59 void apply(ReductionDataType& sum)
const
61 const auto& values_ref =
values;
63 Kokkos::parallel_reduce(
65 KOKKOS_LAMBDA(
const typename policy_t::index_type indexi,
const typename policy_t::index_type indexj, ReductionDataType& local_sum)
67 local_sum += values_ref(indexi, indexj);
69 Kokkos::Sum<ReductionDataType>(sum)
Sums all entries of a Rank 2 Kokkos View.
Kokkos::MDRangePolicy< typename view_t::execution_space, Kokkos::Rank< 2 >> policy_t
void apply(ReductionDataType &sum) const