44 #ifndef PANZER_HIERARCHIC_PARALLELISM_HPP
45 #define PANZER_HIERARCHIC_PARALLELISM_HPP
47 #include "Phalanx_KokkosDeviceTypes.hpp"
68 const int& vector_size,
69 const int& fad_vector_size);
83 template<
typename Scalar>
107 const bool& fad_use_shared_memory);
109 template<
typename Scalar>
116 template<
typename ScalarT,
typename ... TeamPolicyProperties>
117 Kokkos::TeamPolicy<TeamPolicyProperties...>
teamPolicy(
const int& league_size)
119 const int tmp_vector_size = this->
template vectorSize<ScalarT>();
122 return Kokkos::TeamPolicy<TeamPolicyProperties...>(league_size,Kokkos::AUTO(),
125 return Kokkos::TeamPolicy<TeamPolicyProperties...>(league_size,
team_size_,tmp_vector_size);
int fad_vector_size_
Default vector size for non-AD types.
bool use_shared_memory_
FAD vector size.
int vector_size_
User specified team size.
Kokkos::TeamPolicy< TeamPolicyProperties...> teamPolicy(const int &league_size)
Returns a TeamPolicy for hierarchic parallelism.
bool fad_use_shared_memory_
Use shared memory kokkos kernels for non-fad types.
int team_size_
If true, the team size is set with Kokkos::AUTO()
bool useSharedMemory() const
HP()
Use shared memory kokkos kernels for fad types.
int vectorSize() const
Returns the vector size. Specialized for AD scalar types.
Singleton class for accessing kokkos hierarchical parallelism parameters.
static HP & inst()
Private ctor.
void setUseSharedMemory(const bool &use_shared_memory, const bool &fad_use_shared_memory)
Tell kokkos kernels if they should use shared memory. This is very problem dependent.
void overrideSizes(const int &team_size, const int &vector_size, const int &fad_vector_size)
Allows the user to override default sizes.