mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Move Device::getProductAbbrev method to MockDevice
Change-Id: Ia146d0198039b526e563a44d76710ac175ea3b88 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user