11 #ifndef CUBBYFLOW_ITERATION_UTILS_IMPL_HPP 12 #define CUBBYFLOW_ITERATION_UTILS_IMPL_HPP 18 template <
typename IndexType,
size_t N,
size_t I>
21 template <
typename Func,
typename... RemainingIndices>
24 RemainingIndices... indices)
26 for (IndexType i = begin[I - 1]; i < end[I - 1]; ++i)
34 template <
typename IndexType,
size_t N>
37 template <
typename Func,
typename... RemainingIndices>
40 RemainingIndices... indices)
42 for (IndexType i = begin[0]; i < end[0]; ++i)
50 template <
typename IndexType,
size_t N,
typename Func>
54 for (IndexType i = begin[N - 1]; i < end[N - 1]; ++i)
60 template <
typename IndexType,
typename Func>
64 for (IndexType i = begin[0]; i < end[0]; ++i)
70 template <
typename IndexType,
typename Func>
71 void ForEachIndex(IndexType begin, IndexType end,
const Func& func)
73 for (IndexType i = begin; i < end; ++i)
79 template <
typename IndexType,
size_t N,
typename Func>
85 template <
typename IndexType,
typename Func>
91 template <
typename IndexType,
typename Func>
97 template <
typename IndexType,
size_t N,
typename Func>
103 begin[N - 1], end[N - 1],
111 template <
typename IndexType,
typename Func>
119 template <
typename IndexType,
typename Func>
126 template <
typename IndexType,
size_t N,
typename Func>
133 template <
typename IndexType,
typename Func>
140 template <
typename IndexType,
typename Func>
Definition: IterationUtils-Impl.hpp:19
static void Call(const Vector< IndexType, N > &begin, const Vector< IndexType, N > &end, const Func &func, RemainingIndices... indices)
Definition: IterationUtils-Impl.hpp:22
Definition: Matrix.hpp:27
Definition: pybind11Utils.hpp:20
void ParallelFor(IndexType beginIndex, IndexType endIndex, const Function &function, ExecutionPolicy policy)
Makes a for-loop from beginIndex to endIndex in parallel.
Definition: Parallel-Impl.hpp:212
void ParallelForEachIndex(const Vector< IndexType, N > &begin, const Vector< IndexType, N > &end, const Func &func, ExecutionPolicy policy)
Definition: IterationUtils-Impl.hpp:98
ExecutionPolicy
Execution policy tag.
Definition: Parallel.hpp:17
void ForEachIndex(const Vector< IndexType, N > &begin, const Vector< IndexType, N > &end, const Func &func)
Definition: IterationUtils-Impl.hpp:51
static void Call(const Vector< IndexType, N > &begin, const Vector< IndexType, N > &end, const Func &func, RemainingIndices... indices)
Definition: IterationUtils-Impl.hpp:38