mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
Add new debug flag to limit the number of returned devices.
Change-Id: I01e1b6804291956fb62b84ff5df68c57b51bd17d
This commit is contained in:
committed by
sys_ocldev
parent
118d3ed0e2
commit
12b4d44375
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <algorithm>
|
||||
#include "api.h"
|
||||
#include "CL/cl.h"
|
||||
#include "runtime/accelerators/intel_motion_estimation.h"
|
||||
@@ -199,6 +200,10 @@ cl_int CL_API_CALL clGetDeviceIDs(cl_platform_id platform,
|
||||
}
|
||||
}
|
||||
|
||||
if (DebugManager.flags.LimitAmountOfReturnedDevices.get()) {
|
||||
retNum = std::min(static_cast<uint32_t>(DebugManager.flags.LimitAmountOfReturnedDevices.get()), retNum);
|
||||
}
|
||||
|
||||
if (numDevices) {
|
||||
*numDevices = retNum;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user