Skip to content

Commit 244146c

Browse files
Move Device::getProductAbbrev method to MockDevice
Change-Id: Ia146d0198039b526e563a44d76710ac175ea3b88 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
1 parent 273a416 commit 244146c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

runtime/device/device.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,6 @@ const DeviceInfo &Device::getDeviceInfo() const {
177177
return deviceInfo;
178178
}
179179

180-
const char *Device::getProductAbbrev() const {
181-
return hardwarePrefix[getHardwareInfo().platform.eProductFamily];
182-
}
183-
184180
double Device::getProfilingTimerResolution() {
185181
return osTime->getDynamicDeviceTimerResolution(getHardwareInfo());
186182
}

runtime/device/device.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ class Device : public BaseObject<_cl_device_id> {
5757
EngineControl &getEngine(aub_stream::EngineType engineType, bool lowPriority);
5858
EngineControl &getDefaultEngine();
5959

60-
const char *getProductAbbrev() const;
61-
6260
// This helper template is meant to simplify getDeviceInfo
6361
template <cl_device_info Param>
6462
void getCap(const void *&src,

unit_tests/aub_tests/command_stream/aub_mem_dump_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ std::string getAubFileName(const NEO::Device *pDevice, const std::string baseNam
2323
const auto pGtSystemInfo = &pDevice->getHardwareInfo().gtSystemInfo;
2424
std::stringstream strfilename;
2525
uint32_t subSlicesPerSlice = pGtSystemInfo->SubSliceCount / pGtSystemInfo->SliceCount;
26-
strfilename << pDevice->getProductAbbrev() << "_" << pGtSystemInfo->SliceCount << "x" << subSlicesPerSlice << "x" << pGtSystemInfo->MaxEuPerSubSlice << "_" << baseName;
26+
strfilename << hardwarePrefix[pDevice->getHardwareInfo().platform.eProductFamily] << "_" << pGtSystemInfo->SliceCount << "x" << subSlicesPerSlice << "x" << pGtSystemInfo->MaxEuPerSubSlice << "_" << baseName;
2727

2828
return strfilename.str();
2929
}

unit_tests/mocks/mock_device.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ MockDevice::MockDevice()
3131
initializeCaps();
3232
}
3333

34+
const char *MockDevice::getProductAbbrev() const {
35+
return hardwarePrefix[getHardwareInfo().platform.eProductFamily];
36+
}
37+
3438
MockDevice::MockDevice(ExecutionEnvironment *executionEnvironment, uint32_t rootDeviceIndex)
3539
: RootDevice(executionEnvironment, rootDeviceIndex) {
3640
auto &hwInfo = getHardwareInfo();

unit_tests/mocks/mock_device.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ class MockDevice : public RootDevice {
6767
}
6868
}
6969

70+
const char *getProductAbbrev() const;
71+
7072
template <typename T>
7173
UltCommandStreamReceiver<T> &getUltCommandStreamReceiver() {
7274
return reinterpret_cast<UltCommandStreamReceiver<T> &>(*engines[defaultEngineIndex].commandStreamReceiver);

0 commit comments

Comments
 (0)