Pass the thread pool into ReduceKernel
This was overlooked when enabling setting a custom thread pool for various concurrent methods. Fixes: QTBUG-53465 Change-Id: I189a7776fa02bbc3e995538cc154a7246ad1ad7a Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This commit is contained in:
parent
9aea74f2c6
commit
eb5d8efc51
@ -93,7 +93,7 @@ public:
|
||||
sequence(_sequence),
|
||||
keep(_keep),
|
||||
reduce(_reduce),
|
||||
reducer(OrderedReduce)
|
||||
reducer(pool, OrderedReduce)
|
||||
{ }
|
||||
|
||||
bool runIteration(typename Sequence::const_iterator it, int index, T *) override
|
||||
@ -173,7 +173,7 @@ public:
|
||||
ReduceFunctor _reduce,
|
||||
ReduceOptions reduceOption)
|
||||
: IterateKernelType(pool, begin, end), reducedResult(), keep(_keep), reduce(_reduce),
|
||||
reducer(reduceOption)
|
||||
reducer(pool, reduceOption)
|
||||
{ }
|
||||
|
||||
FilteredReducedKernel(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor _keep,
|
||||
@ -183,7 +183,7 @@ public:
|
||||
reducedResult(std::forward<ReducedResultType>(initialValue)),
|
||||
keep(_keep),
|
||||
reduce(_reduce),
|
||||
reducer(reduceOption)
|
||||
reducer(pool, reduceOption)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
MappedReducedKernel(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor _map,
|
||||
ReduceFunctor _reduce, ReduceOptions reduceOptions)
|
||||
: IterateKernel<Iterator, ReducedResultType>(pool, begin, end), reducedResult(),
|
||||
map(_map), reduce(_reduce), reducer(reduceOptions)
|
||||
map(_map), reduce(_reduce), reducer(pool, reduceOptions)
|
||||
{ }
|
||||
|
||||
MappedReducedKernel(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor _map,
|
||||
@ -113,7 +113,7 @@ public:
|
||||
reducedResult(std::forward<ReducedResultType>(initialValue)),
|
||||
map(_map),
|
||||
reduce(_reduce),
|
||||
reducer(reduceOptions)
|
||||
reducer(pool, reduceOptions)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -140,9 +140,9 @@ class ReduceKernel
|
||||
}
|
||||
|
||||
public:
|
||||
ReduceKernel(ReduceOptions _reduceOptions)
|
||||
ReduceKernel(QThreadPool *pool, ReduceOptions _reduceOptions)
|
||||
: reduceOptions(_reduceOptions), progress(0), resultsMapSize(0),
|
||||
threadCount(QThreadPool::globalInstance()->maxThreadCount())
|
||||
threadCount(pool->maxThreadCount())
|
||||
{ }
|
||||
|
||||
void runReduce(ReduceFunctor &reduce,
|
||||
|
Loading…
x
Reference in New Issue
Block a user