Move Device::getProductAbbrev method to MockDevice

Change-Id: Ia146d0198039b526e563a44d76710ac175ea3b88
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-11-29 10:30:14 +01:00
parent 273a416f28
commit 244146c203
5 changed files with 7 additions and 7 deletions

View File

@ -177,10 +177,6 @@ const DeviceInfo &Device::getDeviceInfo() const {
return deviceInfo;
}
const char *Device::getProductAbbrev() const {
return hardwarePrefix[getHardwareInfo().platform.eProductFamily];
}
double Device::getProfilingTimerResolution() {
return osTime->getDynamicDeviceTimerResolution(getHardwareInfo());
}

View File

@ -57,8 +57,6 @@ class Device : public BaseObject<_cl_device_id> {
EngineControl &getEngine(aub_stream::EngineType engineType, bool lowPriority);
EngineControl &getDefaultEngine();
const char *getProductAbbrev() const;
// This helper template is meant to simplify getDeviceInfo
template <cl_device_info Param>
void getCap(const void *&src,

View File

@ -23,7 +23,7 @@ std::string getAubFileName(const NEO::Device *pDevice, const std::string baseNam
const auto pGtSystemInfo = &pDevice->getHardwareInfo().gtSystemInfo;
std::stringstream strfilename;
uint32_t subSlicesPerSlice = pGtSystemInfo->SubSliceCount / pGtSystemInfo->SliceCount;
strfilename << pDevice->getProductAbbrev() << "_" << pGtSystemInfo->SliceCount << "x" << subSlicesPerSlice << "x" << pGtSystemInfo->MaxEuPerSubSlice << "_" << baseName;
strfilename << hardwarePrefix[pDevice->getHardwareInfo().platform.eProductFamily] << "_" << pGtSystemInfo->SliceCount << "x" << subSlicesPerSlice << "x" << pGtSystemInfo->MaxEuPerSubSlice << "_" << baseName;
return strfilename.str();
}

View File

@ -31,6 +31,10 @@ MockDevice::MockDevice()
initializeCaps();
}
const char *MockDevice::getProductAbbrev() const {
return hardwarePrefix[getHardwareInfo().platform.eProductFamily];
}
MockDevice::MockDevice(ExecutionEnvironment *executionEnvironment, uint32_t rootDeviceIndex)
: RootDevice(executionEnvironment, rootDeviceIndex) {
auto &hwInfo = getHardwareInfo();

View File

@ -67,6 +67,8 @@ class MockDevice : public RootDevice {
}
}
const char *getProductAbbrev() const;
template <typename T>
UltCommandStreamReceiver<T> &getUltCommandStreamReceiver() {
return reinterpret_cast<UltCommandStreamReceiver<T> &>(*engines[defaultEngineIndex].commandStreamReceiver);