https://mooseframework.inl.gov
Public Member Functions | 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. More...
 
void hasUserMethod (bool flag)
 Set whether the user has overriden the hook method associated with this operation. More...
 
bool hasUserMethod () const
 Get whether the user has overriden the hook method associated with this operation. More...
 

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 136 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 139 of file KokkosDispatcher.h.

140  {
141  return std::make_unique<Dispatcher<Operation, Object>>(object);
142  }

◆ hasUserMethod() [1/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 112 of file KokkosDispatcher.h.

112 { _has_user_method = flag; }
bool _has_user_method
Flag whether the user has overriden the hook method associated with this operation.

◆ hasUserMethod() [2/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 117 of file KokkosDispatcher.h.

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

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