Classes | Typedefs | Functions
Charm++ Extensions

Classes and functions used to make Charm++ easier and safer to use. More...

Classes

struct  Parallel::charmxx::MainChareRegistrationConstructor
 Class to mark a constructor as a constructor for the main chare. More...
 
struct  Parallel::charmxx::RegistrationHelper
 The base class used for automatic registration of entry methods. More...
 
struct  Parallel::charmxx::RegisterParallelComponent< ParallelComponent >
 Derived class for registering parallel components. More...
 
struct  Parallel::charmxx::RegisterChare< Chare, CkIndex >
 Derived class for registering chares. More...
 
struct  Parallel::charmxx::RegisterSimpleAction< ParallelComponent, Action, Args >
 Derived class for registering simple actions. More...
 
struct  Parallel::charmxx::RegisterThreadedAction< ParallelComponent, Action, Args >
 Derived class for registering threaded actions. More...
 
struct  Parallel::charmxx::RegisterReceiveData< ParallelComponent, ReceiveTag >
 Derived class for registering receive_data functions. More...
 
struct  Parallel::charmxx::RegisterReductionAction< ParallelComponent, Action, ReductionType >
 Derived class for registering reduction actions. More...
 
struct  Parallel::charmxx::RegisterReducerFunction< ReducerFunctions >
 Class used for registering custom reduction function. More...
 

Typedefs

using Parallel::charmxx::ReducerFunctions = CkReductionMsg *(*)(int, CkReductionMsg **)
 The type of a function pointer to a Charm++ custom reduction function.
 

Functions

template<class... Args>
std::string Parallel::charmxx::get_template_parameters_as_string ()
 Returns the template parameter as a std::string More...
 
template<typename Derived >
bool Parallel::charmxx::register_func_with_charm () noexcept
 Function that adds a pointer to a specific derived class to the charm_register_list More...
 
template<ReducerFunctions F>
bool Parallel::charmxx::register_reducer_function () noexcept
 Function that stores a function pointer to the custom reduction function to be registered later. More...
 

Detailed Description

Classes and functions used to make Charm++ easier and safer to use.

Function Documentation

◆ get_template_parameters_as_string()

template<class... Args>
std::string Parallel::charmxx::get_template_parameters_as_string ( )

Returns the template parameter as a std::string

Uses the PRETTY_FUNCTION compiler intrinsic to extract the template parameter names in the same form that Charm++ uses to register entry methods. This is used by the generated Singleton, Array, Group and Nodegroup headers, as well as in CharmMain.tpp.

◆ register_func_with_charm()

template<typename Derived >
bool Parallel::charmxx::register_func_with_charm ( )
noexcept

Function that adds a pointer to a specific derived class to the charm_register_list

Used to initialize the registrar bool of derived classes of RegistrationHelper. When the function is invoked it appends the derived class to the charm_register_list.

Note
The reason for not using a std::vector is that this did not behave correctly when calling push_back. Specifically, the final vector was always size 1, even though multiple elements were pushed back. The reason for that behavior was never tracked down and so in the future it could be possible to use a std::vector.

◆ register_reducer_function()

template<ReducerFunctions F>
bool Parallel::charmxx::register_reducer_function ( )
noexcept

Function that stores a function pointer to the custom reduction function to be registered later.

Used to initialize the registrar bool of RegisterReducerFunction. When invoked it adds the function F of type ReducerFunctions to the list charm_reducer_functions_list.

Note
The reason for not using a std::vector<ReducerFunctions> is that this did not behave correctly when calling push_back. Specifically, the final vector was always size 1, even though multiple elements were pushed back. The reason for that behavior was never tracked down and so in the future it could be possible to use a std::vector.