Column-oriented GPU-accelerated Database Management System
CoGaDB
|
Base class for all optimization criterions. More...
#include <optimization_criterion.hpp>
Public Member Functions | |
const SchedulingDecision | getOptimalAlgorithm (const Tuple &input_values, Operation &op, DeviceTypeConstraint dev_constr) |
gets a Scheduling Decision with the algorithm that is (likely to be) optimal w.r.t. to an optimization criterion | |
const std::string & | getName () const |
returns the name of the OptimizationCriterion | |
virtual | ~OptimizationCriterion_Internal () |
Destructor is virtual, because OptimizationCriterion is intended to be a base class. | |
Protected Member Functions | |
OptimizationCriterion_Internal (const std::string &name_of_optimization_criterion, const std::string &name_of_operation) | |
constructor of class | |
Protected Attributes | |
std::map< std::string, unsigned int > | map_algorithmname_to_number_of_executions_ |
map that keeps track which algorithms were decided for how often | |
Private Member Functions | |
virtual const SchedulingDecision | getOptimalAlgorithm_internal (const Tuple &input_values, Operation &op, DeviceTypeConstraint dev_constr)=0 |
this function is called by getOptimalAlgorithm() to ensure an easy extensibility of the library | |
Private Attributes | |
std::string | name_of_optimization_criterion_ |
stores name of optimization criterion, which is represented by this object | |
std::string | name_of_operation_ |
stores the name of the operation, where this OptimizationCriterion belongs to |
Base class for all optimization criterions.
OptimizationCriterion enables the user to choose a (likely) optimal algorithm for an operation w.r.t. the features of the dataset to process, which are stored in a Tuple object. The internal function getOptimalAlgorithm_internal() has to be implemented by derived classes.
virtual hype::core::OptimizationCriterion_Internal::~OptimizationCriterion_Internal | ( | ) | [virtual] |
Destructor is virtual, because OptimizationCriterion is intended to be a base class.
hype::core::OptimizationCriterion_Internal::OptimizationCriterion_Internal | ( | const std::string & | name_of_optimization_criterion, |
const std::string & | name_of_operation | ||
) | [protected] |
constructor of class
name_of_optimization_criterion | Name of the optimization criterion |
name_of_operation | name of the operation, where this OptimizationCriterion belongs to |
const std::string& hype::core::OptimizationCriterion_Internal::getName | ( | ) | const |
returns the name of the OptimizationCriterion
const SchedulingDecision hype::core::OptimizationCriterion_Internal::getOptimalAlgorithm | ( | const Tuple & | input_values, |
Operation & | op, | ||
DeviceTypeConstraint | dev_constr | ||
) |
gets a Scheduling Decision with the algorithm that is (likely to be) optimal w.r.t. to an optimization criterion
calls the pure virtual function getOptimalAlgorithm_internal() to ensure functional correctness on one hand (by implementing features that would have to be reimplemented by the user) and extensibility on the othere hand, meaning a derived class can implement an arbitraty heuristic that tries to optimze for a certain optimization criterion.
input_values | features of the input data set that is to process by Operation op |
op | a reference to the operation to perfrom on a data et |
virtual const SchedulingDecision hype::core::OptimizationCriterion_Internal::getOptimalAlgorithm_internal | ( | const Tuple & | input_values, |
Operation & | op, | ||
DeviceTypeConstraint | dev_constr | ||
) | [private, pure virtual] |
this function is called by getOptimalAlgorithm() to ensure an easy extensibility of the library
has to be implemented by derived classes
\return |
Implemented in hype::core::ProbabilityBasedOutsourcing, hype::core::ResponseTime, hype::core::WaitingTimeAwareResponseTime, hype::core::SimpleRoundRobin, hype::core::Throughput, and hype::core::Throughput2.
std::map<std::string,unsigned int> hype::core::OptimizationCriterion_Internal::map_algorithmname_to_number_of_executions_ [protected] |
map that keeps track which algorithms were decided for how often
through algorithms have a statistic for that, it is not up to date during runtime, since there are algorithms in execution, which have not yet terminated This can lead to a burst execution of operations with one algorithm. This map helps to avoid this by keeping track on the number of DECITIONS for each algorithm
std::string hype::core::OptimizationCriterion_Internal::name_of_operation_ [private] |
stores the name of the operation, where this OptimizationCriterion belongs to
std::string hype::core::OptimizationCriterion_Internal::name_of_optimization_criterion_ [private] |
stores name of optimization criterion, which is represented by this object