8 #ifdef ALLOW_PARALLELIZATION
27 double op_width,
const F2CCell& poly) {
28 int n =
static_cast<int>(
29 boost::math::constants::two_pi<double>() /
step_angle);
30 std::vector<double> costs(n);
31 std::vector<int> ids(n);
32 std::iota(ids.begin(), ids.end(), 0);
34 auto getCostSwaths = [
this, op_width, &poly, &
obj] (
const int& i) {
38 #ifdef ALLOW_PARALLELIZATION
39 std::transform(std::execution::par_unseq, ids.begin(), ids.end(),
40 costs.begin(), getCostSwaths);
42 std::transform(ids.begin(), ids.end(), costs.begin(), getCostSwaths);
45 return ids[std::min_element(
46 costs.begin(), costs.end()) - costs.begin()] *
step_angle;