Accelerated Computation Engine
Public Member Functions | Protected Member Functions | List of all members
Ace::Analytic::AbstractInput Class Referenceabstract

#include <ace_analytic_abstractinput.h>

Inheritance diagram for Ace::Analytic::AbstractInput:
Ace::Analytic::Chunk Ace::Analytic::Merge Ace::Analytic::MPIMaster Ace::Analytic::MPISlave Ace::Analytic::Single

Public Member Functions

virtual bool isFinished () const =0
 
virtual void saveResult (std::unique_ptr< EAbstractAnalytic::Block > &&result)
 
 AbstractInput ()=default
 
 ~AbstractInput ()
 

Protected Member Functions

virtual int index () const
 
virtual void writeResult (std::unique_ptr< EAbstractAnalytic::Block > &&result)
 

Detailed Description

This represents the input side an an analytic run which is used by the abstract run for saving result blocks it produces. An implementation of this class must implement interfaces for save result or write result. If write result is defined and save result is not then index must be defined. An implementation must also signal when it is has received all result blocks for the analytic and is finished. This class offers a sorting hopper with the default definition of the save result interface. This class is not a qt object because implementations of this class must also inherit the abstract manager class.

Constructor & Destructor Documentation

◆ AbstractInput()

Ace::Analytic::AbstractInput::AbstractInput ( )
default

Constructs a new abstract input with an default empty hopper.

◆ ~AbstractInput()

AbstractInput::~AbstractInput ( )

Deletes all result blocks contained by this object's hopper.

Member Function Documentation

◆ index()

int AbstractInput::index ( ) const
protectedvirtual

This interface returns the next expected result block index to maintain order of result blocks. The default implementation throws an exception as this must be implemented if the save result interface is not implemented.

Returns
The next expected result block index to maintain order.

Reimplemented in Ace::Analytic::MPIMaster, Ace::Analytic::Single, and Ace::Analytic::Merge.

◆ isFinished()

virtual bool Ace::Analytic::AbstractInput::isFinished ( ) const
pure virtual

This interface tests if this abstract input is finished and received all result blocks for its analytic.

Returns
True if this abstract input is finished or false otherwise.

Implemented in Ace::Analytic::MPISlave, Ace::Analytic::Chunk, Ace::Analytic::MPIMaster, Ace::Analytic::Single, and Ace::Analytic::Merge.

◆ saveResult()

void AbstractInput::saveResult ( std::unique_ptr< EAbstractAnalytic::Block > &&  result)
virtual

This interface saves the given result block to its underlying analytic and assumes the order of indexes given is not sorted and random. The default implementation of this interface uses this object's internal hopper to sort the given result blocks and calling the write result interface with the result blocks being ordered by index from least to greatest.

Parameters
resultThe result block that is saved to the underlying analytic.

Reimplemented in Ace::Analytic::MPISlave, and Ace::Analytic::Chunk.

◆ writeResult()

void AbstractInput::writeResult ( std::unique_ptr< EAbstractAnalytic::Block > &&  result)
protectedvirtual

This interface is called to save the given result block to the underlying analytic and it can be assumed that the index order is maintained from least to greatest. The default implementation throws an exception as this must be implemented if the save result interface is not implemented.

Parameters
resultThe result block that is saved to the underlying analytic.

Reimplemented in Ace::Analytic::MPIMaster, Ace::Analytic::Single, and Ace::Analytic::Merge.


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