Pass EngineUsage to getEngine

Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
Related-To: NEO-5610
This commit is contained in:
Maciej Dziuban
2021-03-16 12:34:27 +00:00
committed by Compute-Runtime-Automation
parent 274d2ff4b4
commit 3f5b9df122
18 changed files with 40 additions and 39 deletions

View File

@@ -270,11 +270,11 @@ size_t Device::getIndexOfNonEmptyEngineGroup(EngineGroupType engineGroupType) co
return result;
}
EngineControl &Device::getEngine(aub_stream::EngineType engineType, bool lowPriority, bool internalUsage) {
EngineControl &Device::getEngine(aub_stream::EngineType engineType, EngineUsage engineUsage) {
for (auto &engine : engines) {
if (engine.osContext->getEngineType() == engineType &&
engine.osContext->isLowPriority() == lowPriority &&
engine.osContext->isInternalEngine() == internalUsage) {
engine.osContext->isLowPriority() == (engineUsage == EngineUsage::LowPriority) &&
engine.osContext->isInternalEngine() == (engineUsage == EngineUsage::Internal)) {
return engine;
}
}

View File

@@ -47,7 +47,7 @@ class Device : public ReferenceTrackedObject<Device> {
bool getHostTimer(uint64_t *hostTimestamp) const;
const HardwareInfo &getHardwareInfo() const;
const DeviceInfo &getDeviceInfo() const;
EngineControl &getEngine(aub_stream::EngineType engineType, bool lowPriority, bool internalUsage);
EngineControl &getEngine(aub_stream::EngineType engineType, EngineUsage engineUsage);
std::vector<std::vector<EngineControl>> &getEngineGroups() {
return this->engineGroups;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -18,6 +18,6 @@ EngineControl &Device::getInternalEngine() {
auto engineType = getChosenEngineType(getHardwareInfo());
return this->getDeviceById(0)->getEngine(engineType, false, true);
return this->getDeviceById(0)->getEngine(engineType, EngineUsage::Internal);
}
} // namespace NEO