Links the programs in \p programs with \p options in \p context. \opencl_version_warning{1,2} \see_opencl_ref{clLinkProgram}
| 338 | /// |
| 339 | /// \see_opencl_ref{clLinkProgram} |
| 340 | static program link(const std::vector<program> &programs, |
| 341 | const context &context, |
| 342 | const std::string &options = std::string()) |
| 343 | { |
| 344 | const char *options_string = 0; |
| 345 | |
| 346 | if(!options.empty()){ |
| 347 | options_string = options.c_str(); |
| 348 | } |
| 349 | |
| 350 | cl_int ret; |
| 351 | cl_program program_ = clLinkProgram( |
| 352 | context.get(), |
| 353 | 0, |
| 354 | 0, |
| 355 | options_string, |
| 356 | static_cast<uint_>(programs.size()), |
| 357 | reinterpret_cast<const cl_program*>(&programs[0]), |
| 358 | 0, |
| 359 | 0, |
| 360 | &ret |
| 361 | ); |
| 362 | |
| 363 | if(!program_){ |
| 364 | BOOST_THROW_EXCEPTION(opencl_error(ret)); |
| 365 | } |
| 366 | |
| 367 | return program(program_, false); |
| 368 | } |
| 369 | #endif // BOOST_COMPUTE_CL_VERSION_1_2 |
| 370 | |
| 371 | /// Returns the build log. |
nothing calls this directly
no test coverage detected