MeVisLab Toolbox Reference
mlGPUInfo.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2009, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_GPUINFO_H
14#define ML_GPUINFO_H
15
17
18#include "mlOpenGLSystem.h"
19
21
22//=============================================================================
25//=============================================================================
27{
28public:
29 // --------------------------------------------------------------------------
33 // --------------------------------------------------------------------------
35
36protected:
37 // --------------------------------------------------------------------------
41 // --------------------------------------------------------------------------
43
44public:
45 // --------------------------------------------------------------------------
48 // --------------------------------------------------------------------------
49 unsigned long getVideoMemorySizeInMB() const { return static_cast<unsigned long>(_VRAMSize>>20); }
50
51 // --------------------------------------------------------------------------
55 // --------------------------------------------------------------------------
56 unsigned long getTextureMemorySizeInMB() const { return static_cast<unsigned long>(_TRAMSize>>20); }
57
58#ifdef LINUX
59private:
62#endif
63
64private:
65 unsigned long long _VRAMSize;
66 unsigned long long _TRAMSize;
67};
68
70#endif
Singleton class that provides information about GPU.
Definition mlGPUInfo.h:27
unsigned long getTextureMemorySizeInMB() const
Determine the amount of texture memory in megabytes that is available to the accelerated renderer of ...
Definition mlGPUInfo.h:56
unsigned long getVideoMemorySizeInMB() const
Determines the amount of video memory in megabytes that is available to the accelerated renderer of t...
Definition mlGPUInfo.h:49
static GPUInfo & getInstance()
Returns the single existing object of this class.
GPUInfo()
This constructor must not be called from anywhere else but the getInstance() method (which does call ...
#define ML_OPENGL_END_NAMESPACE
Closes the namespace for all ML stuff after the usage of ML_UTILS_START_NAMESPACE.
#define ML_OPENGL_START_NAMESPACE
Macro to put all following stuff into the namespace ML_NAMESPACE to avoid collisions with symbols of ...
#define MLOPENGL_EXPORT
Target mlrange_cast(Source arg)
Generic version of checked ML casts.