MCPcopy Create free account
hub / github.com/boostorg/compute / link

Method link

include/boost/compute/program.hpp:303–331  ·  view source on GitHub ↗

Links the programs in \p programs with \p options in \p context. \opencl_version_warning{1,2} \see_opencl_ref{clLinkProgram}

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 5

opencl_errorClass · 0.85
programClass · 0.85
emptyMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected