Atoms Crowd  7.0.0
TaskScheduler.h
1 #pragma once
2 #include <AtomsUtils/Globals.h>
3 #include <functional>
4 
5 namespace AtomsUtils
6 {
8  {
9  ParallelForRange() : _start(0), _end(0) {}
10  ParallelForRange(uint32_t s, uint32_t e) : _start(s), _end(e) {}
11  uint32_t _start;
12  uint32_t _end;
13  uint32_t begin() const { return _start; }
14  uint32_t end() const { return _end; }
15  };
16 #define TASK_PARTITION_EXTRA_ARGS
17 
18  //using parallel_for = TaskScheduler::parallel_for;
19  ATOMSUTILS_EXPORT void setParallelForDispatcher(const std::function<void(const ParallelForRange& rg, const std::function<void(const ParallelForRange&)>&)>& body);
20 
21  ATOMSUTILS_EXPORT void parallel_for(const ParallelForRange& rg, const std::function<void(const ParallelForRange&)>& body, const bool singleThread = false);
22 }
AtomsCore namespace.
Definition: Base64.h:13
Definition: TaskScheduler.h:8