Hybrid Query Processing Engine for Coprocessing in Database Systems
HyPE
Extend HyPE

Statistical Methods

HyPE learns the correlation between features of the input data set and the resulting execution time of an algorithm on a specific processing device. To allow the user to fine tune the statistical method, HyPE provides a plug-in architecture, where the user can choose either from the set of implemented statistical methods, or alternatively, implement and integrate the preferred statistical method in HyPE.

To create a new statistical method, the user has to inherit from the abstract base class hype::core::StatisticalMethod and implement its pure virtual methods. Since HyPE uses a plug-in architecture based on factories, a static member function create should be defined, which returns a pointer to a new instance of your new statistical method (e.g., Least_Squares_Method_1D).

#include <core/statistical_method.hpp>

namespace hype{
   namespace core{

      class Least_Squares_Method_1D : public StatisticalMethod {
      public:
         Least_Squares_Method_1D(); 

         virtual const EstimatedTime computeEstimation(const Tuple& input_values);

         virtual bool recomuteApproximationFunction(Algorithm& algorithm);

         virtual bool inTrainingPhase() const throw();

         virtual void retrain();

         static Least_Squares_Method_1D* create(){
            return new Least_Squares_Method_1D();
         }

         virtual ~Least_Squares_Method_1D();
      };
   }; //end namespace core
}; //end namespace hype

After the user added the class, he needs to extend the enumeration hype::StatisticalMethods::StatisticalMethod in file global_definitions.hpp by a new member, which identifies the plug-in. Finally, the user has to register the plug-in in the class hype::core::PluginLoader in file pluginloader.cpp.

Recomputation Heuristics

HyPE is capable of refining estimated execution times at run-time. Depending on the application, a run-time refinement is beneficial or causes only additional overhead. To support a wide range of applications, HyPE allows to fine tune the runtime refinement on a per algorithm basis (e.g, for the same operation, we can have runtime adaption on the CPU, but not on the GPU.)

HyPE provides a plug-in architecture, where the user can choose either from the set of implemented recomputation heuristics, or alternatively, implement and integrate the preferred recomputation heuristic in HyPE.

To create a new recomputation heuristic, the user has to inherit from the abstract base class hype::core::RecomputationHeuristic and implement its pure virtual methods. Since HyPE uses a plug-in architecture based on factories, a static member function create should be defined, which returns a pointer to a new instance of your new recomputation heuristic (e.g., Oneshotcomputation).

#include <core/recomputation_heuristic.hpp>

namespace hype{
   namespace core{

      class Oneshotcomputation : public RecomputationHeuristic {
         public:
         Oneshotcomputation();
         //returns true, if approximation function has to be recomputed and false otherwise
         virtual bool internal_recompute(Algorithm& algortihm);

         static Oneshotcomputation* create(){
            return new Oneshotcomputation();
         }

      };
   }; //end namespace core
}; //end namespace hype

After the user added the class, he needs to extend the enumeration hype::RecomputationHeuristics::RecomputationHeuristic in file global_definitions.hpp by a new member, which identifies the plug-in. Finally, the user has to register the plug-in in the class hype::core::PluginLoader in file pluginloader.cpp.

Optimization Criterions

To add a new optimization criterion, the user has to inherit from the abstract class hype::core::OptimizationCriterion and implement its pure vitual methods. Since HyPE uses a plug-in architecture based on factories, a static member function create should be defined, which returns a pointer to a new instance of your new optimization criterion, which we will call "NewResponseTime".

#include <core/optimization_criterion.hpp>

namespace hype{
   namespace core{
      class NewResponseTime : public OptimizationCriterion{
         public:
         NewResponseTime(const std::string& name_of_operation);

         virtual const SchedulingDecision getOptimalAlgorithm_internal(const Tuple& input_values, Operation& op, DeviceTypeConstraint dev_constr);
         //factory function
         static NewResponseTime* create(){
            return new NewResponseTime("");
         }
      }
   };
};

After the user added the class, he needs to extend the enumeration hype::OptimizationCriterions::OptimizationCriterion in file global_definitions.hpp by a new member, which identifies the plug-in. Finally, the user has to register the plug-in in the the class hype::core::PluginLoader in file pluginloader.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines