ML Reference
MeVis/Foundation/Sources/MLUtilities/mlGPUInfo.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00004 
00009 //----------------------------------------------------------------------------------
00010 
00011 #ifndef __mlGPUInfo_H
00012 #define __mlGPUInfo_H
00013 
00014 #include "mlUtilsSystem.h"
00015 
00016 ML_UTILS_START_NAMESPACE
00017 
00018 //=============================================================================
00021 //=============================================================================
00022 class ML_UTILS_EXPORT GPUInfo
00023 {
00024 public:
00025   // --------------------------------------------------------------------------
00029   // --------------------------------------------------------------------------
00030   static GPUInfo &getInstance();
00031 
00032 protected:
00033   // --------------------------------------------------------------------------
00037   // --------------------------------------------------------------------------
00038   GPUInfo();
00039 
00040 public:
00041   // --------------------------------------------------------------------------
00044   // --------------------------------------------------------------------------
00045   unsigned long long getVideoMemorySize() const { return _VRAMSize; }
00046   
00047   // --------------------------------------------------------------------------
00051   // --------------------------------------------------------------------------
00052   unsigned long long getTextureMemorySize() const { return _TRAMSize; }
00053 
00054 #ifdef LINUX  
00055 private:
00057   bool detectRAMFromLinuxProcessOutput(FILE* p);
00058 #endif
00059 
00060 private:
00061   unsigned long long _VRAMSize;
00062   unsigned long long _TRAMSize;
00063 };
00064 
00065 ML_UTILS_END_NAMESPACE
00066 #endif