//===-- app/executionpolicies/AwaitAll.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 app/executionpolicies/AwaitAll.cpp
///
/// \author David Juhasz (david.juhasz@tuwien.ac.at)
///
/// \date 2019-2020
///
/// \brief Implementation for app/executionpolicies/AwaitAll.h.
///
//===----------------------------------------------------------------------===//

#include "AwaitAll.h"

#include <algorithm>

namespace rosa {
namespace app {

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

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

} // End namespace app
} // End namespace rosa
