IterateKernel< Iterator, T > Class Template Reference
#include <qtconcurrentiteratekernel.h>
template<typename Iterator, typename T>
class QtConcurrent::IterateKernel< Iterator, T >
Definition at line 178 of file qtconcurrentiteratekernel.h.
|
| | IterateKernel (Iterator _begin, Iterator _end) |
| |
| virtual | ~IterateKernel () |
| |
| virtual bool | runIteration (Iterator it, int index, T *result) |
| |
| virtual bool | runIterations (Iterator _begin, int beginIndex, int endIndex, T *results) |
| |
| void | start () |
| |
| bool | shouldStartThread () |
| |
| ThreadFunctionResult | threadFunction () |
| |
| ThreadFunctionResult | forThreadFunction () |
| |
| ThreadFunctionResult | whileThreadFunction () |
| |
| virtual T * | result () |
| |
| QFutureInterface< T > * | futureInterfaceTyped () |
| |
| T * | startSingleThreaded () |
| |
| T * | startBlocking () |
| |
| QFuture< T > | startAsynchronously () |
| |
| void | asynchronousFinish () |
| |
| void | reportResult (const T *_result, int index=-1) |
| |
| void | reportResults (const QVector< T > &_result, int index=-1, int count=-1) |
| |
| | ThreadEngineBase () |
| |
| virtual | ~ThreadEngineBase () |
| |
| void | startSingleThreaded () |
| |
| void | startBlocking () |
| |
| void | startThread () |
| |
| bool | isCanceled () |
| |
| void | waitForResume () |
| |
| bool | isProgressReportingEnabled () |
| |
| void | setProgressValue (int progress) |
| |
| void | setProgressRange (int minimum, int maximum) |
| |
| void | acquireBarrierSemaphore () |
| |
| | QRunnable () |
| |
| virtual | ~QRunnable () |
| |
| bool | autoDelete () const |
| |
| void | setAutoDelete (bool _autoDelete) |
| |
Definition at line 183 of file qtconcurrentiteratekernel.h.
192 #if defined (QT_NO_STL)
bool selectIteration(std::bidirectional_iterator_tag)
bool progressReportingEnabled
| virtual bool runIteration |
( |
Iterator |
it, |
|
|
int |
index, |
|
|
T * |
result |
|
) |
| |
|
inlinevirtual |
Reimplemented in FilteredReducedKernel< ReducedResultType, Iterator, KeepFunctor, ReduceFunctor, Reducer >, MappedEachKernel< Iterator, MapFunctor >, MappedReducedKernel< ReducedResultType, Iterator, MapFunctor, ReduceFunctor, Reducer >, and MapKernel< Iterator, MapFunctor >.
Definition at line 202 of file qtconcurrentiteratekernel.h.
203 { Q_UNUSED(it); Q_UNUSED(
index); Q_UNUSED(
result);
return false; }
| virtual bool runIterations |
( |
Iterator |
_begin, |
|
|
int |
beginIndex, |
|
|
int |
endIndex, |
|
|
T * |
results |
|
) |
| |
|
inlinevirtual |
Reimplemented in FilteredReducedKernel< ReducedResultType, Iterator, KeepFunctor, ReduceFunctor, Reducer >, MappedEachKernel< Iterator, MapFunctor >, MappedReducedKernel< ReducedResultType, Iterator, MapFunctor, ReduceFunctor, Reducer >, and MapKernel< Iterator, MapFunctor >.
Definition at line 204 of file qtconcurrentiteratekernel.h.
205 { Q_UNUSED(_begin); Q_UNUSED(beginIndex); Q_UNUSED(endIndex); Q_UNUSED(results);
return false; }
| bool shouldStartThread |
( |
| ) |
|
|
inlinevirtual |
Definition at line 230 of file qtconcurrentiteratekernel.h.
233 ResultReporter<T> resultReporter(
this);
239 const int currentBlockSize = blockSizeManager.blockSize();
246 const int endIndex = qMin(beginIndex + currentBlockSize,
iterationCount);
248 if (beginIndex >= endIndex) {
258 const int finalBlockSize = endIndex - beginIndex;
259 resultReporter.reserveSpace(finalBlockSize);
262 blockSizeManager.timeBeforeUser();
263 const bool resultsAvailable = this->
runIterations(
begin, beginIndex, endIndex, resultReporter.getPointer());
264 blockSizeManager.timeAfterUser();
266 if (resultsAvailable)
267 resultReporter.reportResults(beginIndex);
void setProgressValue(int progress)
int fetchAndAddAcquire(int valueToAdd)
bool progressReportingEnabled
virtual bool shouldThrottleThread()
virtual bool runIterations(Iterator _begin, int beginIndex, int endIndex, T *results)
int fetchAndAddRelease(int valueToAdd)
Definition at line 281 of file qtconcurrentiteratekernel.h.
286 ResultReporter<T> resultReporter(
this);
287 resultReporter.reserveSpace(1);
303 const bool resultAavailable = this->
runIteration(prev, index, resultReporter.getPointer());
304 if (resultAavailable)
305 resultReporter.reportResults(index);
bool testAndSetRelease(int expectedValue, int newValue)
int fetchAndAddRelaxed(int valueToAdd)
virtual bool runIteration(Iterator it, int index, T *result)
bool testAndSetAcquire(int expectedValue, int newValue)
QAtomicInt iteratorThreads
virtual bool shouldThrottleThread()
| bool progressReportingEnabled |
The documentation for this class was generated from the following file: