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

The Kokkos interface that holds the host reference of the Kokkos assembly and copies it to device during parallel dispatch. More...

#include <KokkosAssembly.h>

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

Public Member Functions

 AssemblyHolder (const Assembly &assembly)
 Constructor. More...
 
 AssemblyHolder (const AssemblyHolder &holder)
 Copy constructor. More...
 
KOKKOS_FUNCTION const AssemblykokkosAssembly () const
 Get the const reference of the Kokkos assembly. More...
 

Private Attributes

const Assembly_assembly_host
 Host reference of the Kokkos assembly. More...
 
const Assembly _assembly_device
 Device copy of the Kokkos assembly. More...
 

Detailed Description

The Kokkos interface that holds the host reference of the Kokkos assembly and copies it to device during parallel dispatch.

Maintains synchronization between host and device Kokkos assemblies and provides access to the appropriate Kokkos assembly depending on the architecture.

Definition at line 475 of file KokkosAssembly.h.

Constructor & Destructor Documentation

◆ AssemblyHolder() [1/2]

Moose::Kokkos::AssemblyHolder::AssemblyHolder ( const Assembly assembly)
inline

Constructor.

Parameters
assemblyThe Kokkos assembly

Definition at line 482 of file KokkosAssembly.h.

482  : _assembly_host(assembly), _assembly_device(assembly)
483  {
484  }
const Assembly _assembly_device
Device copy of the Kokkos assembly.
const Assembly & _assembly_host
Host reference of the Kokkos assembly.

◆ AssemblyHolder() [2/2]

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

Copy constructor.

Definition at line 488 of file KokkosAssembly.h.

489  : _assembly_host(holder._assembly_host), _assembly_device(holder._assembly_host)
490  {
491  }
const Assembly _assembly_device
Device copy of the Kokkos assembly.
const Assembly & _assembly_host
Host reference of the Kokkos assembly.

Member Function Documentation

◆ kokkosAssembly()

KOKKOS_FUNCTION const Assembly& Moose::Kokkos::AssemblyHolder::kokkosAssembly ( ) const
inline

Get the const reference of the Kokkos assembly.

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

Definition at line 499 of file KokkosAssembly.h.

Referenced by Moose::Kokkos::System::getVectorQpGradFace(), and Moose::Kokkos::System::getVectorQpValueFace().

500  {
501  KOKKOS_IF_ON_HOST(return _assembly_host;)
502 
503  return _assembly_device;
504  }
const Assembly _assembly_device
Device copy of the Kokkos assembly.
const Assembly & _assembly_host
Host reference of the Kokkos assembly.

Member Data Documentation

◆ _assembly_device

const Assembly Moose::Kokkos::AssemblyHolder::_assembly_device
private

Device copy of the Kokkos assembly.

Definition at line 515 of file KokkosAssembly.h.

Referenced by kokkosAssembly().

◆ _assembly_host

const Assembly& Moose::Kokkos::AssemblyHolder::_assembly_host
private

Host reference of the Kokkos assembly.

Definition at line 511 of file KokkosAssembly.h.

Referenced by kokkosAssembly().


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