#include <context.hh>
Classes | |
struct | index_subspace_info_t |
Public Types | |
using | field_info_store_t = data::fields |
Public Member Functions | |
context (const context &)=delete | |
context & | operator= (const context &)=delete |
context (context &&)=delete | |
context & | operator= (context &&)=delete |
bool | initialized () |
boost::program_options::positional_options_description & | positional_description () |
std::map< std::string, std::string > & | positional_help () |
boost::program_options::options_description & | hidden_options () |
std::map< std::string, std::pair< bool, std::function< bool(boost::any const &)> > > & | option_checks () |
std::vector< char * > & | argv () |
std::string const & | program () |
auto & | descriptions_map () |
std::vector< std::string > const & | unrecognized_options () |
int | initialize_generic (int argc, char **argv, bool dependent) |
void | finalize_generic () |
int | initialize (int argc, char **argv, bool dependent) |
void | finalize () |
int | start (const std::function< int(int, char **)> action &) |
std::size_t | process () const |
std::size_t | processes () const |
std::size_t | threads_per_process () const |
std::size_t | threads () const |
std::size_t | color () const |
std::size_t | colors () const |
int & | exit_status () |
void | register_init (void callback()) |
bool | topology_fields_registered (size_t type_key, size_t instance_key) |
template<class Topo , std::size_t Index> | |
void | add_field_info (const data::field_info_t &field_info) |
template<class Topo , std::size_t Index = topo::default_space<Topo>> | |
field_info_store_t const & | get_field_info_store () const |
void | add_index_subspace (size_t index_subspace, size_t capacity) |
void | add_index_subspace (const index_subspace_info_t &info) |
std::map< size_t, index_subspace_info_t > & | index_subspace_info () |
size_t const & | tasks_executed () const |
size_t & | tasks_executed () |
Static Public Member Functions | |
static context_t & | instance () |
static std::size_t | task_depth () |
Protected Member Functions | |
void | start () |
void | clear () |
Protected Attributes | |
std::string | program_ |
std::vector< char * > | argv_ |
std::string | backend_ |
std::string | flog_tags_ |
int | flog_verbose_ |
int64_t | flog_output_process_ |
bool | initialize_dependent_ = true |
std::map< std::string, boost::program_options::options_description > | descriptions_map_ |
boost::program_options::positional_options_description | positional_desc_ |
boost::program_options::options_description | hidden_options_ |
std::map< std::string, std::string > | positional_help_ |
std::map< std::string, std::pair< bool, std::function< bool(boost::any const &)> > > | option_checks_ |
std::vector< std::string > | unrecognized_options_ |
bool | initialized_ = false |
size_t | process_ = std::numeric_limits<size_t>::max() |
size_t | processes_ = std::numeric_limits<size_t>::max() |
size_t | threads_per_process_ = std::numeric_limits<size_t>::max() |
size_t | threads_ = std::numeric_limits<size_t>::max() |
int | exit_status_ = 0 |
std::unordered_map< size_t, void * > | function_registry_ |
std::set< std::pair< size_t, size_t > > | registered_topology_fields_ |
std::unordered_map< size_t, std::vector< field_info_store_t > > | topology_field_info_map_ |
std::map< size_t, index_subspace_info_t > | index_subspace_map_ |
size_t | tasks_executed_ = 0 |
The context type provides a high-level execution context interface that is implemented by a specific backend.
|
inline |
Register field information.
Topo | topology type |
Index | topology-relative index space |
field_info | Field information. |
|
inline |
FIXME: Do we need to make this general for other topology types? This is currently only for unstructured mesh topologies.
Add an index subspace to the specified index space with the specified capcity. @param index_space The parent index space. @param capacity The maximum size of the subspace in indices.
|
inline |
FIXME: Do we need to make this general for other topology types? This is currently only for unstructured mesh topologies.
Add an index subspace struct instance. @param info An initialized instance of index_subspace_info_t.
std::size_t flecsi::run::context::color | ( | ) | const |
Get the color of this process.
std::size_t flecsi::run::context::colors | ( | ) | const |
Get the number of colors.
|
inline |
Return the exit status of the FleCSI runtime.
void flecsi::run::context::finalize | ( | ) |
Perform FleCSI runtime finalization. If FleCSI was initialized with the dependent flag set to true, FleCSI will also finalize any runtimes on which it depends.
|
inline |
Return the stored field info for the given topology type and layout. Const version.
Topo | topology type |
Index | topology-relative index space |
|
inline |
FIXME: Do we need to make this general for other topology types? This is currently only for unstructured mesh topologies.
Return the map of index subspaces.
std::size_t flecsi::run::context::process | ( | ) | const |
Return the current process id.
std::size_t flecsi::run::context::processes | ( | ) | const |
Return the number of processes.
int flecsi::run::context::start | ( | const std::function< int(int, char **)> action & | ) |
Start the FleCSI runtime.
action | The top-level action FleCSI should execute. |
|
static |
Return the current task depth within the execution hierarchy. The top-level task has depth 0. This interface is primarily intended for FleCSI developers to use in enforcing runtime constraints.
|
inline |
Return the count of executed tasks. Const version.
|
inline |
Return the count of executed tasks.
std::size_t flecsi::run::context::threads | ( | ) | const |
Return the number of execution instances with which the runtime was invoked. In this context a thread is defined as an instance of execution, and does not imply any other properties. This interface can be used to determine the full subscription of the execution instances of the running process that invokded the FleCSI runtime.
std::size_t flecsi::run::context::threads_per_process | ( | ) | const |
Return the number of threads per process.
|
inline |
Return a boolean indicating whether or not the given instance of a data topology has had its internal fields registered with the data model.
topology_type_identifier | Topology type identifier. |
instance_identifier | Instance identifier. |