#ifndef ALSK_ALSK_SKELETON_BONE_LOOP_H #define ALSK_ALSK_SKELETON_BONE_LOOP_H #include "../bonebase.h" namespace alsk { template struct Loop; template< typename Signature, typename Task_, typename TaskLinks_ > struct Loop>: SkeletonBase { using Task = Task_; using TaskLinks = TaskLinks_; using Links = tmp::Pack; using PackP = tmp::Parameters; using PackR = Returns; using PackX = void; using Packs = arg::Placeholders; Task task; std::size_t n; }; template<> struct SkeletonTraits { static constexpr bool serial = true; template static constexpr decltype(auto) traverse(std::size_t parDepth, Skeleton&& skeleton, F&& function, T&& init) { using Traverser = SkeletonTraversal::Task>; return function(parDepth, skeleton, Traverser::execute(parDepth, skeleton.task, function, std::forward(init))); } template static constexpr std::size_t parallelizability(Skeleton&&) noexcept { return 1; } }; template void skeletonTraversal(Loop const& s, F&& f) { std::forward(f)(s.task, 1); } } #endif