OpendTect
6.3
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
master_od_source
include
Basic
gpuprog.h
Go to the documentation of this file.
1
#pragma once
2
3
/*+
4
________________________________________________________________________
5
6
(C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7
Author: K. Tingdahl
8
Date: Mar 2016
9
________________________________________________________________________
10
11
-*/
12
13
#include "
bufstring.h
"
14
#include "
uistring.h
"
15
#include "
objectset.h
"
16
#include "
refcount.h
"
17
18
namespace
GPU
19
{
20
21
mExpClass
(Basic)
Device
22
{
23
public
:
24
Device();
25
virtual
~Device
() {}
26
27
int
id_
;
28
29
od_int64
totalmem_
;
30
od_int64
maxmemalloc_
;
31
32
int
max2Dsize_[2];
33
int
max3Dsize_[3];
34
35
bool
iscpu_
;
36
BufferString
name_
;
37
};
38
39
40
mExpClass
(Basic)
Platform
41
{
42
public
:
43
static
const
ObjectSet<Platform>
& getPlatforms();
44
45
BufferString
vendor_
;
46
BufferString
name_
;
47
48
ObjectSet<Device>
devices_
;
49
};
50
51
52
mExpClass
(Basic)
Context
: public RefCount::Referenced
53
{
54
public
:
55
static
RefMan<Context>
createContext(
const
TypeSet<int>
& deviceids);
56
uiString
errMsg
()
const
{
return
errmsg_
; }
57
virtual
bool
isOK
()
const
{
return
errmsg_
.
isEmpty
(); }
58
protected
:
59
uiString
errmsg_
;
60
};
61
62
63
//For internal implementation only.
64
typedef
Context
* (*ContextCreateFunction)(
const
TypeSet<int>
&);
65
mGlobal
(Basic) void
setContextCreatorFunction
(
ContextCreateFunction
);
66
mGlobal
(Basic)
void
setPlatforms
(
ObjectSet
<
Platform
>&);
67
68
69
70
}
//namespace
mExpClass
#define mExpClass(module)
Definition:
commondefs.h:157
GPU::ContextCreateFunction
Context *(* ContextCreateFunction)(const TypeSet< int > &)
Definition:
gpuprog.h:64
GPU::Device::name_
BufferString name_
Definition:
gpuprog.h:36
refcount.h
uistring.h
mGlobal
#define mGlobal(module)
Definition:
commondefs.h:160
od_int64
#define od_int64
Definition:
plftypes.h:34
bufstring.h
GPU::Platform::vendor_
BufferString vendor_
Definition:
gpuprog.h:45
GPU::setPlatforms
void setPlatforms(ObjectSet< Platform > &)
GPU::setContextCreatorFunction
void setContextCreatorFunction(ContextCreateFunction)
uiString
Definition:
uistring.h:88
GPU::Context::isOK
virtual bool isOK() const
Definition:
gpuprog.h:57
GPU::Device::totalmem_
int64_t totalmem_
Definition:
gpuprog.h:29
ObjectSet
Set of pointers to objects.
Definition:
commontypes.h:28
TypeSet< int >
GPU::Context::errmsg_
uiString errmsg_
Definition:
gpuprog.h:59
GPU::Device::id_
int id_
Definition:
gpuprog.h:27
GPU::Context
Definition:
gpuprog.h:52
GPU::Platform
Definition:
gpuprog.h:40
GPU
Definition:
gpuprog.h:18
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition:
bufstring.h:38
OD::String::isEmpty
bool isEmpty() const
Definition:
odstring.h:49
GPU::Device
Definition:
gpuprog.h:21
GPU::Device::~Device
virtual ~Device()
Definition:
gpuprog.h:25
GPU::Context::errMsg
uiString errMsg() const
Definition:
gpuprog.h:56
MPE::errmsg_
BufferString errmsg_
Definition:
horizontracker.h:117
GPU::Platform::devices_
ObjectSet< Device > devices_
Definition:
gpuprog.h:48
GPU::Device::iscpu_
bool iscpu_
Definition:
gpuprog.h:35
objectset.h
GPU::Device::maxmemalloc_
int64_t maxmemalloc_
Definition:
gpuprog.h:30
GPU::Platform::name_
BufferString name_
Definition:
gpuprog.h:46
RefMan
Definition:
ptrman.h:200
Generated at for the
OpendTect
seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017