https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Moose::Kokkos::DispatcherRegistryEntry< Operation, Object > Class Template Reference

Class that stores the information of a dispatcher and builds it. More...

#include <KokkosDispatcher.h>

Inheritance diagram for Moose::Kokkos::DispatcherRegistryEntry< Operation, Object >:
[legend]

Public Member Functions

std::unique_ptr< DispatcherBasebuild (const void *object) const override final
 Build a dispatcher for this operation and functor.
 
void hasUserMethod (bool flag)
 Set whether the user has overriden the hook method associated with this operation.
 
bool hasUserMethod () const
 Get whether the user has overriden the hook method associated with this operation.
 

Private Attributes

bool _has_user_method = false
 Flag whether the user has overriden the hook method associated with this operation.
 

Detailed Description

template<typename Operation, typename Object>
class Moose::Kokkos::DispatcherRegistryEntry< Operation, Object >

Class that stores the information of a dispatcher and builds it.

This shell class is the entry of the dispatcher registry instead of the dispatcher itself. The reason this class does not dispatch the functor directly is to let the dispatcher hold the reference of the functor so that the functor does not need to be copied twice at each dispatch. Namely, dispatchers are to be built and held by the functors, not the registry.

Template Parameters
OperationThe function tag of operator() to be dispatched
ObjectThe functor class type

Definition at line 228 of file KokkosDispatcher.h.

Member Function Documentation

◆ build()

template<typename Operation , typename Object >
std::unique_ptr< DispatcherBase > Moose::Kokkos::DispatcherRegistryEntry< Operation, Object >::build ( const void *  object) const
inlinefinaloverridevirtual

Build a dispatcher for this operation and functor.

Parameters
objectThe pointer to the functor

Implements Moose::Kokkos::DispatcherRegistryEntryBase.

Definition at line 231 of file KokkosDispatcher.h.

232 {
233 return std::make_unique<Dispatcher<Operation, Object>>(object);
234 }

◆ hasUserMethod() [1/2]

bool Moose::Kokkos::DispatcherRegistryEntryBase::hasUserMethod ( ) const
inlineinherited

Get whether the user has overriden the hook method associated with this operation.

Returns
Whether the user has overriden the hook method

Definition at line 208 of file KokkosDispatcher.h.

208{ return _has_user_method; }
bool _has_user_method
Flag whether the user has overriden the hook method associated with this operation.

◆ hasUserMethod() [2/2]

void Moose::Kokkos::DispatcherRegistryEntryBase::hasUserMethod ( bool  flag)
inlineinherited

Set whether the user has overriden the hook method associated with this operation.

Parameters
flagWhether the user has overriden the hook method

Definition at line 203 of file KokkosDispatcher.h.

203{ _has_user_method = flag; }

Member Data Documentation

◆ _has_user_method

bool Moose::Kokkos::DispatcherRegistryEntryBase::_has_user_method = false
privateinherited

Flag whether the user has overriden the hook method associated with this operation.

Definition at line 214 of file KokkosDispatcher.h.

Referenced by Moose::Kokkos::DispatcherRegistryEntryBase::hasUserMethod(), and Moose::Kokkos::DispatcherRegistryEntryBase::hasUserMethod().


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