20#ifndef REALM_PROCESSOR_H
21#define REALM_PROCESSOR_H
34 class ProfilingRequestSet;
48 constexpr operator id_t()
const {
return id; }
56 bool exists(
void)
const {
return id != 0; }
59 typedef void (*TaskFuncPtr)(
const void *args,
size_t arglen,
const void *user_data,
66#define C_ENUMS(name, desc) name,
77 "use ProcessorGroup::create_group instead",
96 Event wait_on = Event::NO_EVENT,
int priority = 0)
const;
101 int priority = 0)
const;
135 size_t user_data_len = 0)
const;
140 const void *user_data = 0,
141 size_t user_data_len = 0);
150 size_t reason_size)
const;
154#ifdef REALM_USE_KOKKOS
157 class KokkosExecInstance;
159 KokkosExecInstance kokkos_work_space(
void)
const;
163#if defined(REALM_USE_KOKKOS)
165 template <
typename T>
166 class is_kokkos_execution_space {
170 template <
typename C>
171 static yes check(
typename C::execution_space *);
172 template <
typename C>
173 static no check(...);
176 static constexpr bool value =
sizeof(check<T>(0)) ==
sizeof(yes);
181 KokkosExecInstance(Processor _p);
185 template <
typename exec_space,
186 typename std::enable_if<is_kokkos_execution_space<exec_space>::value,
188 operator exec_space()
const;
206 return create_group(members.data(), members.size());
215#include "realm/processor.inl"
Definition codedesc.h:249
Definition processor.h:199
void destroy(Event wait_on=Event::NO_EVENT) const
static const ProcessorGroup NO_PROC_GROUP
Definition processor.h:210
static ProcessorGroup create_group(const span< const Processor > &members)
Definition processor.h:204
static ProcessorGroup create_group(const Processor *members, size_t num_members)
Definition processor.h:37
bool operator==(const Processor &rhs) const
Definition processor.h:51
void get_group_members(std::vector< Processor > &member_list) const
id_t id
Definition processor.h:41
constexpr Processor(id_t id)
Definition processor.h:44
bool exists(void) const
Definition processor.h:56
void get_group_members(Processor *member_list, size_t &num_members) const
REALM_ATTR_DEPRECATED("use ProcessorGroup::create_group instead", static Processor create_group(const span< const Processor > &members))
static Processor get_executing_processor(void)
static const char * get_kind_name(Kind kind)
::realm_id_t id_t
Definition processor.h:39
Event spawn(TaskFuncID func_id, const void *args, size_t arglen, const ProfilingRequestSet &requests, Event wait_on=Event::NO_EVENT, int priority=0) const
Event register_task(TaskFuncID func_id, const CodeDescriptor &codedesc, const ProfilingRequestSet &prs, const void *user_data=0, size_t user_data_len=0) const
static void report_execution_fault(int reason, const void *reason_data, size_t reason_size)
Kind
Definition processor.h:65
int get_num_cores(void) const
void report_processor_fault(int reason, const void *reason_data, size_t reason_size) const
static Event register_task_by_kind(Kind target_kind, bool global, TaskFuncID func_id, const CodeDescriptor &codedesc, const ProfilingRequestSet &prs, const void *user_data=0, size_t user_data_len=0)
static void disable_scheduler_lock(void)
static void enable_scheduler_lock(void)
Event spawn(TaskFuncID func_id, const void *args, size_t arglen, Event wait_on=Event::NO_EVENT, int priority=0) const
static realm_status_t add_finish_event_precondition(Event precondition)
bool operator<(const Processor &rhs) const
Definition processor.h:50
::realm_task_func_id_t TaskFuncID
Definition processor.h:58
static Event get_current_finish_event(void)
static const Processor NO_PROC
Definition processor.h:54
AddressSpace address_space(void) const
static void set_current_task_priority(int new_priority)
bool operator!=(const Processor &rhs) const
Definition processor.h:52
Definition profiling.h:363
#define REALM_PUBLIC_API
Definition compiler_support.h:217
#define C_ENUMS(name, desc)
Definition memory.h:60
Definition activemsg.h:38
::realm_address_space_t AddressSpace
Definition memory.h:31
#define REALM_TASK_ID_FIRST_AVAILABLE
Definition realm_c.h:174
enum realm_status_enum realm_status_t
unsigned long long realm_id_t
Definition realm_c.h:64
#define REALM_TASK_ID_PROCESSOR_NOP
Definition realm_c.h:171
#define REALM_TASK_ID_PROCESSOR_INIT
Definition realm_c.h:172
#define REALM_PROCESSOR_KINDS(__op__)
Definition realm_c.h:227
#define REALM_TASK_ID_PROCESSOR_SHUTDOWN
Definition realm_c.h:173
unsigned int realm_address_space_t
Definition realm_c.h:72
unsigned realm_task_func_id_t
Definition realm_c.h:73
#define REALM_NO_PROC
Definition realm_c.h:165