JASPL  0.2
Just Another Signal Processing Library
openclbase.h
1 #ifndef OPENCLBASE_H
2 #define OPENCLBASE_H
3 
4 //Header for this file
5 //
6 //C System-Headers
7 //
8 //C++ System headers
9 //
10 //OpenCL Headers
11 #include <CL/cl.h>
12 #include <CL/cl.hpp>
13 //Boost Headers
14 //
15 //OpenMP Headers
16 //
17 //Project specific headers
18 //
19 
20 namespace jaspl {
21 
22 namespace ocl {
23 
31 class OpenCLBase {
32 
33  public:
34 
49  OpenCLBase( uint platform_number = 0, uint device_number = 0 );
50  virtual ~OpenCLBase() = 0;
51 
52  protected:
53 
54  void SetUp( uint platform_number, uint device_number );
55 
56  static bool initalized;
57  static std::vector<cl::Platform> all_platforms;
58  static cl::Platform default_platform;
59  static std::vector<cl::Device> all_devices;
60  static cl::Device current_device;
61  static cl::Context context;
62  static cl::CommandQueue command_queue;
63 };
64 
65 }
66 
67 }
68 
69 
70 #endif // OPENCLBASE_H
OpenCLBase(uint platform_number=0, uint device_number=0)
Initialize OpenCL Objects Note that the Platform and Context are selected automatically: Platform is ...
Definition: openclbase.cpp:78
Base class for every class that needs access to OpenCL Platforms, Contexts or Devices.
Definition: openclbase.h:31