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

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

#include <KokkosSystem.h>

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

Public Member Functions

 SystemHolder (Array< System > &systems)
 Constructor. More...
 
 SystemHolder (const SystemHolder &holder)
 Copy constructor. More...
 
KOKKOS_FUNCTION const Array< System > & kokkosSystems () const
 Get the const reference of the Kokkos systems. More...
 
Array< System > & kokkosSystems ()
 Get the writeable host reference of the Kokkos systems. More...
 
KOKKOS_FUNCTION const SystemkokkosSystem (unsigned int sys) const
 Get the const reference of a Kokkos system. More...
 
SystemkokkosSystem (unsigned int sys)
 Get the writeable reference of a Kokkos system. More...
 

Private Attributes

Array< System > & _systems_host
 Host reference of the Kokkos systems. More...
 
const Array< System_systems_device
 Device copy of the Kokkos systems. More...
 

Detailed Description

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

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

Definition at line 753 of file KokkosSystem.h.

Constructor & Destructor Documentation

◆ SystemHolder() [1/2]

Moose::Kokkos::SystemHolder::SystemHolder ( Array< System > &  systems)
inline

Constructor.

Parameters
systemsThe Kokkos systems

Definition at line 760 of file KokkosSystem.h.

760 : _systems_host(systems), _systems_device(systems) {}
const Array< System > _systems_device
Device copy of the Kokkos systems.
Definition: KokkosSystem.h:814
Array< System > & _systems_host
Host reference of the Kokkos systems.
Definition: KokkosSystem.h:810

◆ SystemHolder() [2/2]

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

Copy constructor.

Definition at line 764 of file KokkosSystem.h.

765  : _systems_host(holder._systems_host), _systems_device(holder._systems_host)
766  {
767  }
const Array< System > _systems_device
Device copy of the Kokkos systems.
Definition: KokkosSystem.h:814
Array< System > & _systems_host
Host reference of the Kokkos systems.
Definition: KokkosSystem.h:810

Member Function Documentation

◆ kokkosSystem() [1/2]

KOKKOS_FUNCTION const System& Moose::Kokkos::SystemHolder::kokkosSystem ( unsigned int  sys) const
inline

◆ kokkosSystem() [2/2]

System& Moose::Kokkos::SystemHolder::kokkosSystem ( unsigned int  sys)
inline

Get the writeable reference of a Kokkos system.

Parameters
sysThe system number
Returns
The writeable host reference of the Kokkos system

Definition at line 803 of file KokkosSystem.h.

803 { return _systems_host[sys]; }
Array< System > & _systems_host
Host reference of the Kokkos systems.
Definition: KokkosSystem.h:810

◆ kokkosSystems() [1/2]

KOKKOS_FUNCTION const Array<System>& Moose::Kokkos::SystemHolder::kokkosSystems ( ) const
inline

◆ kokkosSystems() [2/2]

Array<System>& Moose::Kokkos::SystemHolder::kokkosSystems ( )
inline

Get the writeable host reference of the Kokkos systems.

Returns
The writeable host reference of the Kokkos systems

Definition at line 785 of file KokkosSystem.h.

785 { return _systems_host; }
Array< System > & _systems_host
Host reference of the Kokkos systems.
Definition: KokkosSystem.h:810

Member Data Documentation

◆ _systems_device

const Array<System> Moose::Kokkos::SystemHolder::_systems_device
private

Device copy of the Kokkos systems.

Definition at line 814 of file KokkosSystem.h.

Referenced by kokkosSystem(), and kokkosSystems().

◆ _systems_host

Array<System>& Moose::Kokkos::SystemHolder::_systems_host
private

Host reference of the Kokkos systems.

Definition at line 810 of file KokkosSystem.h.

Referenced by kokkosSystem(), and kokkosSystems().


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