1 #ifndef VIENNACL_OCL_PROGRAM_HPP_
2 #define VIENNACL_OCL_PROGRAM_HPP_
42 typedef std::vector<viennacl::ocl::kernel> KernelContainer;
47 : handle_(program_handle, program_context), p_context_(&program_context), name_(prog_name) {}
49 program(
program const & other) : handle_(other.handle_), p_context_(other.p_context_), name_(other.name_), kernels_(other.kernels_) {}
53 handle_ = other.handle_;
55 p_context_ = other.p_context_;
56 kernels_ = other.kernels_;
60 std::string
const &
name()
const {
return name_; }
75 KernelContainer kernels_;
This file provides the forward declarations for the OpenCL layer of ViennaCL.
program()
Definition: program.hpp:45
Represents an OpenCL kernel within ViennaCL.
Definition: kernel.hpp:59
Manages an OpenCL context and provides the respective convenience functions for creating buffers...
Definition: context.hpp:51
program(program const &other)
Definition: program.hpp:49
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
Definition: cpu_ram.hpp:29
Implementation of a smart-pointer-like class for handling OpenCL handles.
viennacl::ocl::program & operator=(const program &other)
Definition: program.hpp:51
viennacl::ocl::kernel & add_kernel(cl_kernel kernel_handle, std::string const &kernel_name)
Adds a kernel to the program.
Definition: context.hpp:629
program(cl_program program_handle, viennacl::ocl::context const &program_context, std::string const &prog_name=std::string())
Definition: program.hpp:46
const viennacl::ocl::handle< cl_program > & handle() const
Definition: program.hpp:68
Wrapper class for an OpenCL program.
Definition: program.hpp:40
std::string const & name() const
Definition: program.hpp:60
viennacl::ocl::kernel & get_kernel(std::string const &name)
Returns the kernel with the provided name.
Definition: context.hpp:638
Representation of an OpenCL kernel in ViennaCL.