MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / getProgramBinary

Function getProgramBinary

src/library/common/clkern.c:235–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235unsigned char
236*getProgramBinary(cl_program program)
237{
238 unsigned char *binaries[MAX_OPENCL_DEVICES];
239 unsigned char *bin = NULL;
240 size_t size;
241 int idx = 0;
242
243 memset(binaries, 0, sizeof(binaries));
244 size = getBinSizeAndIdx(program, &idx);
245 bin = binaries[idx] = malloc(size);
246 if (bin != NULL) {
247 cl_int err;
248
249 err = clGetProgramInfo(program, CL_PROGRAM_BINARIES, sizeof(binaries),
250 binaries, NULL);
251 if (err != CL_SUCCESS) {
252 free(bin);
253 bin = NULL;
254 }
255 }
256
257 return bin;
258}

Callers 1

dropProgramSourceFunction · 0.85

Calls 1

getBinSizeAndIdxFunction · 0.85

Tested by

no test coverage detected