Add Device::getParentDevice function

Change-Id: I7b75bca67dceb74624c8dd8fd8c1542437fd9393
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-07-15 12:38:34 +02:00
parent 74d520e893
commit bbf50f8d4d
6 changed files with 25 additions and 1 deletions

View File

@@ -43,6 +43,10 @@ Device *SubDevice::getDeviceById(uint32_t deviceId) const {
return const_cast<SubDevice *>(this);
}
Device *SubDevice::getParentDevice() const {
return &rootDevice;
}
uint64_t SubDevice::getGlobalMemorySize() const {
auto globalMemorySize = Device::getGlobalMemorySize();
return globalMemorySize / rootDevice.getNumAvailableDevices();