| 176 | // -------------------------------------------------------------------------------------------------------------------- |
| 177 | |
| 178 | IPLerror CContext::createOpenCLDeviceList(IPLOpenCLDeviceSettings* settings, |
| 179 | IOpenCLDeviceList** deviceList) |
| 180 | { |
| 181 | #if defined(IPL_USES_OPENCL) |
| 182 | if (!settings || !deviceList) |
| 183 | return IPL_STATUS_FAILURE; |
| 184 | |
| 185 | try |
| 186 | { |
| 187 | auto _deviceList = reinterpret_cast<COpenCLDeviceList*>(gMemory().allocate(sizeof(COpenCLDeviceList), Memory::kDefaultAlignment)); |
| 188 | new (_deviceList) COpenCLDeviceList(this, settings); |
| 189 | *deviceList = _deviceList; |
| 190 | } |
| 191 | catch (Exception exception) |
| 192 | { |
| 193 | return static_cast<IPLerror>(exception.status()); |
| 194 | } |
| 195 | |
| 196 | return IPL_STATUS_SUCCESS; |
| 197 | #else |
| 198 | return IPL_STATUS_FAILURE; |
| 199 | #endif |
| 200 | } |
| 201 | |
| 202 | IPLerror CContext::createOpenCLDevice(IOpenCLDeviceList* deviceList, |
| 203 | IPLint32 index, |
no test coverage detected