16#ifndef __LEGION_FUTURE_H__
17#define __LEGION_FUTURE_H__
19#include "legion/api/physical_region.h"
52 Internal::FutureImpl* impl;
55 FRIEND_ALL_RUNTIME_CLASSES
56 explicit Future(Internal::FutureImpl* impl);
58 inline bool exists(
void)
const {
return (impl !=
nullptr); }
59 inline bool operator==(
const Future& f)
const {
return impl == f.impl; }
60 inline bool operator<(
const Future& f)
const {
return impl < f.impl; }
63 std::size_t hash(
void)
const;
75 bool silence_warnings =
false,
76 const char* warning_string =
nullptr)
const;
83 bool silence_warnings =
false,
84 const char* warning_string =
nullptr)
const;
97 bool block =
false,
bool silence_warnings =
false,
98 const char* warning_string =
nullptr)
const;
122 template<
typename T, PrivilegeMode PM = LEGION_READ_ONLY>
124 Memory::Kind memory,
bool silence_warnings =
false,
125 const char* warning_string =
nullptr)
const;
141 Memory::Kind memory,
size_t* extent_in_bytes =
nullptr,
142 bool check_extent =
false,
bool silence_warnings =
false,
143 const char* warning_string =
nullptr)
const;
153 std::set<Memory>& memories,
bool silence_warnings =
false,
154 const char* warning_string =
nullptr)
const;
170 LEGION_DEPRECATED(
"Use 'Future::get_span' instead")
172 bool silence_warnings = false,
173 const
char* warning_string =
nullptr) const;
186 bool silence_warnings = false,
187 const
char* warning_string =
nullptr) const;
208 inline
bool valid(
void) const;
210 inline
void wait(
void) const;
218 LEGION_DEPRECATED("Use the version without a runtime pointer argument")
228 const
Domain& d,
bool take_ownership, const
char* provenance =
nullptr,
229 bool shard_local = false);
235 LEGION_DEPRECATED("Use the version without a runtime pointer argument")
237 Runtime* rt, const
void* buffer,
size_t bytes,
238 bool take_ownership = false);
240 const
void* buffer,
size_t bytes,
bool take_ownership = false,
241 const
char* provenance =
nullptr,
bool shard_local = false);
243 const
void* buffer,
size_t bytes,
bool owned,
244 const Realm::ExternalInstanceResource& resource,
245 void (*freefunc)(const Realm::ExternalInstanceResource&) =
nullptr,
246 const
char* provenance =
nullptr,
bool shard_local = false);
249 template<PrivilegeMode, typename,
int, typename, typename,
bool>
251 Realm::RegionInstance get_instance(
252 Memory::Kind kind,
size_t field_size,
bool check_field_size,
253 const
char* warning_string,
bool silence_warnings) const;
254 void report_incompatible_accessor(
255 const
char* accessor_kind, Realm::RegionInstance instance) const;
260#include "legion/api/future.inl"
Definition geometry.h:154
Definition accessors.h:71
void get_memories(std::set< Memory > &memories, bool silence_warnings=false, const char *warning_string=nullptr) const
static Future from_untyped_pointer(Runtime *rt, const void *buffer, size_t bytes, bool take_ownership=false)
static Future from_domain(const Domain &d, bool take_ownership, const char *provenance=nullptr, bool shard_local=false)
const T & get_reference(bool silence_warnings=false, const char *warning_string=nullptr) const
size_t get_untyped_size(void) const
const void * get_metadata(size_t *size=nullptr) const
static Future from_value(Runtime *rt, const T &value)
const void * get_untyped_pointer(bool silence_warnings=false, const char *warning_string=nullptr) const
Span< T, PM > get_span(Memory::Kind memory, bool silence_warnings=false, const char *warning_string=nullptr) const
T get_result(bool silence_warnings=false, const char *warning_string=nullptr) const
const void * get_buffer(Memory::Kind memory, size_t *extent_in_bytes=nullptr, bool check_extent=false, bool silence_warnings=false, const char *warning_string=nullptr) const
bool is_ready(bool subscribe=false) const
bool is_empty(bool block=false, bool silence_warnings=false, const char *warning_string=nullptr) const
void get_void_result(bool silence_warnings=false, const char *warning_string=nullptr) const