Column-oriented GPU-accelerated Database Management System
CoGaDB
|
This class represents an operation, which abstracts from algorithms and summarizes them under an abstract task, like sorting, join, selection, projection etc. More...
#include <operation.hpp>
Public Types | |
typedef std::map< std::string, std::tr1::shared_ptr < Algorithm > > | MapNameToAlgorithm |
Public Member Functions | |
Operation (const std::string &name) | |
~Operation () | |
bool | addAlgorithm (const std::string &name_of_algorithm, DeviceSpecification comp_dev, const std::string &name_of_statistical_method, const std::string &name_of_recomputation_strategy) |
void | removeAlgorithm (const std::string &name) |
const SchedulingDecision | getOptimalAlgorithm (const Tuple &input_values, DeviceTypeConstraint dev_constr=ANY_DEVICE) |
bool | hasAlgorithm (const std::string &name_of_algorithm) |
returns true if an algrithm named "name_of_algorithm" is registered for this operation and false otherwise | |
const AlgorithmPtr | getAlgorithm (const std::string &name_of_algorithm) |
bool | setNewOptimizationCriterion (const std::string &name_of_optimization_criterion) |
bool | addObservation (const std::string &name_of_algorithm, const MeasurementPair &mp) |
const std::vector< AlgorithmPtr > | getAlgorithms () |
const std::map< double, std::string > | getEstimatedExecutionTimesforAlgorithms (const Tuple &input_values) |
const std::string | getName () const throw () |
void | incrementNumberOfRightDecisions () throw () |
void | incrementNumberOfTotalDecisions () throw () |
uint64_t | getNextTimestamp () throw () |
uint64_t | getCurrentTimestamp () const throw () |
Private Attributes | |
MapNameToAlgorithm | map_algorithmname_to_pointer_ |
std::tr1::shared_ptr < OptimizationCriterion_Internal > | ptr_to_optimization_criterion_ |
std::string | name_ |
unsigned int | number_of_right_decisions_ |
unsigned int | number_of_total_decisions_ |
uint64_t | logical_time_ |
This class represents an operation, which abstracts from algorithms and summarizes them under an abstract task, like sorting, join, selection, projection etc.
An operation gets assigned two things. First is a list of algorithms, which represent the set of algorithms available to process operation O, which is basically the algorithm pool of the decision model. Second is an optimization_criterion, which is implemented by drived classes of stemod::core::OptimizationCriterion. The optimization criterion takes the computed estimated execution times of each algorithm and decides on the optimal algorithm, where the user specifies what is optimal by specifying an OptimizationCriterion.
Note that the stemod::core::OptimizationCriterioc can be exchanged at run-time, because the Operation class uses the pointer to implementation technique (or pimpl-idiom). This makes it highly adaptable.
typedef std::map<std::string,std::tr1::shared_ptr<Algorithm> > hype::core::Operation::MapNameToAlgorithm |
hype::core::Operation::Operation | ( | const std::string & | name | ) |
bool hype::core::Operation::addAlgorithm | ( | const std::string & | name_of_algorithm, |
DeviceSpecification | comp_dev, | ||
const std::string & | name_of_statistical_method, | ||
const std::string & | name_of_recomputation_strategy | ||
) |
bool hype::core::Operation::addObservation | ( | const std::string & | name_of_algorithm, |
const MeasurementPair & | mp | ||
) |
const AlgorithmPtr hype::core::Operation::getAlgorithm | ( | const std::string & | name_of_algorithm | ) |
const std::vector<AlgorithmPtr> hype::core::Operation::getAlgorithms | ( | ) |
uint64_t hype::core::Operation::getCurrentTimestamp | ( | ) | const throw () |
const std::map<double,std::string> hype::core::Operation::getEstimatedExecutionTimesforAlgorithms | ( | const Tuple & | input_values | ) |
const std::string hype::core::Operation::getName | ( | ) | const throw () |
uint64_t hype::core::Operation::getNextTimestamp | ( | ) | throw () |
const SchedulingDecision hype::core::Operation::getOptimalAlgorithm | ( | const Tuple & | input_values, |
DeviceTypeConstraint | dev_constr = ANY_DEVICE |
||
) |
bool hype::core::Operation::hasAlgorithm | ( | const std::string & | name_of_algorithm | ) |
returns true if an algrithm named "name_of_algorithm" is registered for this operation and false otherwise
void hype::core::Operation::incrementNumberOfRightDecisions | ( | ) | throw () |
void hype::core::Operation::incrementNumberOfTotalDecisions | ( | ) | throw () |
void hype::core::Operation::removeAlgorithm | ( | const std::string & | name | ) |
bool hype::core::Operation::setNewOptimizationCriterion | ( | const std::string & | name_of_optimization_criterion | ) |
uint64_t hype::core::Operation::logical_time_ [private] |
std::string hype::core::Operation::name_ [private] |
unsigned int hype::core::Operation::number_of_right_decisions_ [private] |
unsigned int hype::core::Operation::number_of_total_decisions_ [private] |
std::tr1::shared_ptr<OptimizationCriterion_Internal> hype::core::Operation::ptr_to_optimization_criterion_ [private] |