https://mooseframework.inl.gov
Public Member Functions | Private Attributes | List of all members
Moose::Kokkos::MeshHolder Class Reference

The Kokkos interface that holds the host reference of the Kokkos mesh and copies it to device during parallel dispatch Maintains synchronization between host and device Kokkos mesh and provides access to the appropriate Kokkos mesh depending on the architecture. More...

#include <KokkosMesh.h>

Inheritance diagram for Moose::Kokkos::MeshHolder:
[legend]

Public Member Functions

 MeshHolder (const Mesh &mesh)
 Constructor. More...
 
 MeshHolder (const MeshHolder &holder)
 Copy constructor. More...
 
KOKKOS_FUNCTION const MeshkokkosMesh () const
 Get the const reference of the Kokkos mesh. More...
 

Private Attributes

const Mesh_mesh_host
 Host reference of the Kokkos mesh. More...
 
const Mesh _mesh_device
 Device copy of the Kokkos mesh. More...
 

Detailed Description

The Kokkos interface that holds the host reference of the Kokkos mesh and copies it to device during parallel dispatch Maintains synchronization between host and device Kokkos mesh and provides access to the appropriate Kokkos mesh depending on the architecture.

Definition at line 338 of file KokkosMesh.h.

Constructor & Destructor Documentation

◆ MeshHolder() [1/2]

Moose::Kokkos::MeshHolder::MeshHolder ( const Mesh mesh)
inline

Constructor.

Parameters
assemblyThe Kokkos mesh

Definition at line 345 of file KokkosMesh.h.

345 : _mesh_host(mesh), _mesh_device(mesh) {}
const Mesh _mesh_device
Device copy of the Kokkos mesh.
Definition: KokkosMesh.h:376
const Mesh & _mesh_host
Host reference of the Kokkos mesh.
Definition: KokkosMesh.h:372

◆ MeshHolder() [2/2]

Moose::Kokkos::MeshHolder::MeshHolder ( const MeshHolder holder)
inline

Copy constructor.

Definition at line 349 of file KokkosMesh.h.

350  : _mesh_host(holder._mesh_host), _mesh_device(holder._mesh_host)
351  {
352  }
const Mesh _mesh_device
Device copy of the Kokkos mesh.
Definition: KokkosMesh.h:376
const Mesh & _mesh_host
Host reference of the Kokkos mesh.
Definition: KokkosMesh.h:372

Member Function Documentation

◆ kokkosMesh()

KOKKOS_FUNCTION const Mesh& Moose::Kokkos::MeshHolder::kokkosMesh ( ) const
inline

Get the const reference of the Kokkos mesh.

Returns
The const reference of the Kokkos mesh depending on the architecture this function is being called on

Definition at line 360 of file KokkosMesh.h.

Referenced by Moose::Kokkos::Assembly::computePhysicalMap().

361  {
362  KOKKOS_IF_ON_HOST(return _mesh_host;)
363 
364  return _mesh_device;
365  }
const Mesh _mesh_device
Device copy of the Kokkos mesh.
Definition: KokkosMesh.h:376
const Mesh & _mesh_host
Host reference of the Kokkos mesh.
Definition: KokkosMesh.h:372

Member Data Documentation

◆ _mesh_device

const Mesh Moose::Kokkos::MeshHolder::_mesh_device
private

Device copy of the Kokkos mesh.

Definition at line 376 of file KokkosMesh.h.

Referenced by kokkosMesh().

◆ _mesh_host

const Mesh& Moose::Kokkos::MeshHolder::_mesh_host
private

Host reference of the Kokkos mesh.

Definition at line 372 of file KokkosMesh.h.

Referenced by kokkosMesh().


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