OpendTect  6.3
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 
22 {
23 public:
24  Device();
25  virtual ~Device() {}
26 
27  int id_;
28 
31 
32  int max2Dsize_[2];
33  int max3Dsize_[3];
34 
35  bool iscpu_;
37 };
38 
39 
41 {
42 public:
43  static const ObjectSet<Platform>& getPlatforms();
44 
47 
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:
60 };
61 
62 
63 //For internal implementation only.
64 typedef Context* (*ContextCreateFunction)(const TypeSet<int>&);
66 mGlobal(Basic) void setPlatforms(ObjectSet<Platform>&);
67 
68 
69 
70 } //namespace
#define mExpClass(module)
Definition: commondefs.h:157
Context *(* ContextCreateFunction)(const TypeSet< int > &)
Definition: gpuprog.h:64
BufferString name_
Definition: gpuprog.h:36
#define mGlobal(module)
Definition: commondefs.h:160
#define od_int64
Definition: plftypes.h:34
BufferString vendor_
Definition: gpuprog.h:45
void setPlatforms(ObjectSet< Platform > &)
void setContextCreatorFunction(ContextCreateFunction)
Definition: uistring.h:88
virtual bool isOK() const
Definition: gpuprog.h:57
int64_t totalmem_
Definition: gpuprog.h:29
Set of pointers to objects.
Definition: commontypes.h:28
uiString errmsg_
Definition: gpuprog.h:59
int id_
Definition: gpuprog.h:27
Definition: gpuprog.h:52
Definition: gpuprog.h:40
Definition: gpuprog.h:18
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
bool isEmpty() const
Definition: odstring.h:49
Definition: gpuprog.h:21
virtual ~Device()
Definition: gpuprog.h:25
uiString errMsg() const
Definition: gpuprog.h:56
BufferString errmsg_
Definition: horizontracker.h:117
ObjectSet< Device > devices_
Definition: gpuprog.h:48
bool iscpu_
Definition: gpuprog.h:35
int64_t maxmemalloc_
Definition: gpuprog.h:30
BufferString name_
Definition: gpuprog.h:46
Definition: ptrman.h:200

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