2019-08-27 09:34:20 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2019 Intel Corporation
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#include "runtime/device/device.h"
|
|
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
|
|
class SubDevice;
|
|
|
|
|
|
|
|
|
|
class RootDevice : public Device {
|
|
|
|
|
public:
|
|
|
|
|
RootDevice(ExecutionEnvironment *executionEnvironment, uint32_t deviceIndex);
|
|
|
|
|
~RootDevice() override;
|
2019-08-28 13:12:44 +02:00
|
|
|
bool createDeviceImpl() override;
|
2019-09-23 14:04:18 +02:00
|
|
|
uint32_t getNumAvailableDevices() const override;
|
2019-08-28 13:12:44 +02:00
|
|
|
uint32_t getNumSubDevices() const;
|
2019-10-21 13:41:35 +02:00
|
|
|
uint32_t getRootDeviceIndex() const override;
|
2019-10-10 15:56:10 +02:00
|
|
|
Device *getDeviceById(uint32_t deviceId) const override;
|
2019-08-28 13:12:44 +02:00
|
|
|
/* We hide the retain and release function of BaseObject. */
|
|
|
|
|
void retain() override;
|
|
|
|
|
unique_ptr_if_unused<Device> release() override;
|
2019-10-07 12:42:28 +02:00
|
|
|
void setupRootEngine(EngineControl engineControl);
|
2019-08-27 09:34:20 +02:00
|
|
|
|
|
|
|
|
protected:
|
2019-09-17 10:44:49 +02:00
|
|
|
DeviceBitfield getDeviceBitfieldForOsContext() const override;
|
2019-10-07 12:42:28 +02:00
|
|
|
bool createEngines() override;
|
2019-08-28 13:12:44 +02:00
|
|
|
std::vector<std::unique_ptr<SubDevice>> subdevices;
|
2019-08-27 09:34:20 +02:00
|
|
|
};
|
|
|
|
|
} // namespace NEO
|