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 545 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 552 of file KokkosAssembly.h.

552  : _assembly_host(assembly), _assembly_device(assembly)
553  {
554  }
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 558 of file KokkosAssembly.h.

559  : _assembly_host(holder._assembly_host), _assembly_device(holder._assembly_host)
560  {
561  }
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 569 of file KokkosAssembly.h.

Referenced by Moose::Kokkos::System::getVectorQpADGrad(), Moose::Kokkos::System::getVectorQpADGradFace(), Moose::Kokkos::System::getVectorQpADValue(), Moose::Kokkos::System::getVectorQpADValueFace(), Moose::Kokkos::System::getVectorQpGradFace(), Moose::Kokkos::System::getVectorQpValueFace(), Moose::Kokkos::ElementReducer::operator()(), Moose::Kokkos::SideReducer::operator()(), Moose::Kokkos::NodalReducer::operator()(), Moose::Kokkos::NodalUserObject::operator()(), Moose::Kokkos::SideUserObject::operator()(), Moose::Kokkos::ElementUserObject::operator()(), Moose::Kokkos::ADNodalBC::operator()(), Moose::Kokkos::ADKernel::operator()(), Moose::Kokkos::ADIntegratedBC::operator()(), Moose::Kokkos::AuxKernel::operator()(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::NodalBC::operator()(), Moose::Kokkos::NodalKernel::operator()(), Moose::Kokkos::IntegratedBC::operator()(), and Moose::Kokkos::Kernel::operator()().

570  {
571  KOKKOS_IF_ON_HOST(return _assembly_host;)
572 
573  return _assembly_device;
574  }
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 585 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 581 of file KokkosAssembly.h.

Referenced by kokkosAssembly().


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