9 #ifndef __MRPT_PARALLELIZATION_H
10 #define __MRPT_PARALLELIZATION_H
12 #include <mrpt/config.h>
19 #include <tbb/tbb_stddef.h>
20 #if TBB_VERSION_MAJOR*100 + TBB_VERSION_MINOR >= 202
27 #define MRPT_HAS_TBB 0
38 typedef tbb::blocked_range<int> BlockedRange;
40 template<
typename Body>
static inline
41 void parallel_for(
const BlockedRange& range,
const Body& body )
46 template<
typename Iterator,
typename Body>
static inline
47 void parallel_do( Iterator first, Iterator last,
const Body& body )
52 typedef tbb::split Split;
54 template<
typename Body>
static inline
75 template<
typename Body>
static inline
82 template<
typename Iterator,
typename Body>
static inline
83 void parallel_do( Iterator first, Iterator last,
const Body& body )
85 for( ; first != last; ++first )
91 template<
typename Body>
static inline
97 #endif // MRPT_HAS_TBB
static void parallel_do(Iterator first, Iterator last, const Body &body)
BlockedRange(int b, int e, int g=1)
std::vector< Rect > ConcurrentRectVector
static void parallel_reduce(const BlockedRange &range, Body &body)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static void parallel_for(const BlockedRange &range, const Body &body)