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

Function initDevice

src/library/tools/tune/tune.c:519–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517}
518
519void
520initDevice(int dev)
521{
522 cl_int status = 0;
523 cl_uint num_devices;
524 cl_device_id* deviceIDs =
525 (cl_device_id *)calloc(genInfo.numDevices, sizeof(cl_device_id));
526
527 status = clGetDeviceIDs(genInfo.platform, genInfo.devType,
528 genInfo.numDevices, deviceIDs, &num_devices);
529 checkErrorFunc("clGetDeviceIDs", status);
530
531 genInfo.targetDevice.id = deviceIDs[dev];
532 identifyDevice(&genInfo.targetDevice);
533 genInfo.deviceName = getDevName(&genInfo.targetDevice);
534 initCLDeviceInfoRec(&genInfo.targetDevice, &genInfo.deviceInfos);
535}
536
537void
538getContext(void)

Callers 1

createFileFunction · 0.85

Calls 4

checkErrorFuncFunction · 0.85
identifyDeviceFunction · 0.85
getDevNameFunction · 0.85
initCLDeviceInfoRecFunction · 0.85

Tested by

no test coverage detected