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

Method create_with_builtin_kernels

include/boost/compute/program.hpp:499–518  ·  view source on GitHub ↗

Creates a new program with the built-in kernels listed in \p kernel_names for \p devices in \p context. \opencl_version_warning{1,2} \see_opencl_ref{clCreateProgramWithBuiltInKernels}

Source from the content-addressed store, hash-verified

497 ///
498 /// \see_opencl_ref{clCreateProgramWithBuiltInKernels}
499 static program create_with_builtin_kernels(const context &context,
500 const std::vector<device> &devices,
501 const std::string &kernel_names)
502 {
503 cl_int error = 0;
504
505 cl_program program_ = clCreateProgramWithBuiltInKernels(
506 context.get(),
507 static_cast<uint_>(devices.size()),
508 reinterpret_cast<const cl_device_id *>(&devices[0]),
509 kernel_names.c_str(),
510 &error
511 );
512
513 if(!program_){
514 BOOST_THROW_EXCEPTION(opencl_error(error));
515 }
516
517 return program(program_, false);
518 }
519 #endif // CL_VERSION_1_2
520
521 /// Create a new program with \p source in \p context and builds it with \p options.

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected