Public Types | Public Member Functions | Friends | List of all members
Parallel::GlobalCache< Metavariables > Class Template Reference

#include <GlobalCache.hpp>

Public Types

using metavariables = Metavariables
 Access to the Metavariables template parameter.
 
using component_list = typename Metavariables::component_list
 Typelist of the ParallelComponents stored in the GlobalCache.
 

Public Member Functions

 GlobalCache (tuples::tagged_tuple_from_typelist< get_const_global_cache_tags< Metavariables >> global_cache) noexcept
 
 GlobalCache (CkMigrateMessage *)
 
void set_parallel_components (tuples::tagged_tuple_from_typelist< parallel_component_tag_list > &&parallel_components, const CkCallback &callback) noexcept
 Entry method to set the ParallelComponents (should only be called once)
 

Friends

template<typename GlobalCacheTag , typename MV >
auto get (const GlobalCache< MV > &cache) noexcept -> const GlobalCache_detail::type_for_get< GlobalCacheTag, MV > &
 
template<typename ParallelComponentTag , typename MV >
auto get_parallel_component (GlobalCache< MV > &cache) noexcept -> Parallel::proxy_from_parallel_component< GlobalCache_detail::get_component_if_mocked< typename MV::component_list, ParallelComponentTag >> &
 
template<typename ParallelComponentTag , typename MV >
auto get_parallel_component (const GlobalCache< MV > &cache) noexcept -> const Parallel::proxy_from_parallel_component< GlobalCache_detail::get_component_if_mocked< typename MV::component_list, ParallelComponentTag >> &
 

Detailed Description

template<typename Metavariables>
class Parallel::GlobalCache< Metavariables >

A Charm++ chare that caches constant data once per Charm++ node.

Metavariables must define the following metavariables:

The tag list for the items added to the GlobalCache is created by combining the following tag lists:

The tags in the const_global_cache_tags type lists are db::SimpleTags that have a using option_tags type alias and a static function create_from_options that are used to create the constant data from input file options.

References to items in the GlobalCache are also added to the db::DataBox of each Component in the Metavariables::component_list with the same tag with which they were inserted into the GlobalCache.


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