18 #include <flecsi-config.h> 20 #if !defined(__FLECSI_PRIVATE__) 21 #error Do not include this file directly! 26 #if !defined(FLECSI_ENABLE_LEGION) 27 #error FLECSI_ENABLE_LEGION not defined! This file depends on Legion! 34 template<
typename Return>
35 struct future<Return> {
41 legion_future_.wait();
47 Return
get(
bool silence_warnings =
false)
const {
48 if constexpr(std::is_same_v<Return, void>)
49 return legion_future_.get_void_result(silence_warnings);
51 return legion_future_.get_result<Return>(silence_warnings);
54 Legion::Future legion_future_;
57 template<
typename Return>
58 struct future<Return, exec::launch_type_t::index> {
62 void wait(
bool silence_warnings =
false)
const {
63 legion_future_.wait_all_results(silence_warnings);
70 Return
get(std::size_t index = 0,
bool silence_warnings =
false)
const {
71 if constexpr(std::is_same_v<Return, void>)
72 return legion_future_.get_void_result(index, silence_warnings);
74 return legion_future_.get_result<Return>(index, silence_warnings);
77 Legion::FutureMap legion_future_;
void wait(bool silence_warnings=false) const
Definition: future.hh:62
void wait() const
Definition: future.hh:40
Definition: control.hh:31