Accelerated Computation Engine
|
#include <ace_analytic_chunk.h>
Public Member Functions | |
virtual bool | isFinished () const override final |
Chunk (quint16 type, int index, int size) | |
virtual | ~Chunk () override final |
![]() | |
quint16 | analyticType () const |
int | size () const |
EAbstractAnalytic::Input::Type | type (int index) const |
QVariant | data (int index, EAbstractAnalytic::Input::Role role) const |
QList< QString > | commandLineArguments () const |
void | set (int index, const QVariant &value) |
![]() | |
AbstractInput ()=default | |
~AbstractInput () | |
Protected Slots | |
virtual void | start () override final |
void | process () |
![]() | |
virtual void | start () |
Protected Member Functions | |
virtual QFile * | addOutputFile (const QString &path) override final |
virtual Ace::DataObject * | addOutputData (const QString &path, quint16 type, const EMetadata &system) override final |
virtual void | saveResult (std::unique_ptr< EAbstractAnalytic::Block > &&result) override final |
![]() | |
AbstractManager (quint16 type) | |
std::unique_ptr< EAbstractAnalytic::Block > | makeWork (int index) |
void | writeResult (std::unique_ptr< EAbstractAnalytic::Block > &&result, int expectedIndex) |
EAbstractAnalytic * | analytic () |
const EAbstractAnalytic * | analytic () const |
![]() | |
virtual int | index () const |
virtual void | writeResult (std::unique_ptr< EAbstractAnalytic::Block > &&result) |
Additional Inherited Members | |
![]() | |
void | initialize () |
void | terminationRequested () |
void | finish () |
![]() | |
void | progressed (int percentComplete) |
void | done () |
void | finished () |
![]() | |
static std::unique_ptr< Ace::Analytic::AbstractManager > | makeManager (quint16 type, int index, int size) |
This is the chunk run manager. This manager is used to execute only a portion of the blocks for an analytic, temporarily saving them in a binary file. The function of this class is to determine which part of the work blocks it must process into result blocks based off the index and size it is given. From there it processes the chunk of blocks and saved them into a temporary binary file. The location and file name of the chunk is determined by global settings and the index of this chunk manager.
|
explicit |
Constructs a new chunk manager with the given analytic type, chunk index, and chunk size.
type | The analytic type that is used. |
index | The chunk index for this process. |
size | The chunk size which is the total number of chunks the analytic is split into. |
|
finaloverridevirtual |
Deletes the qt data stream used for saved data to the chunk file.
|
finaloverrideprotectedvirtual |
This interface opens a new data object with the given path, erasing any data the file may have contained and returning a pointer to the new data object. This implementation does nothing and returns a null pointer because a chunk manager saved result blocks to a special binary file.
path | Unused path to data object file. |
type | Unused data object type. |
system | Unused system metadata for new data objects. |
Reimplemented from Ace::Analytic::AbstractManager.
|
finaloverrideprotectedvirtual |
Implements the interface that opens a new file set to write only and truncate with the given path. This implementation does nothing and returns a null pointer because a chunk manager saves result blocks to a special binary file.
path | Unused path to file. |
Reimplemented from Ace::Analytic::AbstractManager.
|
finaloverridevirtual |
Implements the interface that tests if this abstract input is finished and received all result blocks for its analytic. This implementation is special in that it only processes a chunk of its analytic work blocks therefore it is finished once it has received all of its portion of result blocks.
Implements Ace::Analytic::AbstractInput.
|
protectedslot |
Processes the work blocks this chunk manager is responsible for saving, adding them to this manager's abstract run object for processing.
|
finaloverrideprotectedvirtual |
Implements the interface that saves the given result block to its underlying analytic and assumes the order of indexes given is not sorted and random. This implementation simply saves the raw result block to a temporary binary file.
result | The result block that is saved to a temporary binary file. |
Reimplemented from Ace::Analytic::AbstractInput.
|
finaloverrideprotectedvirtualslot |
Implements the interface that is called once to begin the analytic run for this manager after all argument input has been set. This implementation initializes the chunk file, indexes, and schedules the process slot to be called.