GPUOcelot

OcelotConfiguration.h

Go to the documentation of this file.
00001 
00009 #ifndef GPUOCELOT_API_OCELOTCONFIGURATION_H_INCLUDED
00010 #define GPUOCELOT_API_OCELOTCONFIGURATION_H_INCLUDED
00011 
00012 // C++ stdlib includes
00013 #include <string>
00014 #include <fstream>
00015 
00016 namespace api {
00017 
00019   class OcelotConfiguration {
00020   public:
00021   
00022     class Checkpoint {
00023     public:
00024       
00025     public:
00026       Checkpoint();
00027       
00028     public:
00030       bool enabled;
00031       
00033       std::string path;
00034       
00036       std::string prefix;
00037       
00039       std::string suffix;
00040       
00042       bool verify;
00043     };
00044 
00046     class TraceGeneration {
00047     public:
00049       class Debugger
00050       {
00051       public:
00052           Debugger();
00053         
00054       public:
00056           bool enabled;
00057 
00059           std::string kernelFilter;
00060         
00062           bool alwaysAttach;
00063       };
00064       
00066       class RaceDetector
00067       {
00068       public:
00069           RaceDetector();
00070         
00071       public:
00073           bool enabled;
00074           
00076           //  with the same value
00077           bool ignoreIrrelevantWrites;
00078       };
00079 
00080     public:
00081       TraceGeneration();
00082 
00083     public:
00085       class MemoryChecker
00086       {
00087       public:
00088           MemoryChecker();
00089       public:
00090           bool enabled;
00091           bool checkInitialization;
00092       };
00093       
00095       RaceDetector raceDetector;
00096                         
00098             Debugger debugger;
00099 
00101             MemoryChecker memoryChecker;
00102     };
00103 
00104     class CudaRuntimeImplementation {
00105     public:
00106       CudaRuntimeImplementation();
00107 
00108     public:
00109 
00111       //         to instantiate
00112       std::string implementation;
00113       
00115       std::string runtimeApiTrace;
00116     };
00117 
00118     class Executive {
00119     public:
00120       Executive();
00121 
00122     public:
00124       int defaultDeviceID;
00125 
00129       int preferredISA;
00130 
00133       int optimizationLevel;
00134 
00136       //                  the preferred ISA or die
00137       bool required;
00138 
00140       bool enableLLVM;
00141 
00143       bool enableEmulated;
00144 
00146       bool enableNVIDIA;
00147       
00149       bool enableAMD;
00150       
00152       bool enableRemote;
00153       
00155       int port;
00156 
00158       std::string host;
00159 
00161       int reconvergenceMechanism;
00162 
00164       //         number indicates no limit
00165       int workerThreadLimit;
00166 
00168       int warpSize;
00169     };
00170 
00171     class Optimizations {
00172     public:
00173       Optimizations();
00174 
00175     public:
00177       unsigned int subkernelSize;
00178     
00180       bool structuralTransform;
00181       
00183       bool predicateToSelect;
00184       
00186       bool linearScanAllocation;
00187       
00189       bool mimdThreadScheduling;
00190       
00192       bool syncElimination;     
00193     };
00194 
00195 
00196   public:
00197 
00199     OcelotConfiguration();
00200 
00202     OcelotConfiguration(std::istream &stream);
00203 
00205     OcelotConfiguration(const std::string &path);
00206 
00208     void *initialize(std::istream &stream, bool preserve = false);
00209     
00211     void *configuration() const;
00212 
00214     //  constructs from 'configure.ocelot'
00215     static const OcelotConfiguration& get();
00216 
00218     static void destroy();
00219 
00220   public:
00222     std::string path;
00223 
00225     std::string ocelot;
00226 
00228     std::string version;
00229 
00231     TraceGeneration trace;
00232 
00234     CudaRuntimeImplementation cuda;
00235 
00237     Executive executive;
00238     
00240     Checkpoint checkpoint;
00241     
00243     Optimizations optimizations;
00244   };
00245 
00246 }
00247 
00248 #endif
00249 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines