Program Listing for File unrolled_for.hpp

Return to documentation for file (include/wrench/algorithm/unrolled_for.hpp)

//==--- wrench/algorithm/unrolled_for.hpp ------------------ -*- C++ -*- ---==//
//
//                                Wrench
//
//                      Copyright (c) 2020 Rob Clucas
//
//  This file is distributed under the MIT License. See LICENSE for details.
//
//==------------------------------------------------------------------------==//
//
//
//==------------------------------------------------------------------------==//

#ifndef WRENCH_ALGORITHM_UNROLLED_FOR_HPP
#define WRENCH_ALGORITHM_UNROLLED_FOR_HPP

#include "detail/unrolled_for_impl_.hpp"

namespace wrench {

template <size_t Amount, typename Functor, typename... Args>
constexpr inline auto
unrolled_for(Functor&& functor, Args&&... args) noexcept -> void {
  detail::Unroll<Amount> unrolled(
    std::forward<Functor>(functor), std::forward<Args>(args)...);
}

} // namespace wrench

#endif // WRENCH_ALGORITHM_UNROLLED_FOR_HPP