Hybrid Query Processing Engine for Coprocessing in Database Systems
HyPE
|
00001 00002 #include <query_processing/operator.hpp> 00003 00004 #include <hype.hpp> 00005 00006 namespace hype 00007 { 00008 namespace queryprocessing 00009 { 00010 00011 using namespace core; 00012 00013 bool Operator::operator() () 00014 { 00015 bool ret=false; 00016 //try{ 00017 if(!hype::core::quiet && hype::core::verbose && hype::core::debug) 00018 std::cout << "[Operator] Executing " 00019 //<< sched_dec_.getNameofChoosenAlgorithm() 00020 << std::endl; 00021 hype::AlgorithmMeasurement alg_measure(sched_dec_); 00022 //call user defined execution function 00023 ret = execute(); 00024 alg_measure.afterAlgorithmExecution(); 00025 return ret; 00026 } 00027 00028 const hype::core::SchedulingDecision& Operator::getSchedulingDecision() const throw(){ 00029 return this->sched_dec_; 00030 } 00031 00032 Operator::~Operator() {} 00033 00034 Operator::Operator(const hype::SchedulingDecision& sched_dec) : sched_dec_(sched_dec) {} 00035 00036 00037 const core::EstimatedTime Operator::getEstimatedExecutionTime() const throw(){ 00038 return sched_dec_.getEstimatedExecutionTimeforAlgorithm(); 00039 } 00040 00041 const std::string Operator::getAlgorithmName() const throw(){ 00042 return sched_dec_.getNameofChoosenAlgorithm(); 00043 } 00044 00045 00046 const core::Tuple Operator::getFeatureValues() const throw(){ 00047 return sched_dec_.getFeatureValues(); 00048 } 00049 00050 // DeviceSpecification Operator::getComputeDevice() const throw(){ 00051 // return sched_dec_.getComputeDevice(); 00052 // } 00053 00054 const core::DeviceSpecification Operator::getDeviceSpecification() const throw(){ 00055 return sched_dec_.getDeviceSpecification(); 00056 } 00057 00058 00059 00060 }; //end namespace queryprocessing 00061 }; //end namespace hype