MFEM  v4.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | List of all members
mfem::Backend Struct Reference

MFEM backends. More...

#include <device.hpp>

Public Types

enum  Id {
  CPU = 1 << 0, OMP = 1 << 1, CUDA = 1 << 2, RAJA_CPU = 1 << 3,
  RAJA_OMP = 1 << 4, RAJA_CUDA = 1 << 5, OCCA_CPU = 1 << 6, OCCA_OMP = 1 << 7,
  OCCA_CUDA = 1 << 8
}
 In the documentation below, we use square brackets to indicate the type of the backend: host or device. More...
 
enum  {
  NUM_BACKENDS = 9, CPU_MASK = CPU | RAJA_CPU | OCCA_CPU, CUDA_MASK = CUDA | RAJA_CUDA | OCCA_CUDA, OMP_MASK = OMP | RAJA_OMP | OCCA_OMP,
  DEVICE_MASK = CUDA_MASK, RAJA_MASK = RAJA_CPU | RAJA_OMP | RAJA_CUDA, OCCA_MASK = OCCA_CPU | OCCA_OMP | OCCA_CUDA
}
 Additional useful constants. For example, the *_MASK constants can be used with Device::Allows(). More...
 

Detailed Description

MFEM backends.

Individual backends will generally implement only a subset of the kernels implemented by the default CPU backend. The goal of the backends is to accelerate data-parallel portions of the code and they can use a device memory space (e.g. GPUs) or share the memory space of the host (OpenMP).

Definition at line 26 of file device.hpp.

Member Enumeration Documentation

anonymous enum

Additional useful constants. For example, the *_MASK constants can be used with Device::Allows().

Enumerator
NUM_BACKENDS 

Number of backends: from (1 << 0) to (1 << (NUM_BACKENDS-1)).

CPU_MASK 

Biwise-OR of all CPU backends.

CUDA_MASK 

Biwise-OR of all CUDA backends.

OMP_MASK 

Biwise-OR of all OpenMP backends.

DEVICE_MASK 

Biwise-OR of all device backends.

RAJA_MASK 

Biwise-OR of all RAJA backends.

OCCA_MASK 

Biwise-OR of all OCCA backends.

Definition at line 59 of file device.hpp.

In the documentation below, we use square brackets to indicate the type of the backend: host or device.

Enumerator
CPU 

[host] Default CPU backend: sequential execution on each MPI rank.

OMP 

[host] OpenMP backend. Enabled when MFEM_USE_OPENMP = YES.

CUDA 

[device] CUDA backend. Enabled when MFEM_USE_CUDA = YES.

RAJA_CPU 

[host] RAJA CPU backend: sequential execution on each MPI rank. Enabled when MFEM_USE_RAJA = YES.

RAJA_OMP 

[host] RAJA OpenMP backend. Enabled when MFEM_USE_RAJA = YES and MFEM_USE_OPENMP = YES.

RAJA_CUDA 

[device] RAJA CUDA backend. Enabled when MFEM_USE_RAJA = YES and MFEM_USE_CUDA = YES.

OCCA_CPU 

[host] OCCA CPU backend: sequential execution on each MPI rank. Enabled when MFEM_USE_OCCA = YES.

OCCA_OMP 

[host] OCCA OpenMP backend. Enabled when MFEM_USE_OCCA = YES.

OCCA_CUDA 

[device] OCCA CUDA backend. Enabled when MFEM_USE_OCCA = YES and MFEM_USE_CUDA = YES.

Definition at line 30 of file device.hpp.


The documentation for this struct was generated from the following file: