20#ifndef REALM_RUNTIME_H
21#define REALM_RUNTIME_H
97 bool (*
put)(
const void *key,
size_t key_size,
const void *value,
size_t value_sizem,
118 bool (*
get)(
const void *key,
size_t key_size,
void *value,
size_t *value_size,
160 inline static constexpr std::string_view
group_key =
"realm_group";
161 inline static constexpr std::string_view
rank_key =
"realm_rank";
162 inline static constexpr std::string_view
ranks_key =
"realm_ranks";
182 bool (*
cas)(
const void *key,
size_t key_size,
void *expected,
size_t *expected_size,
183 const void *desired,
size_t desired_size,
const void *
vtable_data,
190 bool remove_realm_args =
false);
200 bool remove_realm_args =
false);
206 bool init(
int *argc,
char ***argv);
223 template <
typename REDOP>
229 template <
typename REDOP>
238 template <
typename SERDEZ>
246 const void *args,
size_t arglen,
251 size_t arglen,
bool one_per_node =
false,
266 size_t arglen = 0,
bool background =
false));
284 template <
typename T>
289 return dynamic_cast<T *
>(mod);
Definition custom_serdez.h:150
Definition custom_serdez.h:192
static const Event NO_EVENT
The value should be usued to initialize an event handle. NO_EVENT is always in has triggered state .
Definition event.h:71
Definition module_config.h:32
Definition processor.h:37
Kind
Definition processor.h:65
::realm_task_func_id_t TaskFuncID
Definition processor.h:58
void(* TaskFuncPtr)(const void *args, size_t arglen, const void *user_data, size_t user_data_len, Processor proc)
Definition processor.h:59
RunStyle
Definition runtime.h:257
@ ONE_TASK_PER_NODE
Definition runtime.h:259
@ ONE_TASK_ONLY
Definition runtime.h:258
@ ONE_TASK_PER_PROC
Definition runtime.h:260
bool configure_from_command_line(std::vector< std::string > &cmdline, bool remove_realm_args=false)
bool register_reduction(Event &event, ReductionOpID redop_id, const ReductionOpUntyped *redop)
void * impl
Definition runtime.h:34
bool register_reduction(ReductionOpID redop_id, const ReductionOpUntyped *redop)
Definition runtime.h:214
void parse_command_line(std::vector< std::string > &cmdline, bool remove_realm_args=false)
static Runtime get_runtime(void)
bool init(int *argc, char ***argv)
bool register_task(Processor::TaskFuncID taskid, Processor::TaskFuncPtr taskptr)
static const char * get_library_version()
Module * get_module_untyped(const char *name)
~Runtime(void)
Definition runtime.h:47
void shutdown(Event wait_on=Event::NO_EVENT, int result_code=0)
bool register_custom_serdez(CustomSerdezID serdez_id)
Definition runtime.h:239
void parse_command_line(int argc, char **argv)
Runtime(const Runtime &r)
Definition runtime.h:38
bool register_custom_serdez(CustomSerdezID serdez_id, const CustomSerdezUntyped *serdez)
int wait_for_shutdown(void)
bool register_reduction(ReductionOpID redop_id)
Definition runtime.h:224
bool create_configs(int argc, char **argv)
T * get_module(const char *name)
Definition runtime.h:285
Runtime & operator=(const Runtime &r)
Definition runtime.h:41
bool configure_from_command_line(int argc, char **argv)
bool network_init(const KeyValueStoreVtable &vtable)
Event collective_spawn_by_kind(Processor::Kind target_kind, Processor::TaskFuncID task_id, const void *args, size_t arglen, bool one_per_node=false, Event wait_on=Event::NO_EVENT, int priority=0)
REALM_ATTR_DEPRECATED("use collective_spawn calls instead", void run(Processor::TaskFuncID task_id=0, RunStyle style=ONE_TASK_ONLY, const void *args=0, size_t arglen=0, bool background=false))
Event collective_spawn(Processor target_proc, Processor::TaskFuncID task_id, const void *args, size_t arglen, Event wait_on=Event::NO_EVENT, int priority=0)
bool register_reduction(Event &event, ReductionOpID redop_id)
Definition runtime.h:230
void finish_configure(void)
bool network_init(int *argc, char ***argv)
ModuleConfig * get_module_config(const std::string &name) const
#define REALM_PUBLIC_API
Definition compiler_support.h:225
Definition activemsg.h:42
int CustomSerdezID
Definition custom_serdez.h:148
::realm_reduction_op_id_t ReductionOpID
Definition event.h:38
bool(* bar)(const void *vtable_data, size_t vtable_data_size)
Definition runtime.h:163
static constexpr std::string_view rank_key
Definition runtime.h:161
bool(* cas)(const void *key, size_t key_size, void *expected, size_t *expected_size, const void *desired, size_t desired_size, const void *vtable_data, size_t vtable_data_size)
Definition runtime.h:182
bool(* get)(const void *key, size_t key_size, void *value, size_t *value_size, const void *vtable_data, size_t vtable_data_size)
Definition runtime.h:118
const void * vtable_data
Definition runtime.h:82
static constexpr std::string_view ranks_key
Definition runtime.h:162
static constexpr std::string_view group_key
Definition runtime.h:160
size_t vtable_data_size
Definition runtime.h:83
bool(* put)(const void *key, size_t key_size, const void *value, size_t value_sizem, const void *vtable_data, size_t vtable_data_size)
Definition runtime.h:97