Column-oriented GPU-accelerated Database Management System
CoGaDB
/home/sebastian/gpudbms/trunk/hype-library/include/query_processing/virtual_processing_device.hpp
Go to the documentation of this file.
00001 
00002 #pragma once
00003 
00004 #include <list>
00005 #include <memory>
00006 
00007 #include <config/global_definitions.hpp>
00008 #include <core/scheduling_decision.hpp>
00009 #include <core/specification.hpp>
00010 
00011 namespace hype
00012 {
00013         namespace queryprocessing
00014         {
00015 
00016                 class VirtualProcessingDevice{
00017                         typedef std::list<core::SchedulingDecision> TaskQueue;
00018                 public:
00019                         explicit VirtualProcessingDevice(const core::DeviceSpecification& dev_spec_);
00020                         
00021                         bool addRunningOperation(const core::SchedulingDecision&); //called by getOptimalAlgorithm
00022                         
00023                         bool removeFinishedOperation(const core::SchedulingDecision&); //called by addObservation
00024                         
00025                         unsigned int getNumberOfRunningOperations() const;
00026                         
00027                         double getEstimatedFinishingTime() const;
00028                         
00029                         bool isIdle() const;
00030                         
00031                         const core::DeviceSpecification& getDeviceSpecification() const throw(); 
00032                         
00033                         void print() const throw();
00034                 private: 
00035                         core::DeviceSpecification dev_spec_;
00036                         std::list<core::SchedulingDecision> scheduled_tasks_;
00037                 };
00038                 
00039                 typedef std::tr1::shared_ptr<VirtualProcessingDevice> VirtualProcessingDevicePtr;
00040                 
00041                 //VirtualProcessingDevice& getVirtualProcessingDevice(ProcessingDeviceID);
00042 
00043 
00044         }; //end namespace queryprocessing
00045 }; //end namespace hype
00046 
00047 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines