16#ifndef __LEGION_FUTURE_H__
17#define __LEGION_FUTURE_H__
57 Internal::FutureImpl* impl;
60 FRIEND_ALL_RUNTIME_CLASSES
61 explicit Future(Internal::FutureImpl* impl);
63 inline bool exists(
void)
const {
return (impl !=
nullptr); }
64 inline bool operator==(
const Future& f)
const {
return impl == f.impl; }
65 inline bool operator<(
const Future& f)
const {
return impl < f.impl; }
68 std::size_t hash(
void)
const;
80 bool silence_warnings =
false,
81 const char* warning_string =
nullptr)
const;
88 bool silence_warnings =
false,
89 const char* warning_string =
nullptr)
const;
102 bool block =
false,
bool silence_warnings =
false,
103 const char* warning_string =
nullptr)
const;
127 template<
typename T, PrivilegeMode PM = LEGION_READ_ONLY>
129 Memory::Kind memory,
bool silence_warnings =
false,
130 const char* warning_string =
nullptr)
const;
146 Memory::Kind memory,
size_t* extent_in_bytes =
nullptr,
147 bool check_extent =
false,
bool silence_warnings =
false,
148 const char* warning_string =
nullptr)
const;
158 std::set<Memory>& memories,
bool silence_warnings =
false,
159 const char* warning_string =
nullptr)
const;
175 LEGION_DEPRECATED(
"Use 'Future::get_span' instead")
177 bool silence_warnings = false,
178 const
char* warning_string =
nullptr) const;
191 bool silence_warnings = false,
192 const
char* warning_string =
nullptr) const;
213 inline
bool valid(
void) const;
215 inline
void wait(
void) const;
223 LEGION_DEPRECATED("Use the version without a runtime pointer argument")
233 const
Domain& d,
bool take_ownership, const
char* provenance =
nullptr,
234 bool shard_local = false);
240 LEGION_DEPRECATED("Use the version without a runtime pointer argument")
242 Runtime* rt, const
void* buffer,
size_t bytes,
243 bool take_ownership = false);
245 const
void* buffer,
size_t bytes,
bool take_ownership = false,
246 const
char* provenance =
nullptr,
bool shard_local = false);
248 const
void* buffer,
size_t bytes,
bool owned,
249 const Realm::ExternalInstanceResource& resource,
250 void (*freefunc)(const Realm::ExternalInstanceResource&) =
nullptr,
251 const
char* provenance =
nullptr,
bool shard_local = false);
254 template<PrivilegeMode, typename,
int, typename, typename,
bool>
256 Realm::RegionInstance get_instance(
257 Memory::Kind kind,
size_t field_size,
bool check_field_size,
258 const
char* warning_string,
bool silence_warnings) const;
259 void report_incompatible_accessor(
260 const
char* accessor_kind, Realm::RegionInstance instance) const;
265#include "legion/api/future.inl"
Definition geometry.h:159
Definition accessors.h:76
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
Definition accessors.h:29