MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / Program

Method Program

include/internal/CL/cl.hpp:5001–5034  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4999 typedef VECTOR_CLASS<std::pair<const char*, ::size_t> > Sources;
5000
5001 Program(
5002 const STRING_CLASS& source,
5003 bool build = false,
5004 cl_int* err = NULL)
5005 {
5006 cl_int error;
5007
5008 const char * strings = source.c_str();
5009 const ::size_t length = source.size();
5010
5011 Context context = Context::getDefault(err);
5012
5013 object_ = ::clCreateProgramWithSource(
5014 context(), (cl_uint)1, &strings, &length, &error);
5015
5016 detail::errHandler(error, __CREATE_PROGRAM_WITH_SOURCE_ERR);
5017
5018 if (error == CL_SUCCESS && build) {
5019
5020 error = ::clBuildProgram(
5021 object_,
5022 0,
5023 NULL,
5024 "",
5025 NULL,
5026 NULL);
5027
5028 detail::errHandler(error, __BUILD_PROGRAM_ERR);
5029 }
5030
5031 if (err != NULL) {
5032 *err = error;
5033 }
5034 }
5035
5036 Program(
5037 const Context& context,

Callers

nothing calls this directly

Calls 2

errHandlerFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected