Accelerated Computation Engine
Classes | Public Member Functions | List of all members
Ace::Analytic::OpenCLRun Class Reference

#include <ace_analytic_openclrun.h>

Inheritance diagram for Ace::Analytic::OpenCLRun:
Ace::Analytic::AbstractRun

Classes

class  Thread
 

Public Member Functions

virtual void addWork (std::unique_ptr< EAbstractAnalytic::Block > &&block) override final
 
 OpenCLRun (EAbstractAnalytic::OpenCL *opencl, OpenCL::Device *device, AbstractInput *base, QObject *parent=nullptr)
 
virtual ~OpenCLRun () override final
 
- Public Member Functions inherited from Ace::Analytic::AbstractRun
 AbstractRun (QObject *parent=nullptr)
 

Additional Inherited Members

- Signals inherited from Ace::Analytic::AbstractRun
void finished ()
 

Detailed Description

This is an OpenCL analytic run that processes the blocks of an analytic using an OpenCL device with multiple threads using the device at once to process work blocks. This is a complicated analytic run that has its own subclass representing a thread that actually processes the work blocks into result blocks.

Constructor & Destructor Documentation

◆ OpenCLRun()

OpenCLRun::OpenCLRun ( EAbstractAnalytic::OpenCL opencl,
OpenCL::Device device,
AbstractInput base,
QObject *  parent = nullptr 
)
explicit

Constructs a new OpenCL run object with the given abstract OpenCL object, OpenCL device, abstract input object, and optional parent.

Parameters
openclPointer to the abstract OpenCL object used for creation abstract OpenCL blocks.
devicePointer to the OpenCL device utilized by this new OpenCL object.
basePointer to the abstract input object used to save results.
parentOptional parent for this new OpenCL run.

◆ ~OpenCLRun()

OpenCLRun::~OpenCLRun ( )
finaloverridevirtual

This deletes all threads this OpenCL run contains. The threads are not deleted until their thread has finished execution, blocking until that is the case. This is to prevent undefined behavior.

Member Function Documentation

◆ addWork()

void OpenCLRun::addWork ( std::unique_ptr< EAbstractAnalytic::Block > &&  block)
finaloverridevirtual

Implements the interface that is called to add a work block to be processed by this abstract run. This implementation waits until a thread is idle and then adding the given work block to the idle thread for execution. While this waits it is blocking.

Parameters
blockThe work block that is processed.

Implements Ace::Analytic::AbstractRun.


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