Column-oriented GPU-accelerated Database Management System
CoGaDB
/home/sebastian/gpudbms/trunk/hype-library/include/core/specification.hpp
Go to the documentation of this file.
00001 
00002 #pragma once
00003 
00004 #include <config/global_definitions.hpp>
00005 #include <config/configuration.hpp>
00006 #include <core/time_measurement.hpp>
00007 #include <string>
00008 
00009 namespace hype{
00010         namespace core{
00011         
00012 
00013                 //ProcessingDeviceMemoryID getMemory(ProcessingDeviceID );
00014                 //std::vector<ProcessingDeviceID> getProcessingDevices(ProcessingDeviceMemoryID);
00015 
00024         class HYPE_EXPORT AlgorithmSpecification{
00025                 public:
00033                 AlgorithmSpecification(const std::string& alg_name,
00034                                                                           const std::string& op_name,
00035                                                                           StatisticalMethod stat_meth = Least_Squares_1D,
00036                                                                           RecomputationHeuristic recomp_heur = Periodic,
00037                     OptimizationCriterion opt_crit = Runtime_Configuration::instance().getDefaultOptimizationCriterion());
00041                 const std::string& getAlgorithmName() const throw();
00045                 const std::string& getOperationName() const throw();
00049                 const std::string getStatisticalMethodName() const throw();
00053                 const std::string getRecomputationHeuristicName() const throw();
00057                 const std::string getOptimizationCriterionName() const throw();         
00058                 private:
00060                 std::string alg_name_; 
00062                 std::string op_name_;
00064                 StatisticalMethod stat_meth_;
00066                 RecomputationHeuristic recomp_heur_;
00068                 OptimizationCriterion opt_crit_;
00069         };
00070 
00071 
00072         
00085         struct HYPE_EXPORT OperatorSpecification{
00086         public:
00093                 OperatorSpecification(const std::string& operator_name, 
00094                                                                          const Tuple& feature_vector,
00095                                                                          ProcessingDeviceMemoryID location_of_input_data,
00096                                                                          ProcessingDeviceMemoryID location_for_output_data);
00100                 const std::string& getOperatorName() const throw();
00104                 const Tuple& getFeatureVector() const throw();
00108                 ProcessingDeviceMemoryID getMemoryLocation() const throw();
00109                 private:
00111                 std::string operator_name_;
00113                 Tuple feature_vector_;
00115                 ProcessingDeviceMemoryID location_of_input_data_;
00117                 ProcessingDeviceMemoryID location_for_output_data_;
00118         };
00119 
00120         //member for each processing device
00131         struct HYPE_EXPORT DeviceSpecification{
00132                 public:
00138                 DeviceSpecification(ProcessingDeviceID pd,
00139                                                                   ProcessingDeviceType pd_t,
00140                                                                   ProcessingDeviceMemoryID pd_m);
00144                 ProcessingDeviceID getProcessingDeviceID() const throw();
00148                 ProcessingDeviceType getDeviceType() const throw();
00152                 ProcessingDeviceMemoryID getMemoryID() const throw();
00156                 operator ProcessingDeviceID(); 
00160                 operator ProcessingDeviceType();
00164                 operator ProcessingDeviceMemoryID();
00168                 bool operator== (const DeviceSpecification&) const;
00169                 
00170                 private:
00172                 ProcessingDeviceID pd_;
00174                 ProcessingDeviceType pd_t_;
00176                 ProcessingDeviceMemoryID pd_m_;
00177         };
00187         struct HYPE_EXPORT DeviceConstraint{
00188                 public:
00193                 DeviceConstraint(DeviceTypeConstraint dev_constr = ANY_DEVICE,
00194                                                           ProcessingDeviceMemoryID pd_mem_constr = PD_Memory_0);
00195 
00199                 DeviceTypeConstraint getDeviceTypeConstraint() const; 
00200 
00205                 operator DeviceTypeConstraint(); 
00210                 operator ProcessingDeviceMemoryID();
00215                 operator DeviceTypeConstraint() const; 
00220                 operator ProcessingDeviceMemoryID() const;              
00221                 private:
00223                 DeviceTypeConstraint dev_constr_;
00225                 ProcessingDeviceMemoryID pd_mem_constr_; //restrict to devices that use a certain memory
00226 
00227         };      
00228         
00229 
00230         }; //end namespace core
00231 }; //end namespace hype
00232 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines