| 32 | // -------------------------------------------------------------------------------------------------------------------- |
| 33 | |
| 34 | COpenCLDeviceList::COpenCLDeviceList(CContext* context, |
| 35 | IPLOpenCLDeviceSettings* settings) |
| 36 | { |
| 37 | #if defined(IPL_USES_OPENCL) |
| 38 | auto _context = context->mHandle.get(); |
| 39 | if (!_context) |
| 40 | throw Exception(Status::Failure); |
| 41 | |
| 42 | auto _type = static_cast<OpenCLDeviceType>(settings->type); |
| 43 | auto _requiresTAN = (settings->requiresTAN == IPL_TRUE); |
| 44 | |
| 45 | new (&mHandle) Handle<OpenCLDeviceList>(ipl::make_shared<OpenCLDeviceList>(_type, settings->numCUsToReserve, settings->fractionCUsForIRUpdate, _requiresTAN), _context); |
| 46 | #endif |
| 47 | } |
| 48 | |
| 49 | IOpenCLDeviceList* COpenCLDeviceList::retain() |
| 50 | { |