Column-oriented GPU-accelerated Database Management System
CoGaDB
|
00001 00002 #pragma once 00003 00004 #include <core/specification.hpp> 00005 #include <core/scheduling_decision.hpp> 00006 #include <core/time_measurement.hpp> 00007 00008 #include <boost/shared_ptr.hpp> 00009 00010 namespace hype { 00011 namespace queryprocessing { 00012 00013 class Operator { 00014 public: 00015 bool operator() (); 00016 const hype::core::SchedulingDecision& getSchedulingDecision() const throw (); 00017 virtual ~Operator(); 00018 protected: 00019 Operator(const hype::core::SchedulingDecision& sched_dec); // : sched_dec_(sched_dec) {} 00020 public: 00021 const core::EstimatedTime getEstimatedExecutionTime() const throw (); 00022 00023 virtual double getRecursiveExecutionTimeInNanoseconds() = 0; 00024 00025 const std::string getAlgorithmName() const throw (); 00026 00027 const core::Tuple getFeatureValues() const throw (); 00028 00029 const core::DeviceSpecification getDeviceSpecification() const throw (); 00030 private: 00031 virtual bool execute() = 0; 00032 hype::core::SchedulingDecision sched_dec_; 00033 }; 00034 00035 00036 typedef boost::shared_ptr<Operator> OperatorPtr; 00037 00038 00039 00040 00041 /* 00042 template <typename Type> 00043 class TypedOperator : public Operator{ 00044 00045 typedef Type OperatorOutputType; 00046 00047 00048 TypedOperator(const stemod::SchedulingDecision& sched_dec, OperatorOutputType result) : Operator(sched_dec),result_(result){} 00049 00050 const OperatorOutputType getResult(){ 00051 this(); //execute Functor 00052 return result_; 00053 } 00054 00055 protected: 00056 OperatorOutputType result_; 00057 }; 00058 00059 00060 template <typename OperatorInputType,typename OperatorOutputType> 00061 class UnaryOperator : public TypedOperator<OperatorOutputType>{ //uses 1D Learning Method 00062 00063 UnaryOperator(OperatorInputType); 00064 00065 OperatorInputType getInputData(); 00066 00067 }; 00068 00069 template <typename OperatorInputType,typename OperatorOutputType> 00070 class BinaryOperator : public TypedOperator<OperatorOutputType>{ //uses 2D Learning Method 00071 00072 BinaryOperator(OperatorInputType); 00073 00074 OperatorInputType getInputDataLeftChild(); 00075 00076 OperatorInputType getInputDataRightChild(); 00077 00078 }; 00079 00080 00081 */ 00082 00083 00084 00085 //selectivity??? 00086 00087 }; //end namespace queryprocessing 00088 }; //end namespace hype