2019-08-27 15:34:20 +08:00
|
|
|
/*
|
|
|
|
* 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:
|
2019-08-28 19:12:44 +08:00
|
|
|
SubDevice(ExecutionEnvironment *executionEnvironment, uint32_t deviceIndex, RootDevice &rootDevice);
|
|
|
|
void retain() override;
|
|
|
|
unique_ptr_if_unused<Device> release() override;
|
|
|
|
void retainInternal();
|
|
|
|
void releaseInternal();
|
2019-08-27 15:34:20 +08:00
|
|
|
|
|
|
|
protected:
|
2019-08-28 19:12:44 +08:00
|
|
|
RootDevice &rootDevice;
|
2019-08-27 15:34:20 +08:00
|
|
|
};
|
|
|
|
} // namespace NEO
|