MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::Ginkgo::GinkgoExecutor Class Reference

#include <ginkgo.hpp>

Public Types

enum  ExecType { REFERENCE = 0 , OMP = 1 , CUDA = 2 , HIP = 3 }
 

Public Member Functions

 GinkgoExecutor (ExecType exec_type)
 
 GinkgoExecutor (ExecType exec_type, ExecType host_exec_type)
 
 GinkgoExecutor (Device &mfem_device)
 
 GinkgoExecutor (Device &mfem_device, ExecType host_exec_type)
 
virtual ~GinkgoExecutor ()=default
 
std::shared_ptr< gko::Executor > GetExecutor () const
 

Detailed Description

This class wraps a Ginkgo Executor for use in MFEM. Note that objects in the Ginkgo namespace intended to work together, e.g. a Ginkgo solver and preconditioner, should use the same GinkgoExecutor object. In general, most users will want to create one GinkgoExecutor object for use with all Ginkgo-related objects. The wrapper can be created to match MFEM's device configuration.

Definition at line 500 of file ginkgo.hpp.

Member Enumeration Documentation

◆ ExecType

Enumerator
REFERENCE 

Reference CPU Executor.

OMP 

OpenMP CPU Executor.

CUDA 

CUDA GPU Executor.

HIP 

HIP GPU Executor.

Definition at line 504 of file ginkgo.hpp.

Constructor & Destructor Documentation

◆ GinkgoExecutor() [1/4]

mfem::Ginkgo::GinkgoExecutor::GinkgoExecutor ( ExecType exec_type)

Constructor. Takes an GinkgoExecType argument and creates an Executor. In Ginkgo, GPU Executors must have an associated host Executor. This routine will select a CPU Executor based on the OpenMP support for Ginkgo.

Definition at line 33 of file ginkgo.cpp.

◆ GinkgoExecutor() [2/4]

mfem::Ginkgo::GinkgoExecutor::GinkgoExecutor ( ExecType exec_type,
ExecType host_exec_type )

Constructor. Takes an GinkgoExecType argument and creates an Executor. In Ginkgo, GPU Executors must have an associated host Executor. This routine allows for explicite setting of the CPU Executor for GPU backends.

Definition at line 111 of file ginkgo.cpp.

◆ GinkgoExecutor() [3/4]

mfem::Ginkgo::GinkgoExecutor::GinkgoExecutor ( Device & mfem_device)

Constructor. Takes an MFEM Device object and creates an Executor that "matches" (e.g., if MFEM is using the CPU, Ginkgo will choose the Reference or OmpExecutor based on MFEM's configuration and Ginkgo's capabilities; if MFEM is using CUDA, Ginkgo will choose the CudaExecutor with a default CPU Executor based on Ginkgo's OpenMP support).

Definition at line 185 of file ginkgo.cpp.

◆ GinkgoExecutor() [4/4]

mfem::Ginkgo::GinkgoExecutor::GinkgoExecutor ( Device & mfem_device,
ExecType host_exec_type )

Constructor. Takes an MFEM Device object and creates an Executor that "matches", but allows the user to specify the host Executor for GPU backends.

Definition at line 264 of file ginkgo.cpp.

◆ ~GinkgoExecutor()

virtual mfem::Ginkgo::GinkgoExecutor::~GinkgoExecutor ( )
virtualdefault

Destructor.

Member Function Documentation

◆ GetExecutor()

std::shared_ptr< gko::Executor > mfem::Ginkgo::GinkgoExecutor::GetExecutor ( ) const
inline

Definition at line 557 of file ginkgo.hpp.


The documentation for this class was generated from the following files: