Column-oriented GPU-accelerated Database Management System
CoGaDB
hype::core::Operation Class Reference

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>

Collaboration diagram for hype::core::Operation:

List of all members.

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< AlgorithmPtrgetAlgorithms ()
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_

Detailed Description

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.

Author:
Sebastian Breß
Version:
0.1
Date:
2012

Member Typedef Documentation

typedef std::map<std::string,std::tr1::shared_ptr<Algorithm> > hype::core::Operation::MapNameToAlgorithm

Constructor & Destructor Documentation

hype::core::Operation::Operation ( const std::string &  name)

Member Function Documentation

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)
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 ()
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::removeAlgorithm ( const std::string &  name)
bool hype::core::Operation::setNewOptimizationCriterion ( const std::string &  name_of_optimization_criterion)

Member Data Documentation

std::string hype::core::Operation::name_ [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines