Pass ExecutionEnvironment to get devices.

- this would allow for further re-use of objects allocated here.

Change-Id: I73b62ae3991ebd786dea3c085e1391194b8de6ba
This commit is contained in:
Mrozek, Michal
2018-08-07 14:46:15 +02:00
parent 4eb2e64231
commit d17879d412
18 changed files with 51 additions and 37 deletions

View File

@@ -42,7 +42,7 @@ namespace OCLRT {
std::unique_ptr<Platform> platformImpl;
bool getDevices(HardwareInfo **hwInfo, size_t &numDevicesReturned);
bool getDevices(HardwareInfo **hwInfo, size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment);
Platform *platform() { return platformImpl.get(); }
@@ -138,7 +138,7 @@ bool Platform::initialize() {
return true;
}
state = OCLRT::getDevices(&hwInfo, numDevicesReturned) ? StateIniting : StateNone;
state = OCLRT::getDevices(&hwInfo, numDevicesReturned, *executionEnvironment) ? StateIniting : StateNone;
if (state == StateNone) {
return false;