WPOCT Software Developer's Kit (SDK)
SDK For using Wasatch Photonics OCT Spectrometers
GPUManager.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include "OCTTypeDefs.h"
9 
10 #define DIM 3
11 
13 {
14 public:
15  // Constructor
16  GPUManager();
17 
18  // Destructor.
19  virtual ~GPUManager();
20 
21  // Getters
22  static int GetPreferredVecWidth () { return _prefVecWidth; }
23  static long long GetGlobalGraphicsCardMemorySize () { return _globalGraphicsCardMemorySize; }
24  static long long GetLocalGraphicsCardMemorySize () { return _localGraphicsCardMemorySize; }
25 
26 
27 
28  // Setters
29 
30 
31  virtual bool HasGPU () { return true; }
32  virtual bool UseOpenCl () { return true; }
33  virtual bool UseCPU () { return false; }
34 
36  virtual int LoadKernel (int programIndex, char *kernelName) { return -1; }
37 
38  virtual void OutputError (int error, const char *message) { }
39 
40  virtual size_t GetWorkgroupMaximumSize () { return 1; }
41  virtual int ConfigureGPUFramework () { return -1; }
42 
43 protected:
44  bool _gpuFrameworkConfigured;
45 
46  static int _prefVecWidth;
47  static int _numGPUObjects;
48 
49  static long long _globalGraphicsCardMemorySize;
50  static long long _localGraphicsCardMemorySize;
51 
52 private:
53  void Init ();
54 };
typedefs used across UtensilConverter
Definition: GPUManager.h:13
virtual int LoadKernel(int programIndex, char *kernelName)
Outputs an index to where the kernel is in the m_kernel_vector.
Definition: GPUManager.h:36