//===-- deluxe/executionpolicies/AwaitAny.cpp -------------------*- C++ -*-===//
//
//                                 The RoSA Framework
//
// Distributed under the terms and conditions of the Boost Software License 1.0.
// See accompanying file LICENSE.
//
// If you did not receive a copy of the license file, see
// http://www.boost.org/LICENSE_1_0.txt.
//
//===----------------------------------------------------------------------===//
///
/// \file deluxe/executionpolicies/AwaitAny.cpp
///
/// \author David Juhasz (david.juhasz@tuwien.ac.at)
///
/// \date 2019
///
/// \brief Implementation for deluxe/executionpolicies/AwaitAny.h.
///
//===----------------------------------------------------------------------===//

#include "AwaitAny.h"

#include <algorithm>

namespace rosa {
namespace deluxe {

AwaitAny::AwaitAny(const std::set<size_t> &S)
    : AwaitBase(S,
                CheckerType(std::any_of<std::set<size_t>::const_iterator,
                                        std::function<bool(const size_t)>>)) {}

std::string AwaitAny::dump(void) const noexcept {
  return "Await any of " + dumpS();
}

} // End namespace deluxe
} // End namespace rosa
