| 200 | } |
| 201 | |
| 202 | IPLerror CContext::createOpenCLDevice(IOpenCLDeviceList* deviceList, |
| 203 | IPLint32 index, |
| 204 | IOpenCLDevice** device) |
| 205 | { |
| 206 | #if defined(IPL_USES_OPENCL) |
| 207 | if (!deviceList || index < 0 || !device) |
| 208 | return IPL_STATUS_FAILURE; |
| 209 | |
| 210 | try |
| 211 | { |
| 212 | auto _device = reinterpret_cast<COpenCLDevice*>(gMemory().allocate(sizeof(COpenCLDevice), Memory::kDefaultAlignment)); |
| 213 | new (_device) COpenCLDevice(this, deviceList, index); |
| 214 | *device = _device; |
| 215 | } |
| 216 | catch (Exception exception) |
| 217 | { |
| 218 | return static_cast<IPLerror>(exception.status()); |
| 219 | } |
| 220 | |
| 221 | return IPL_STATUS_SUCCESS; |
| 222 | #else |
| 223 | return IPL_STATUS_FAILURE; |
| 224 | #endif |
| 225 | } |
| 226 | |
| 227 | IPLerror CContext::createOpenCLDeviceFromExisting(void* convolutionQueue, |
| 228 | void* irUpdateQueue, |
no test coverage detected