MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
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
20
ML_OPENGL_START_NAMESPACE
21
22
//=============================================================================
25
//=============================================================================
26
class
MLOPENGL_EXPORT
GPUInfo
27
{
28
public
:
29
// --------------------------------------------------------------------------
33
// --------------------------------------------------------------------------
34
static
GPUInfo
&
getInstance
();
35
36
protected
:
37
// --------------------------------------------------------------------------
41
// --------------------------------------------------------------------------
42
GPUInfo
();
43
44
public
:
45
// --------------------------------------------------------------------------
48
// --------------------------------------------------------------------------
49
unsigned
long
getVideoMemorySizeInMB
()
const
50
{
51
return
static_cast<
unsigned
long
>
(_VRAMSize >> 20);
52
}
53
54
// --------------------------------------------------------------------------
58
// --------------------------------------------------------------------------
59
unsigned
long
getTextureMemorySizeInMB
()
const
60
{
61
return
static_cast<
unsigned
long
>
(_TRAMSize >> 20);
62
}
63
64
#ifdef LINUX
65
private
:
67
bool
detectRAMFromLinuxProcessOutput(FILE* p);
68
#endif
69
70
private
:
71
unsigned
long
long
_VRAMSize;
72
unsigned
long
long
_TRAMSize;
73
};
74
75
ML_OPENGL_END_NAMESPACE
76
#endif
ml::GPUInfo::getVideoMemorySizeInMB
unsigned long getVideoMemorySizeInMB() const
Definition
mlGPUInfo.h:49
ml::GPUInfo::GPUInfo
GPUInfo()
ml::GPUInfo::getInstance
static GPUInfo & getInstance()
ml::GPUInfo::getTextureMemorySizeInMB
unsigned long getTextureMemorySizeInMB() const
Definition
mlGPUInfo.h:59
mlOpenGLSystem.h
MLOPENGL_EXPORT
#define MLOPENGL_EXPORT
Closes the namespace for all ML code after the usage of ML_UTILS_START_NAMESPACE.
Definition
mlOpenGLSystem.h:56
MeVis
Foundation
Sources
MLOpenGL
private
mlGPUInfo.h
Generated by
1.18.0