JayBeams  0.1
Another project to have fun coding.
build_simple_kernel.hpp
Go to the documentation of this file.
1 #ifndef jb_opencl_build_simple_kernel_hpp
2 #define jb_opencl_build_simple_kernel_hpp
3 
4 #include <boost/compute/context.hpp>
5 #include <boost/compute/device.hpp>
6 #include <boost/compute/kernel.hpp>
7 #include <boost/compute/program.hpp>
8 #include <iosfwd>
9 
10 namespace jb {
11 namespace opencl {
12 
13 /**
14  * Build a simple program (one where everything is in a single string)
15  * and get a kernel from it.
16  *
17  * Most of our kernels are relatively simple, so this routine is very
18  * convenient.
19  */
20 boost::compute::kernel build_simple_kernel(
21  boost::compute::context context, boost::compute::device device,
22  char const* code, char const* kernel_name);
23 
24 /**
25  * Build a simple program from an iostream and get a kernel from the result.
26  */
27 boost::compute::kernel build_simple_kernel(
28  boost::compute::context context, boost::compute::device device,
29  std::istream& code, char const* kernel_name);
30 
31 /**
32  * Convenience function to build a simple program and return it.
33  *
34  * Build a problem that consists of a single source string, targeted
35  * to a single device.
36  */
37 boost::compute::program build_simple_program(
38  boost::compute::context context, boost::compute::device device,
39  char const* code);
40 
41 /**
42  * Convenience function to build a simple program and return it.
43  */
44 boost::compute::program build_simple_program(
45  boost::compute::context context, boost::compute::device device,
46  std::istream& code);
47 
48 } // namespace opencl
49 } // namespace jb
50 
51 #endif // jb_opencl_build_simple_kernel_hpp
boost::compute::kernel build_simple_kernel(boost::compute::context context, boost::compute::device device, char const *code, char const *kernel_name)
Build a simple program (one where everything is in a single string) and get a kernel from it...
boost::compute::program build_simple_program(boost::compute::context context, boost::compute::device device, char const *code)
Convenience function to build a simple program and return it.
The top-level namespace for the JayBeams library.
Definition: as_hhmmss.hpp:7