Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
clfAlgorithm.hh
1 /*
2  * clfAlgorithm.hh
3  *
4  * Created on: Nov 1, 2011
5  * Author: fkellner
6  */
7 
8 #ifndef CLFALGORITHM_HH_
9 #define CLFALGORITHM_HH_
10 #include <Base/Common/BIASpragmaStart.hh>
11 #include <bias_config.h>
12 #include <OpenCLFramework/clfContext.hh>
13 #include <OpenCLFramework/clfProgram.hh>
14 
15 namespace BIAS {
16 
17 class BIASOpenCLFramework_EXPORT clfAlgorithm {
18 public:
19  clfAlgorithm();
20  clfAlgorithm(clfContext *ctx, bool sharedGL = false, unsigned int device = 0);
21  virtual ~clfAlgorithm();
22 
23  clfContext *GetContext(){return context_;}
24 
25  clfProgram* GetCLProgram(){return programCL_;}
26 
27  static void getlocsize(const unsigned int val, unsigned int &result);
28  static unsigned int getlocsize(const unsigned int val);
29 
30 protected:
31 
32  void InitInternal_(clfContext *ctx, bool sharedGL, unsigned int device);
33 
39  int device_;
40 };
41 
42 } /* namespace BIAS */
43 #include <Base/Common/BIASpragmaEnd.hh>
44 #endif /* CLFALGORITHM_HH_ */
clfProgram * programCL_
Definition: clfAlgorithm.hh:35
OpenCL Program wrapper.
Definition: clfProgram.hh:53
clfProgram * GetCLProgram()
Definition: clfAlgorithm.hh:25
clfContext * GetContext()
Definition: clfAlgorithm.hh:23
OpenCL Context wrapper.
Definition: clfContext.hh:49
clfContext * context_
Definition: clfAlgorithm.hh:34