Definition at line 164 of file qtconcurrentfilterkernel.h.
#include <qtconcurrentfilterkernel.h>

Public Types |
|
| typedef ReducedResultType | ReturnType |
| typedef ReducedResultType | ResultType |
Public Member Functions |
|
| FilteredReducedKernel (Iterator begin, Iterator end, KeepFunctor _keep, ReduceFunctor _reduce, ReduceOptions reduceOption) | |
| bool | runIteration (Iterator it, int index, ReducedResultType *) |
| bool | runIterations (Iterator sequenceBeginIterator, int begin, int end, ReducedResultType *) |
| void | finish () |
| bool | shouldThrottleThread () |
| bool | shouldStartThread () |
| ReducedResultType * | result () |
| typedef ReducedResultType ReturnType |
Definition at line 237 of file qtconcurrentfilterkernel.h.
| typedef ReducedResultType ResultType |
Reimplemented from IterateKernel< Iterator, ReducedResultType >.
Definition at line 238 of file qtconcurrentfilterkernel.h.
| FilteredReducedKernel | ( | Iterator | begin, |
| Iterator | end, | ||
| KeepFunctor | _keep, | ||
| ReduceFunctor | _reduce, | ||
| ReduceOptions | reduceOption | ||
| ) | [inline] |
Definition at line 173 of file qtconcurrentfilterkernel.h.
| bool runIteration | ( | Iterator | it, |
| int | index, | ||
| ReducedResultType * | |||
| ) | [inline, virtual] |
Reimplemented from IterateKernel< Iterator, ReducedResultType >.
Definition at line 190 of file qtconcurrentfilterkernel.h.
{
IntermediateResults<typename qValueType<Iterator>::value_type> results;
results.begin = index;
results.end = index + 1;
if (keep(*it))
results.vector.append(*it);
reducer.runReduce(reduce, reducedResult, results);
return false;
}
| bool runIterations | ( | Iterator | sequenceBeginIterator, |
| int | begin, | ||
| int | end, | ||
| ReducedResultType * | |||
| ) | [inline, virtual] |
Reimplemented from IterateKernel< Iterator, ReducedResultType >.
Definition at line 203 of file qtconcurrentfilterkernel.h.
{
IntermediateResults<typename qValueType<Iterator>::value_type> results;
results.begin = begin;
results.end = end;
results.vector.reserve(end - begin);
Iterator it = sequenceBeginIterator;
advance(it, begin);
for (int i = begin; i < end; ++i) {
if (keep(*it))
results.vector.append(*it);
advance(it, 1);
}
reducer.runReduce(reduce, reducedResult, results);
return false;
}
| void finish | ( | ) | [inline, virtual] |
Reimplemented from ThreadEngineBase.
Definition at line 222 of file qtconcurrentfilterkernel.h.
{
reducer.finish(reduce, reducedResult);
}
| bool shouldThrottleThread | ( | ) | [inline, virtual] |
Reimplemented from ThreadEngineBase.
Definition at line 227 of file qtconcurrentfilterkernel.h.
{
return IterateKernelType::shouldThrottleThread() || reducer.shouldThrottle();
}
| bool shouldStartThread | ( | ) | [inline, virtual] |
Reimplemented from IterateKernel< Iterator, ReducedResultType >.
Definition at line 232 of file qtconcurrentfilterkernel.h.
{
return IterateKernelType::shouldStartThread() && reducer.shouldStartThread();
}
| ReducedResultType* result | ( | ) | [inline, virtual] |
Reimplemented from ThreadEngine< ReducedResultType >.
Definition at line 239 of file qtconcurrentfilterkernel.h.
{
return &reducedResult;
}