1 #ifndef VIENNACL_DEVICE_SPECIFIC_LAZY_PROGRAM_COMPILER_HPP
2 #define VIENNACL_DEVICE_SPECIFIC_LAZY_PROGRAM_COMPILER_HPP
33 namespace device_specific
45 std::string
const &
src()
const {
return src_; }
49 if (force_recompilation_ && ctx_->
has_program(name_))
53 #ifdef VIENNACL_BUILD_INFO
54 std::cerr <<
"Creating program " << program_name << std::endl;
57 #ifdef VIENNACL_BUILD_INFO
58 std::cerr <<
"Done creating program " << program_name << std::endl;
68 bool force_recompilation_;
viennacl::ocl::program & get_program(std::string const &name)
Returns the program with the provided name.
void delete_program(std::string const &name)
Delete the program with the provided name.
Manages an OpenCL context and provides the respective convenience functions for creating buffers...
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
viennacl::ocl::program & add_program(cl_program p, std::string const &prog_name)
Adds a program to the context.
Represents an OpenCL context within ViennaCL.
Wrapper class for an OpenCL program.
lazy_program_compiler(viennacl::ocl::context *ctx, std::string const &name, std::string const &src, bool force_recompilation)
bool has_program(std::string const &name)
Returns whether the program with the provided name exists or not.
lazy_program_compiler(viennacl::ocl::context *ctx, std::string const &name, bool force_recompilation)
viennacl::ocl::program & program()
void add(std::string const &src)
std::string const & src() const