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

Function loadKernel

src/library/blas/generic/common.c:342–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342Kernel VISIBILITY_HIDDEN
343*loadKernel( const unsigned char** buffer,
344 size_t sizeBuffer,
345 KernelKey *key,
346 const CLBLASKernExtra *extra,
347 cl_int *error)
348
349{
350 cl_int status = CL_SUCCESS;
351 Kernel* kernel;
352
353 kernel = allocKernel();
354 if (kernel == NULL) {
355 return NULL;
356 }
357
358 kernel->program = createClProgramWithBinary(key->context,
359 key->device,
360 (unsigned char*)*buffer,
361 sizeBuffer,
362 &status);
363 if (status == CL_SUCCESS) {
364 kernel->extraSize = sizeof(CLBLASKernExtra);
365 kernel->extra = calloc(1, kernel->extraSize);
366 *(CLBLASKernExtra*)(kernel->extra) = *extra;
367 kernel->dtor = extraDtor;
368 kernel->noSource = 1;
369 }
370 else {
371 putKernel(NULL, kernel);
372 storeErrorCode(error, status);
373 kernel = NULL;
374 }
375
376 return kernel;
377}
378
379#if !defined(DUMP_CLBLAS_KERNELS)
380

Callers 1

makeSolutionSeqFunction · 0.85

Calls 4

allocKernelFunction · 0.85
putKernelFunction · 0.85
storeErrorCodeFunction · 0.85

Tested by

no test coverage detected