diff options
Diffstat (limited to 'src/concurrent/qtconcurrentmapkernel.h')
-rw-r--r-- | src/concurrent/qtconcurrentmapkernel.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/concurrent/qtconcurrentmapkernel.h b/src/concurrent/qtconcurrentmapkernel.h index fa162f7c34..e8df668791 100644 --- a/src/concurrent/qtconcurrentmapkernel.h +++ b/src/concurrent/qtconcurrentmapkernel.h @@ -42,7 +42,7 @@ #include <QtConcurrent/qtconcurrent_global.h> -#ifndef QT_NO_CONCURRENT +#if !defined(QT_NO_CONCURRENT) || defined (Q_CLANG_QDOC) #include <QtConcurrent/qtconcurrentiteratekernel.h> #include <QtConcurrent/qtconcurrentreducekernel.h> @@ -50,7 +50,6 @@ QT_BEGIN_NAMESPACE -#ifndef Q_QDOC namespace QtConcurrent { // map kernel, works with both parallel-for and parallel-while @@ -191,12 +190,14 @@ public: } }; +//! [qtconcurrentmapkernel-1] template <typename Iterator, typename Functor> inline ThreadEngineStarter<void> startMap(Iterator begin, Iterator end, Functor functor) { return startThreadEngine(new MapKernel<Iterator, Functor>(begin, end, functor)); } +//! [qtconcurrentmapkernel-2] template <typename T, typename Iterator, typename Functor> inline ThreadEngineStarter<T> startMapped(Iterator begin, Iterator end, Functor functor) { @@ -225,6 +226,7 @@ struct SequenceHolder1 : public Base } }; +//! [qtconcurrentmapkernel-3] template <typename T, typename Sequence, typename Functor> inline ThreadEngineStarter<T> startMapped(const Sequence &sequence, Functor functor) { @@ -235,6 +237,7 @@ inline ThreadEngineStarter<T> startMapped(const Sequence &sequence, Functor func return startThreadEngine(new SequenceHolderType(sequence, functor)); } +//! [qtconcurrentmapkernel-4] template <typename IntermediateType, typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor> inline ThreadEngineStarter<ResultType> startMappedReduced(const Sequence & sequence, MapFunctor mapFunctor, ReduceFunctor reduceFunctor, @@ -247,6 +250,7 @@ inline ThreadEngineStarter<ResultType> startMappedReduced(const Sequence & seque return startThreadEngine(new SequenceHolderType(sequence, mapFunctor, reduceFunctor, options)); } +//! [qtconcurrentmapkernel-5] template <typename IntermediateType, typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor> inline ThreadEngineStarter<ResultType> startMappedReduced(Iterator begin, Iterator end, MapFunctor mapFunctor, ReduceFunctor reduceFunctor, @@ -259,7 +263,6 @@ inline ThreadEngineStarter<ResultType> startMappedReduced(Iterator begin, Iterat } // namespace QtConcurrent -#endif //Q_QDOC QT_END_NAMESPACE |