Links the programs in \p programs with \p options in \p context. \opencl_version_warning{1,2} \see_opencl_ref{clLinkProgram}
| 301 | /// |
| 302 | /// \see_opencl_ref{clLinkProgram} |
| 303 | static program link(const std::vector<program> &programs, |
| 304 | const context &context, |
| 305 | const std::string &options = std::string()) |
| 306 | { |
| 307 | const char *options_string = 0; |
| 308 | |
| 309 | if(!options.empty()){ |
| 310 | options_string = options.c_str(); |
| 311 | } |
| 312 | |
| 313 | cl_int ret; |
| 314 | cl_program program_ = clLinkProgram( |
| 315 | context.get(), |
| 316 | 0, |
| 317 | 0, |
| 318 | options_string, |
| 319 | static_cast<uint_>(programs.size()), |
| 320 | reinterpret_cast<const cl_program*>(&programs[0]), |
| 321 | 0, |
| 322 | 0, |
| 323 | &ret |
| 324 | ); |
| 325 | |
| 326 | if(!program_){ |
| 327 | BOOST_THROW_EXCEPTION(opencl_error(ret)); |
| 328 | } |
| 329 | |
| 330 | return program(program_, false); |
| 331 | } |
| 332 | #endif // CL_VERSION_1_2 |
| 333 | |
| 334 | /// Returns the build log. |
nothing calls this directly
no test coverage detected