mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Refactoring HwDeviceId
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b2fae343ec
commit
67aa1ad7ec
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,14 +7,19 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
|
||||
#include <string>
|
||||
namespace NEO {
|
||||
|
||||
class HwDeviceId : NonCopyableClass {
|
||||
class HwDeviceIdDrm : public HwDeviceId {
|
||||
public:
|
||||
HwDeviceId(int fileDescriptorIn, const char *pciPathIn) : fileDescriptor(fileDescriptorIn), pciPath(pciPathIn) {}
|
||||
~HwDeviceId();
|
||||
static constexpr DriverModelType driverModelType = DriverModelType::DRM;
|
||||
|
||||
HwDeviceIdDrm(int fileDescriptorIn, const char *pciPathIn)
|
||||
: HwDeviceId(DriverModelType::DRM),
|
||||
fileDescriptor(fileDescriptorIn), pciPath(pciPathIn) {}
|
||||
~HwDeviceIdDrm() override;
|
||||
int getFileDescriptor() const { return fileDescriptor; }
|
||||
const char *getPciPath() const { return pciPath.c_str(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user