SpECTRE  2021.08.02
Parallel::charmxx::RegisterChare< Chare, CkIndex > Struct Template Reference

Derived class for registering chares. More...

#include <CharmRegistration.hpp>

Public Member Functions

 RegisterChare (const RegisterChare &)=default
 
RegisterChareoperator= (const RegisterChare &)=default
 
 RegisterChare (RegisterChare &&)=default
 
RegisterChareoperator= (RegisterChare &&)=default
 
void register_with_charm () const noexcept override
 
bool is_registering_chare () const noexcept override
 
std::string name () const noexcept override
 
- Public Member Functions inherited from Parallel::charmxx::RegistrationHelper
 RegistrationHelper (const RegistrationHelper &)=default
 
RegistrationHelperoperator= (const RegistrationHelper &)=default
 
 RegistrationHelper (RegistrationHelper &&)=default
 
RegistrationHelperoperator= (RegistrationHelper &&)=default
 

Static Public Attributes

static bool registrar
 

Detailed Description

template<typename Chare, typename CkIndex>
struct Parallel::charmxx::RegisterChare< Chare, CkIndex >

Derived class for registering chares.

Calls the appropriate Charm++ function to register a chare

The chare that is being registered must have the following in the destructor:

CkIndex_ChareName>::registrar;
Derived class for registering chares.
Definition: CharmRegistration.hpp:194

The main chare must also have a constructor that takes a const Parallel::charmxx::MainChareRegistrationConstructor& as its only argument. This constructor is only used to trigger the RegisterChare::registrar code needed for automatic registration. The main chare is determined by specifying the type alias charmxx_main_component before the Parallel/CharmMain.tpp include.

using charmxx_main_component = Parallel::Main<TestMetavariables>;
The main function of a Charm++ executable. See the Parallelization documentation for an overview of M...
Definition: Main.hpp:54

Member Function Documentation

◆ is_registering_chare()

template<typename Chare , typename CkIndex >
bool Parallel::charmxx::RegisterChare< Chare, CkIndex >::is_registering_chare ( ) const
inlineoverridevirtualnoexcept

◆ name()

template<typename Chare , typename CkIndex >
std::string Parallel::charmxx::RegisterChare< Chare, CkIndex >::name ( ) const
inlineoverridevirtualnoexcept

◆ register_with_charm()

template<typename Chare , typename CkIndex >
void Parallel::charmxx::RegisterChare< Chare, CkIndex >::register_with_charm ( ) const
inlineoverridevirtualnoexcept

Member Data Documentation

◆ registrar

template<typename Chare , typename CkIndex >
bool Parallel::charmxx::RegisterChare< Chare, CkIndex >::registrar
static
Initial value:
=
RegisterChare<Chare, CkIndex>>()
bool register_func_with_charm() noexcept
Function that adds a pointer to a specific derived class to the charm_register_list
Definition: CharmRegistration.hpp:641