MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / link

Method link

compute/include/boost/compute/program.hpp:340–368  ·  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

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.

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