@@ -128,7 +128,7 @@ void exec_post_wrapper(Executor & exec, F &&f, Ts &&...ts) {
128
128
}
129
129
130
130
template <typename Executor, typename F, typename... Ts>
131
- hpx::lcos:: future<void> exec_async_wrapper(Executor & exec, F &&f, Ts &&...ts) {
131
+ hpx::future<void> exec_async_wrapper(Executor & exec, F &&f, Ts &&...ts) {
132
132
return hpx::async(exec, std::forward<F>(f), std::forward<Ts>(ts)...);
133
133
}
134
134
@@ -148,9 +148,9 @@ template <typename Executor> class aggregated_function_call {
148
148
std::atomic<size_t> slice_counter = 0;
149
149
150
150
/// Promise to be set when all slices have visited this function call
151
- /* hpx::lcos::local:: promise<void> slices_ready_promise; */
151
+ /* hpx::promise<void> slices_ready_promise; */
152
152
/// Tracks if all slices have visited this function call
153
- /* hpx::lcos:: future<void> all_slices_ready = slices_ready_promise.get_future(); */
153
+ /* hpx::future<void> all_slices_ready = slices_ready_promise.get_future(); */
154
154
/// How many slices can we expect?
155
155
const size_t number_slices;
156
156
const bool async_mode;
@@ -168,7 +168,7 @@ template <typename Executor> class aggregated_function_call {
168
168
aggregation_mutex_t debug_mut;
169
169
#endif
170
170
171
- std::vector<hpx::lcos::local:: promise<void>> potential_async_promises{};
171
+ std::vector<hpx::promise<void>> potential_async_promises{};
172
172
173
173
public:
174
174
aggregated_function_call(const size_t number_slices, bool async_mode, Executor &exec)
@@ -182,7 +182,7 @@ template <typename Executor> class aggregated_function_call {
182
182
// assert(!all_slices_ready.valid());
183
183
}
184
184
/// Returns true if all required slices have visited this point
185
- bool sync_aggregation_slices(hpx::lcos:: future<void> &stream_future) {
185
+ bool sync_aggregation_slices(hpx::future<void> &stream_future) {
186
186
assert(!async_mode);
187
187
assert(potential_async_promises.empty());
188
188
const size_t local_counter = slice_counter++;
@@ -192,7 +192,7 @@ template <typename Executor> class aggregated_function_call {
192
192
else return false;
193
193
}
194
194
template <typename F, typename... Ts>
195
- void post_when(hpx::lcos:: future<void> &stream_future, F &&f, Ts &&...ts) {
195
+ void post_when(hpx::future<void> &stream_future, F &&f, Ts &&...ts) {
196
196
#if !(defined(NDEBUG)) && defined(DEBUG_AGGREGATION_CALLS)
197
197
// needed for concurrent access to function_tuple and debug_type_information
198
198
// Not required for normal use
@@ -265,7 +265,7 @@ template <typename Executor> class aggregated_function_call {
265
265
}
266
266
}
267
267
template <typename F, typename... Ts>
268
- hpx::lcos:: future<void> async_when(hpx::lcos ::future<void> &stream_future,
268
+ hpx::future<void> async_when(hpx::future<void> &stream_future,
269
269
F &&f, Ts &&...ts) {
270
270
#if !(defined(NDEBUG)) && defined(DEBUG_AGGREGATION_CALLS)
271
271
// needed for concurrent access to function_tuple and debug_type_information
@@ -330,7 +330,7 @@ template <typename Executor> class aggregated_function_call {
330
330
assert(local_counter < number_slices);
331
331
assert(slice_counter < number_slices + 1);
332
332
assert(potential_async_promises.size() == number_slices);
333
- hpx::lcos:: future<void> ret_fut =
333
+ hpx::future<void> ret_fut =
334
334
potential_async_promises[local_counter].get_future();
335
335
if (local_counter == number_slices - 1) {
336
336
/* slices_ready_promise.set_value(); */
@@ -347,15 +347,15 @@ template <typename Executor> class aggregated_function_call {
347
347
return ret_fut;
348
348
}
349
349
template <typename F, typename... Ts>
350
- hpx::lcos:: shared_future<void> wrap_async(hpx::lcos ::future<void> &stream_future,
350
+ hpx::shared_future<void> wrap_async(hpx::future<void> &stream_future,
351
351
F &&f, Ts &&...ts) {
352
352
assert(async_mode);
353
353
assert(!potential_async_promises.empty());
354
354
const size_t local_counter = slice_counter++;
355
355
assert(local_counter < number_slices);
356
356
assert(slice_counter < number_slices + 1);
357
357
assert(potential_async_promises.size() == number_slices);
358
- hpx::lcos:: shared_future<void> ret_fut =
358
+ hpx::shared_future<void> ret_fut =
359
359
potential_async_promises[local_counter].get_shared_future();
360
360
if (local_counter == number_slices - 1) {
361
361
auto fut = f(std::forward<Ts>(ts)...);
@@ -496,11 +496,11 @@ template <typename Executor> class aggregated_executor {
496
496
launch_counter++;
497
497
}
498
498
template <typename F, typename... Ts>
499
- hpx::lcos:: future<void> async(F &&f, Ts &&...ts) {
499
+ hpx::future<void> async(F &&f, Ts &&...ts) {
500
500
// we should only execute function calls once all slices
501
501
// have been given away (-> Executor Slices start)
502
502
assert(parent.slices_exhausted == true);
503
- hpx::lcos:: future<void> ret_fut = parent.async(
503
+ hpx::future<void> ret_fut = parent.async(
504
504
launch_counter, std::forward<F>(f), std::forward<Ts>(ts)...);
505
505
launch_counter++;
506
506
return ret_fut;
@@ -525,11 +525,11 @@ template <typename Executor> class aggregated_executor {
525
525
}
526
526
527
527
template <typename F, typename... Ts>
528
- hpx::lcos:: shared_future<void> wrap_async(F &&f, Ts &&...ts) {
528
+ hpx::shared_future<void> wrap_async(F &&f, Ts &&...ts) {
529
529
// we should only execute function calls once all slices
530
530
// have been given away (-> Executor Slices start)
531
531
assert(parent.slices_exhausted == true);
532
- hpx::lcos:: shared_future<void> ret_fut = parent.wrap_async(
532
+ hpx::shared_future<void> ret_fut = parent.wrap_async(
533
533
launch_counter, std::forward<F>(f), std::forward<Ts>(ts)...);
534
534
launch_counter++;
535
535
return ret_fut;
@@ -557,10 +557,10 @@ template <typename Executor> class aggregated_executor {
557
557
558
558
//===============================================================================
559
559
560
- hpx::lcos::local:: promise<void> slices_full_promise;
560
+ hpx::promise<void> slices_full_promise;
561
561
/// Promises with the slice executors -- to be set when the starting criteria
562
562
/// is met
563
- std::vector<hpx::lcos::local:: promise<executor_slice>> executor_slices;
563
+ std::vector<hpx::promise<executor_slice>> executor_slices;
564
564
/// List of aggregated function calls - function will be launched when all
565
565
/// slices have called it
566
566
std::deque<aggregated_function_call<Executor>> function_calls;
@@ -715,8 +715,8 @@ template <typename Executor> class aggregated_executor {
715
715
//===============================================================================
716
716
// Public Interface
717
717
public:
718
- hpx::lcos:: future<void> current_continuation;
719
- hpx::lcos:: future<void> last_stream_launch_done;
718
+ hpx::future<void> current_continuation;
719
+ hpx::future<void> last_stream_launch_done;
720
720
std::atomic<size_t> overall_launch_counter = 0;
721
721
722
722
/// Only meant to be accessed by the slice executors
@@ -764,7 +764,7 @@ template <typename Executor> class aggregated_executor {
764
764
765
765
/// Only meant to be accessed by the slice executors
766
766
template <typename F, typename... Ts>
767
- hpx::lcos:: future<void> async(const size_t slice_launch_counter, F &&f,
767
+ hpx::future<void> async(const size_t slice_launch_counter, F &&f,
768
768
Ts &&...ts) {
769
769
std::lock_guard<aggregation_mutex_t> guard(mut);
770
770
assert(slices_exhausted == true);
@@ -785,7 +785,7 @@ template <typename Executor> class aggregated_executor {
785
785
}
786
786
/// Only meant to be accessed by the slice executors
787
787
template <typename F, typename... Ts>
788
- hpx::lcos:: shared_future<void> wrap_async(const size_t slice_launch_counter, F &&f,
788
+ hpx::shared_future<void> wrap_async(const size_t slice_launch_counter, F &&f,
789
789
Ts &&...ts) {
790
790
std::lock_guard<aggregation_mutex_t> guard(mut);
791
791
assert(slices_exhausted == true);
@@ -810,7 +810,7 @@ template <typename Executor> class aggregated_executor {
810
810
return !slices_exhausted;
811
811
}
812
812
813
- std::optional<hpx::lcos:: future<executor_slice>> request_executor_slice() {
813
+ std::optional<hpx::future<executor_slice>> request_executor_slice() {
814
814
std::lock_guard<aggregation_mutex_t> guard(mut);
815
815
if (!slices_exhausted) {
816
816
const size_t local_slice_id = ++current_slices;
@@ -839,14 +839,14 @@ template <typename Executor> class aggregated_executor {
839
839
dealloc_counter = 0;
840
840
841
841
if (mode == aggregated_executor_modes::STRICT ) {
842
- slices_full_promise = hpx::lcos::local:: promise<void>{};
842
+ slices_full_promise = hpx::promise<void>{};
843
843
}
844
844
}
845
845
846
846
// Create Executor Slice future -- that will be returned later
847
- hpx::lcos:: future<executor_slice> ret_fut;
847
+ hpx::future<executor_slice> ret_fut;
848
848
if (local_slice_id < max_slices) {
849
- executor_slices.emplace_back(hpx::lcos::local:: promise<executor_slice>{});
849
+ executor_slices.emplace_back(hpx::promise<executor_slice>{});
850
850
ret_fut =
851
851
executor_slices[local_slice_id - 1].get_future();
852
852
} else {
@@ -871,7 +871,7 @@ template <typename Executor> class aggregated_executor {
871
871
gpu_id));
872
872
// Renew promise that all slices will be ready as the primary launch
873
873
// criteria...
874
- hpx::lcos:: shared_future<void> fut;
874
+ hpx::shared_future<void> fut;
875
875
if (mode == aggregated_executor_modes::EAGER ||
876
876
mode == aggregated_executor_modes::ENDLESS) {
877
877
// Fallback launch condidtion: Launch as soon as the underlying stream
@@ -922,7 +922,7 @@ template <typename Executor> class aggregated_executor {
922
922
return ret_fut;
923
923
} else {
924
924
// Return empty optional as failure
925
- return std::optional<hpx::lcos:: future<executor_slice>>{};
925
+ return std::optional<hpx::future<executor_slice>>{};
926
926
}
927
927
}
928
928
size_t launched_slices;
0 commit comments