Files
compute-runtime/runtime/device/root_device.h
Mateusz Jablonski ea64a3fbc3 Add method for getting number of available devices
Related-To: NEO-3691

Change-Id: Ida2454adbfc9b177acbbb320f3f9577849a6fd74
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-09-24 06:29:25 +02:00

32 lines
762 B
C++

/*
* 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;
bool createDeviceImpl() override;
uint32_t getNumAvailableDevices() const override;
uint32_t getNumSubDevices() const;
/* We hide the retain and release function of BaseObject. */
void retain() override;
unique_ptr_if_unused<Device> release() override;
protected:
DeviceBitfield getDeviceBitfieldForOsContext() const override;
std::vector<std::unique_ptr<SubDevice>> subdevices;
};
} // namespace NEO