MFEM  v4.6.0
Finite element discretization library
Public Types | Public Member Functions | List of all members
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 (Device &mfem_device)
 
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 454 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 458 of file ginkgo.hpp.

Constructor & Destructor Documentation

◆ GinkgoExecutor() [1/2]

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

Constructor. Takes an GinkgoExecType argument and creates an Executor.

Definition at line 31 of file ginkgo.cpp.

◆ GinkgoExecutor() [2/2]

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 OmpExecutor; if MFEM is using CUDA, Ginkgo will choose the CudaExecutor).

Definition at line 82 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 489 of file ginkgo.hpp.


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