AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Define runtime policies symbols for selecting. More...
#include "axom/config.hpp"
#include "axom/fmt/format.h"
#include <map>
Namespaces | |
axom | |
axom::runtime_policy | |
Enumerations | |
enum class | axom::runtime_policy::Policy { axom::runtime_policy::seq = 0 , axom::runtime_policy::omp = 1 , axom::runtime_policy::cuda = 2 , axom::runtime_policy::hip = 3 } |
Execution policies. The supported set depends on Axom's configuration. More... | |
Functions | |
static auto | axom::runtime_policy::format_as (Policy pol) |
Utility function to allow formating a Policy. More... | |
Variables | |
static const std::map< std::string, Policy > | axom::runtime_policy::s_nameToPolicy |
Mapping from policy name to policy enum. More... | |
static const std::map< Policy, std::string > | axom::runtime_policy::s_policyToName |
Mapping from policy enum to policy name. More... | |
Define runtime policies symbols for selecting.
The policies are enums corresponding to axom::execution_space template parameters. The difference is that runtime policies are selected at run time while axom::execution_space is specialized at build time.
The possible runtime parameters are
seq:
sequential execution on the hostomp:
OpenMP executioncuda:
GPU execution via CUDAhip:
GPU execution via HIPThe available policies depend on how Axom is configured. RAJA is required for using OpenMP, CUDA and HIP. UMPIRE is required for using CUDA and HIP. Sequential execution on host is always available.
These macros are defined to indicate available non-sequential policies.
AXOM_RUNTIME_POLICY_USE_OPENMP
AXOM_RUNTIME_POLICY_USE_CUDA
AXOM_RUNTIME_POLICY_USE_HIP