#ifndef ALSK_ALSK_SKELETON_BONE_ITERSEL_H #define ALSK_ALSK_SKELETON_BONE_ITERSEL_H #include "../bonebase.h" namespace alsk { template struct IterSel; template< typename Signature, typename Task_, typename TaskLinks_, typename Select_, typename SelectLinks_ > struct IterSel, tmp::Pack>: SkeletonBase { using Task = Task_; using TaskLinks = TaskLinks_; using Select = Select_; using SelectLinks = SelectLinks_; using Links = tmp::Pack; using PackP = tmp::Parameters; using PackR = Returns; using PackX = tmp::Pack<>; using Packs = arg::Placeholders; Task task; Select select; 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 TraverserTask = SkeletonTraversal::Task>; using TraverserSelect = SkeletonTraversal::Select>; return function(parDepth, skeleton, TraverserTask::execute(parDepth, skeleton.task, function, std::forward(init)), TraverserSelect::execute(parDepth, skeleton.select, function, std::forward(init)) ); } template static constexpr std::size_t parallelizability(Skeleton&&) noexcept { return 1; } }; template void skeletonTraversal(IterSel const& s, F f) { f(s.task, 1); f(s.select, 1); } } #endif