| 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, |
nothing calls this directly
no test coverage detected