| 517 | } |
| 518 | |
| 519 | void |
| 520 | initDevice(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 | |
| 537 | void |
| 538 | getContext(void) |
no test coverage detected