| 198 | } |
| 199 | |
| 200 | cl_program |
| 201 | createClProgramWithBinary( |
| 202 | cl_context ctx, |
| 203 | cl_device_id devID, |
| 204 | unsigned char *binary, |
| 205 | size_t binSize, |
| 206 | cl_int *status) |
| 207 | { |
| 208 | cl_program program; |
| 209 | cl_int s; |
| 210 | |
| 211 | program = clCreateProgramWithBinary(ctx, 1, &devID, &binSize, |
| 212 | (const unsigned char**)&binary, |
| 213 | NULL, &s); |
| 214 | if (program != NULL) { |
| 215 | s = clBuildProgram(program, 1, &devID, NULL, NULL, NULL); |
| 216 | if (s != CL_SUCCESS) { |
| 217 | clReleaseProgram(program); |
| 218 | program = NULL; |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | if (status != NULL) { |
| 223 | *status = s; |
| 224 | } |
| 225 | |
| 226 | return program; |
| 227 | } |
| 228 | |
| 229 | size_t |
| 230 | getProgramBinarySize(cl_program program) |
no outgoing calls
no test coverage detected