Files
compute-runtime/shared/source/device/device_get_engine.cpp
Maciej Dziuban 3f5b9df122 Pass EngineUsage to getEngine
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
Related-To: NEO-5610
2021-03-16 16:31:44 +01:00

24 lines
617 B
C++

/*
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/command_stream/command_stream_receiver.h"
#include "shared/source/device/device.h"
#include "shared/source/helpers/hw_helper.h"
namespace NEO {
EngineControl &Device::getInternalEngine() {
if (this->engines[0].commandStreamReceiver->getType() != CommandStreamReceiverType::CSR_HW) {
return this->getDefaultEngine();
}
auto engineType = getChosenEngineType(getHardwareInfo());
return this->getDeviceById(0)->getEngine(engineType, EngineUsage::Internal);
}
} // namespace NEO