Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor > Class Template Reference

\inmodule QtConcurrent More...

#include <qtconcurrentfilterkernel.h>

+ Inheritance diagram for QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >:
+ Collaboration diagram for QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >:

Public Types

typedef void ReturnType
 
typedef void ResultType
 
- Public Types inherited from QtConcurrent::IterateKernel< Sequence::const_iterator, void >
typedef void ResultType
 
- Public Types inherited from QtConcurrent::ThreadEngine< T >
typedef T ResultType
 
- Public Types inherited from QRunnable
template<typename Callable >
using if_callable = std::enable_if_t<std::is_invocable_r_v<void, Callable>, bool>
 

Public Member Functions

template<typename Keep = KeepFunctor, typename Reduce = ReduceFunctor>
 FilterKernel (QThreadPool *pool, Sequence &_sequence, Keep &&_keep, Reduce &&_reduce)
 
bool runIteration (typename Sequence::const_iterator it, int index, T *) override
 
bool runIterations (typename Sequence::const_iterator sequenceBeginIterator, int begin, int end, T *) override
 
void finish () override
 
bool shouldThrottleThread () override
 
bool shouldStartThread () override
 
- Public Member Functions inherited from QtConcurrent::IterateKernel< Sequence::const_iterator, void >
 IterateKernel (QThreadPool *pool, Sequence::const_iterator _begin, Sequence::const_iterator _end)
 
 IterateKernel (QThreadPool *pool, Sequence::const_iterator _begin, Sequence::const_iterator _end)
 
 IterateKernel (QThreadPool *pool, Sequence::const_iterator _begin, Sequence::const_iterator _end, U &&_defaultValue)
 
virtual ~IterateKernel ()
 
virtual bool runIteration (Sequence::const_iterator, int, void *)
 
virtual bool runIterations (Sequence::const_iterator, int, int, void *)
 
void start () override
 
bool shouldStartThread () override
 
ThreadFunctionResult threadFunction () override
 
ThreadFunctionResult forThreadFunction ()
 
ThreadFunctionResult whileThreadFunction ()
 
- Public Member Functions inherited from QtConcurrent::ThreadEngine< T >
 ThreadEngine (QThreadPool *pool)
 
virtual T * result ()
 
QFutureInterface< T > * futureInterfaceTyped ()
 
T * startSingleThreaded ()
 
QFuture< T > startAsynchronously ()
 
void asynchronousFinish () override
 
void reportResult (const T *_result, int index=-1)
 
void reportResults (const QList< T > &_result, int index=-1, int count=-1)
 
- Public Member Functions inherited from QtConcurrent::ThreadEngineBase
 ThreadEngineBase (QThreadPool *pool)
 
virtual ~ThreadEngineBase ()
 
void startSingleThreaded ()
 
void startThread ()
 
bool isCanceled ()
 
void waitForResume ()
 
bool isProgressReportingEnabled ()
 
void setProgressValue (int progress)
 
void setProgressRange (int minimum, int maximum)
 
void acquireBarrierSemaphore ()
 
void reportIfSuspensionDone () const
 
- Public Member Functions inherited from QRunnable
constexpr QRunnable () noexcept=default
 Constructs a QRunnable.
 
virtual ~QRunnable ()
 QRunnable virtual destructor.
 
bool autoDelete () const
 Returns true is auto-deletion is enabled; false otherwise.
 
void setAutoDelete (bool autoDelete)
 Enables auto-deletion if autoDelete is true; otherwise auto-deletion is disabled.
 
template<typename Callable , if_callable< Callable > = true>
 QGenericRunnable (Callable &&c)
 
 ~QGenericRunnable () override
 
void run () override
 

Additional Inherited Members

- Static Public Member Functions inherited from QRunnable
template<typename Callable , if_callable< Callable > = true>
static QRunnablecreate (Callable &&functionToRun)
 
static QRunnablecreate (std::nullptr_t)=delete
 
- Public Attributes inherited from QtConcurrent::IterateKernel< Sequence::const_iterator, void >
const Sequence::const_iterator begin
 
const Sequence::const_iterator end
 
Sequence::const_iterator current
 
QAtomicInt currentIndex
 
QAtomicInt iteratorThreads
 
QAtomicInt completed
 
const int iterationCount
 
const bool forIteration
 
bool progressReportingEnabled
 
DefaultValueContainer< ResultTypedefaultValue
 
- Protected Attributes inherited from QtConcurrent::ThreadEngineBase
QFutureInterfaceBasefutureInterface
 
QThreadPoolthreadPool
 
ThreadEngineBarrier barrier
 
QtPrivate::ExceptionStore exceptionStore
 
QBasicMutex mutex
 

Detailed Description

template<typename Sequence, typename KeepFunctor, typename ReduceFunctor>
class QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >

\inmodule QtConcurrent

Definition at line 41 of file qtconcurrentfilterkernel.h.

Member Typedef Documentation

◆ ResultType

template<typename Sequence , typename KeepFunctor , typename ReduceFunctor >
typedef void QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >::ResultType

Definition at line 114 of file qtconcurrentfilterkernel.h.

◆ ReturnType

template<typename Sequence , typename KeepFunctor , typename ReduceFunctor >
typedef void QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >::ReturnType

Definition at line 113 of file qtconcurrentfilterkernel.h.

Constructor & Destructor Documentation

◆ FilterKernel()

template<typename Sequence , typename KeepFunctor , typename ReduceFunctor >
template<typename Keep = KeepFunctor, typename Reduce = ReduceFunctor>
QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >::FilterKernel ( QThreadPool * pool,
Sequence & _sequence,
Keep && _keep,
Reduce && _reduce )
inline

Definition at line 55 of file qtconcurrentfilterkernel.h.

Member Function Documentation

◆ finish()

template<typename Sequence , typename KeepFunctor , typename ReduceFunctor >
void QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >::finish ( )
inlineoverridevirtual

Reimplemented from QtConcurrent::ThreadEngineBase.

Definition at line 97 of file qtconcurrentfilterkernel.h.

References QtConcurrent::ReduceKernel< ReduceFunctor, ReduceResultType, T >::finish().

+ Here is the call graph for this function:

◆ runIteration()

template<typename Sequence , typename KeepFunctor , typename ReduceFunctor >
bool QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >::runIteration ( typename Sequence::const_iterator it,
int index,
T *  )
inlineoverride

Definition at line 64 of file qtconcurrentfilterkernel.h.

References QList< T >::append(), QList< T >::begin(), QList< T >::end(), it, results, and QtConcurrent::ReduceKernel< ReduceFunctor, ReduceResultType, T >::runReduce().

+ Here is the call graph for this function:

◆ runIterations()

template<typename Sequence , typename KeepFunctor , typename ReduceFunctor >
bool QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >::runIterations ( typename Sequence::const_iterator sequenceBeginIterator,
int begin,
int end,
T *  )
inlineoverride

◆ shouldStartThread()

template<typename Sequence , typename KeepFunctor , typename ReduceFunctor >
bool QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >::shouldStartThread ( )
inlineoverridevirtual

Reimplemented from QtConcurrent::ThreadEngineBase.

Definition at line 108 of file qtconcurrentfilterkernel.h.

References QtConcurrent::ReduceKernel< ReduceFunctor, ReduceResultType, T >::shouldStartThread().

+ Here is the call graph for this function:

◆ shouldThrottleThread()

template<typename Sequence , typename KeepFunctor , typename ReduceFunctor >
bool QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >::shouldThrottleThread ( )
inlineoverridevirtual

Reimplemented from QtConcurrent::ThreadEngineBase.

Definition at line 103 of file qtconcurrentfilterkernel.h.

References QtConcurrent::ReduceKernel< ReduceFunctor, ReduceResultType, T >::shouldThrottle().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: