#ifndef SLA_CONCURRENCY_H #define SLA_CONCURRENCY_H // FIXME: Deprecated #include #include namespace Slic3r { namespace sla { // Set this to true to enable full parallelism in this module. // Only the well tested parts will be concurrent if this is set to false. const constexpr bool USE_FULL_CONCURRENCY = true; template struct _ccr {}; template<> struct _ccr { using SpinningMutex = execution::SpinningMutex; using BlockingMutex = execution::BlockingMutex; template static void for_each(It from, It to, Fn &&fn, size_t granularity = 1) { execution::for_each(ex_tbb, from, to, std::forward(fn), granularity); } template static auto reduce(Args&&...args) { return execution::reduce(ex_tbb, std::forward(args)...); } static size_t max_concurreny() { return execution::max_concurrency(ex_tbb); } }; template<> struct _ccr { using SpinningMutex = execution::SpinningMutex; using BlockingMutex = execution::BlockingMutex; template static void for_each(It from, It to, Fn &&fn, size_t granularity = 1) { execution::for_each(ex_seq, from, to, std::forward(fn), granularity); } template static auto reduce(Args&&...args) { return execution::reduce(ex_seq, std::forward(args)...); } static size_t max_concurreny() { return execution::max_concurrency(ex_seq); } }; using ccr = _ccr; using ccr_seq = _ccr; using ccr_par = _ccr; }} // namespace Slic3r::sla #endif // SLACONCURRENCY_H