MCPcopy Create free account
hub / github.com/ValveSoftware/steam-audio / createOpenCLDevice

Method createOpenCLDevice

core/src/core/api_opencl_device.cpp:202–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202IPLerror 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
227IPLerror CContext::createOpenCLDeviceFromExisting(void* convolutionQueue,
228 void* irUpdateQueue,

Callers 5

iplOpenCLDeviceCreateFunction · 0.45
iplOpenCLDeviceCreateFunction · 0.45
iplOpenCLDeviceCreateFunction · 0.45
iplOpenCLDeviceCreateFunction · 0.45
iplOpenCLDeviceCreateFunction · 0.45

Calls 2

statusMethod · 0.80
allocateMethod · 0.45

Tested by

no test coverage detected