FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
OpenCLProgram.hpp
Go to the documentation of this file.
1 #ifndef OPENCL_PROGRAM_HPP_
2 #define OPENCL_PROGRAM_HPP_
3 
4 #include "Object.hpp"
5 #include <unordered_map>
6 
7 namespace cl {
8 
9 class Program;
10 
11 }
12 
13 namespace fast {
14 
15 class OpenCLDevice;
16 
17 class FAST_EXPORT OpenCLProgram : public Object {
19  public:
20  void setName(std::string name);
21  std::string getName() const;
22  void setSourceFilename(std::string filename);
23  std::string getSourceFilename() const;
24  cl::Program build(std::shared_ptr<OpenCLDevice>, std::string buildOptions = "");
25  protected:
26  OpenCLProgram();
27 
28  bool buildExists(std::shared_ptr<OpenCLDevice>, std::string buildOptions = "") const;
29 
30  std::string mName;
31  std::string mSourceFilename;
32  std::unordered_map<std::shared_ptr<OpenCLDevice>, std::map<std::string, cl::Program> > mOpenCLPrograms;
33 };
34 
35 } // end namespace fast
36 
37 #endif
fast::OpenCLProgram::mOpenCLPrograms
std::unordered_map< std::shared_ptr< OpenCLDevice >, std::map< std::string, cl::Program > > mOpenCLPrograms
Definition: OpenCLProgram.hpp:32
Object.hpp
fast::OpenCLProgram
Definition: OpenCLProgram.hpp:17
fast
Definition: AffineTransformation.hpp:7
fast::Object
Definition: Object.hpp:34
fast::OpenCLProgram::mName
std::string mName
Definition: OpenCLProgram.hpp:30
fast::OpenCLProgram::mSourceFilename
std::string mSourceFilename
Definition: OpenCLProgram.hpp:31
FAST_OBJECT
#define FAST_OBJECT(className)
Definition: Object.hpp:9
cl
Definition: OpenCLProgram.hpp:7