Compiles the program with \p options. \opencl_version_warning{1,2} \see_opencl_ref{clCompileProgram}
| 279 | /// |
| 280 | /// \see_opencl_ref{clCompileProgram} |
| 281 | void compile(const std::string &options = std::string()) |
| 282 | { |
| 283 | const char *options_string = 0; |
| 284 | |
| 285 | if(!options.empty()){ |
| 286 | options_string = options.c_str(); |
| 287 | } |
| 288 | |
| 289 | cl_int ret = clCompileProgram( |
| 290 | m_program, 0, 0, options_string, 0, 0, 0, 0, 0 |
| 291 | ); |
| 292 | |
| 293 | if(ret != CL_SUCCESS){ |
| 294 | BOOST_THROW_EXCEPTION(opencl_error(ret)); |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | /// Links the programs in \p programs with \p options in \p context. |
| 299 | /// |