AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
execution_space.hpp File Reference

Defines the list of available execution spaces for axom. More...

#include "axom/config.hpp"
#include "axom/core/memory_management.hpp"
#include "axom/core/execution/internal/seq_exec.hpp"

Classes

struct  axom::execution_space< ExecSpace >
 The execution_space is a traits class that binds the execution space to a corresponding RAJA execution policies and default memory allocator. More...
 

Namespaces

 axom
 

Detailed Description

Defines the list of available execution spaces for axom.

The list of defined execution spaces are the following:

  • SEQ_EXEC

    Indicates sequential execution on the CPU. Always defined.

    When using this execution space, the data must reside on CPU/host memory.

  • OMP_EXEC

    Indicates parallel execution with OpenMP on the CPU.

    Defined when AXOM_USE_OPENMP and AXOM_USE_RAJA are defined. In addition, using this execution space requires linking to a RAJA that is configured with OpenMp, i.e., RAJA_ENABLE_OPENMP must be defined in the generated RAJA/config.hpp.

    The default memory allocator when using this execution space is HOST.

    When using this execution space, the data must reside on CPU/host memory.

  • CUDA_EXEC<BLOCKSIZE>

    Indicates parallel execution with CUDA on the GPU.

    Defined when AXOM_USE_CUDA and AXOM_USE_RAJA are defined. In addition, using this execution space requires linking to a RAJA that is configured with CUDA, i.e., RAJA_ENABLE_CUDA must be defined in the generated RAJA/config.hpp.

    The CUDA_EXEC execution space strictly requires Umpire for memory management. The data must reside either on device memory which, is only accessible on the GPU, or in Unified memory which, is accessible on both the CPU or GPU. Note, when using Unified memory, the hardware transfers the data accordingly as needed. Consequently, using unified memory must be handled with extreme care, in order to avoid the latencies associated with data transfers between the CPU and GPU.

    The default memory allocator when using this execution space is UNIFIED.

The execution spaces bind the corresponding RAJA execution policies and default memory space.

See also
runtime_policy.hpp