Accelerated Computation Engine
|
#include <ace_analytic_openclrun_thread.h>
Signals | |
void | blockFinished () |
Public Member Functions | |
Thread (std::unique_ptr< EAbstractAnalytic::OpenCL::Worker > &&worker, QObject *parent=nullptr) | |
void | execute (std::unique_ptr< EAbstractAnalytic::Block > &&block) |
std::unique_ptr< EAbstractAnalytic::Block > | result () |
Protected Member Functions | |
virtual void | run () override final |
This is a single thread of execution used by its parent OpenCL run class to process work blocks into result blocks. The execution of this processing is done on a separate thread t enhance speed. An abstract OpenCL worker object is used for actual processing using an OpenCL device for acceleration.
|
explicit |
void OpenCLRun::Thread::execute | ( | std::unique_ptr< EAbstractAnalytic::Block > && | block | ) |
Executes the processing of the given work block on a separate thread from the one called this method. This returns immediately after starting the separate thread. If this thread already contains a result block then an exception is thrown.
block | The work block that is processed on a separate thread. |
std::unique_ptr< EAbstractAnalytic::Block > OpenCLRun::Thread::result | ( | ) |
Returns the result block produces on this object's separate thread after finishing. If the separate thread threw an exception that exception is thrown again on the thread calling this method. If there is not result block an exception is also thrown.
|
finaloverrideprotectedvirtual |
Executes this object's saved work block on its separate thread, saving the result block. If any exception is thrown within this separate thread it is caught and saved.