From 791d5c29e58041f663e8058156f8022d9602a582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=C5=9Alusarczyk?= <112692748+lslusarczyk@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:56:13 +0200 Subject: [PATCH] removed future (#1643) --- .../distributed_ranges_impl/shp/future.hpp | 69 ------------------- 1 file changed, 69 deletions(-) delete mode 100644 include/oneapi/dpl/internal/distributed_ranges_impl/shp/future.hpp diff --git a/include/oneapi/dpl/internal/distributed_ranges_impl/shp/future.hpp b/include/oneapi/dpl/internal/distributed_ranges_impl/shp/future.hpp deleted file mode 100644 index aad91a92fd8..00000000000 --- a/include/oneapi/dpl/internal/distributed_ranges_impl/shp/future.hpp +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-FileCopyrightText: Intel Corporation -// -// SPDX-License-Identifier: BSD-3-Clause - -#pragma once - -#include -#include - -#include - -namespace oneapi::dpl::experimental::dr::shp -{ - -template -class future -{ - public: - using event_type = Event; - - future(std::unique_ptr&& value, const std::vector& events) : value_(std::move(value)), events_(events) {} - - future(T&& value, const std::vector& events) : value_(new T(std::move(value))), events_(events) {} - - void - update(const Event& event) - { - events_.push_back(event); - } - - future(future&&) = default; - future& - operator=(future&&) = default; - - future(const future&) = delete; - future& - operator=(const future&) = delete; - - T - get() - { - wait(); - return std::move(*value_); - } - - std::vector - events() const - { - return events_; - } - - T& - value() const - { - return *value_; - } - - void - wait() - { - __detail::wait(events_); - } - - private: - std::unique_ptr value_; - std::vector events_; -}; - -} // namespace oneapi::dpl::experimental::dr::shp