Files
compute-runtime/runtime/device/sub_device.h
Mateusz Jablonski 5a8f455a84 Remove csrsContainer from root device environment
improve mocking:
- add method to create RootDevice in Platform
- add method to create SubDevice in RootDevice
- add method to create CommandStreamReceiver in Device

Related-To: NEO-3691

Change-Id: Ie9fe3de260492604333c8ca93796bfbffae518c4
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-11-13 10:05:09 +01:00

32 lines
829 B
C++

/*
* Copyright (C) 2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/device/device.h"
namespace NEO {
class RootDevice;
class SubDevice : public Device {
public:
SubDevice(ExecutionEnvironment *executionEnvironment, uint32_t subDeviceIndex, RootDevice &rootDevice);
void retain() override;
unique_ptr_if_unused<Device> release() override;
void retainInternal();
void releaseInternal();
uint32_t getNumAvailableDevices() const override;
uint32_t getRootDeviceIndex() const override;
Device *getDeviceById(uint32_t deviceId) const override;
uint32_t getSubDeviceIndex() const;
protected:
DeviceBitfield getDeviceBitfieldForOsContext() const override;
const uint32_t subDeviceIndex;
RootDevice &rootDevice;
};
} // namespace NEO