
#ifndef PLS_PARALLEL_FOR_H
#define PLS_PARALLEL_FOR_H

// TODO: Replace with own integer iterator to remove dependency
#include <boost/range/irange.hpp>

namespace pls {
namespace algorithm {

template<typename RandomIt, typename Function>
void parallel_for(RandomIt first, RandomIt last, const Function &function);

template<typename Function>
void parallel_for(size_t first, size_t last, const Function &function) {
  auto range = boost::irange(first, last);
  parallel_for(range.begin(), range.end(), function);
}

}
}
#include "parallel_for_impl.h"

#endif //PLS_PARALLEL_FOR_H
