OpendTect  6.6
gpucalc.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: Kristofer Tingdahl
8  Date: Jan 2011
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 
15 #include "gpucalcmod.h"
16 #include "sets.h"
17 
18 class BufferStringSet;
19 
20 namespace GPU
21 {
22 
23 class DeviceData;
24 class ProgramData;
25 class Context;
26 
27 mExpClass(GPUCalc) Device
28 {
29 public:
30  bool isGPU() const;
31  const char* platformName();
32  const char* name() const;
33 
34 
35 protected:
36  Device();
38  void* getContext();
39  void* getDevice();
40 
41  friend class GPUManager;
42  friend class Program;
43 
44  DeviceData& data_;
45 };
46 
47 
49 {
50 public:
53 
54  bool setSource(const BufferStringSet& s,
55  const char* mainfunction);
56 
57 protected:
58 
59  ProgramData& data_;
60 };
61 
63 {
64 public:
66 };
67 
69 {
70 public:
73 
74  int nrDevices() const { return devices_.size(); }
75  Device* getDevice(int idx) { return devices_[idx]; }
76 
77 protected:
80 };
81 
82 //Access.
84 
85 
86 }; // namespace
87 
88 
GPU::GPUManager::~GPUManager
~GPUManager()
mGlobal
#define mGlobal(module)
Definition: commondefs.h:180
ObjectSet
Set of pointers to objects.
Definition: commontypes.h:31
GPU::GPUManager::contexts_
ObjectSet< Context > contexts_
Definition: gpucalc.h:79
BufferStringSet
Set of BufferString objects.
Definition: bufstringset.h:26
GPU::Program::setSource
bool setSource(const BufferStringSet &s, const char *mainfunction)
GPU::Device::data_
DeviceData & data_
Definition: gpucalc.h:44
GPU::Device::Device
Device()
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
GPU::Program::~Program
~Program()
GPU::Device::isGPU
bool isGPU() const
GPU::manager
GPUManager & manager()
GPU::GPUManager::getDevice
Device * getDevice(int idx)
Definition: gpucalc.h:75
GPU::GPUManager::nrDevices
int nrDevices() const
Definition: gpucalc.h:74
GPU::Device::name
const char * name() const
GPU::Program::data_
ProgramData & data_
Definition: gpucalc.h:59
GPU::Device::~Device
~Device()
GPU::Program::Program
Program(Device &)
GPU::GPUManager
Definition: gpucalc.h:69
GPU::ProgramObject::ProgramObject
ProgramObject(Program &)
GPU::Device::platformName
const char * platformName()
GPU::GPUManager::GPUManager
GPUManager()
GPU::Program
Definition: gpucalc.h:49
GPU::Device::getDevice
void * getDevice()
GPU::Device
Definition: gpucalc.h:28
sets.h
GPU
Definition: gpucalc.h:21
GPU::ProgramObject
Definition: gpucalc.h:63
GPU::Device::getContext
void * getContext()
GPU::GPUManager::devices_
ObjectSet< Device > devices_
Definition: gpucalc.h:78

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2021