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

Method create_with_source

include/boost/compute/program.hpp:370–386  ·  view source on GitHub ↗

Creates a new program with \p source in \p context. \see_opencl_ref{clCreateProgramWithSource}

Source from the content-addressed store, hash-verified

368 ///
369 /// \see_opencl_ref{clCreateProgramWithSource}
370 static program create_with_source(const std::string &source,
371 const context &context)
372 {
373 const char *source_string = source.c_str();
374
375 cl_int error = 0;
376 cl_program program_ = clCreateProgramWithSource(context,
377 uint_(1),
378 &source_string,
379 0,
380 &error);
381 if(!program_){
382 BOOST_THROW_EXCEPTION(opencl_error(error));
383 }
384
385 return program(program_, false);
386 }
387
388 /// Creates a new program with \p sources in \p context.
389 ///

Callers

nothing calls this directly

Calls 3

opencl_errorClass · 0.85
programClass · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected