forked from GPUOpen-Tools/gpu_performance_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadapter.h
49 lines (39 loc) · 1.52 KB
/
adapter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//==============================================================================
// Copyright (c) 2008-2021 Advanced Micro Devices, Inc. All rights reserved.
/// @author AMD Developer Tools Team
/// @file
/// @brief This is the main include file for Adapter.cpp to enumerate adapters.
//==============================================================================
#ifndef GPU_PERF_API_COMMON_ADAPTER_H_
#define GPU_PERF_API_COMMON_ADAPTER_H_
#include <vector>
#include <dxgi.h>
#include "ADLUtil.h"
/// @brief Enumerate adapters in the system.
class Adapter
{
public:
/// @brief Default constructor.
Adapter() = default;
/// @brief Destructor.
~Adapter() = default;
/// @brief Get ASIC information for all GPUs in the system.
///
/// @param [out] asic_info_list The ADLUtil_ASICInfo vector.
///
/// @return True if ASIC info list was retrieved successfully, false if not.
bool GetAsicInfoList(AsicInfoList& asic_info_list) const;
private:
/// @brief Copy constructor.
Adapter(const Adapter&) = default;
/// @brief Copy assignment operator.
///
/// @return Item being assigned.
Adapter& operator=(const Adapter&) = default;
/// @brief Convert DXGI adapter description to ADL ASIC information.
///
/// @param [in] dxgi_adapter_desc DXGI adapter description.
/// @param [out] asic_info ADL ASIC information.
static void DxgiAdapterDescToAsicInfo(const DXGI_ADAPTER_DESC& dxgi_adapter_desc, ADLUtil_ASICInfo& asic_info);
};
#endif // GPU_PERF_API_COMMON_ADAPTER_H_