node-gpuinfo 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +336 -0
- package/binding.gyp +69 -0
- package/build/Release/gpu.exp +0 -0
- package/build/Release/gpu.lib +0 -0
- package/build/Release/gpu.node +0 -0
- package/build/Release/gpu.pdb +0 -0
- package/build/binding.sln +19 -0
- package/build/gpu.vcxproj +175 -0
- package/build/gpu.vcxproj.filters +169 -0
- package/example.js +69 -0
- package/index.js +33 -0
- package/package.json +68 -0
- package/src/binding.cpp +201 -0
- package/src/gpu_info.c +130 -0
- package/src/gpu_info.h +86 -0
- package/src/includes/adlx/ADLX.h +367 -0
- package/src/includes/adlx/ADLXDefines.h +1345 -0
- package/src/includes/adlx/ADLXHelper/ADLXHelper.c +175 -0
- package/src/includes/adlx/ADLXHelper/ADLXHelper.h +245 -0
- package/src/includes/adlx/ADLXHelper/WinAPIS.c +64 -0
- package/src/includes/adlx/ADLXStructures.h +206 -0
- package/src/includes/adlx/ADLXVersion.h +18 -0
- package/src/includes/adlx/I3DSettings.h +3476 -0
- package/src/includes/adlx/I3DSettings1.h +292 -0
- package/src/includes/adlx/I3DSettings2.h +317 -0
- package/src/includes/adlx/IApplications.h +397 -0
- package/src/includes/adlx/IChangedEvent.h +71 -0
- package/src/includes/adlx/ICollections.h +325 -0
- package/src/includes/adlx/IDesktops.h +918 -0
- package/src/includes/adlx/IDisplay3DLUT.h +663 -0
- package/src/includes/adlx/IDisplayGamma.h +683 -0
- package/src/includes/adlx/IDisplayGamut.h +760 -0
- package/src/includes/adlx/IDisplaySettings.h +3476 -0
- package/src/includes/adlx/IDisplays.h +2676 -0
- package/src/includes/adlx/IDisplays1.h +191 -0
- package/src/includes/adlx/IDisplays2.h +188 -0
- package/src/includes/adlx/IDisplays3.h +256 -0
- package/src/includes/adlx/IGPUAutoTuning.h +460 -0
- package/src/includes/adlx/IGPUManualFanTuning.h +1007 -0
- package/src/includes/adlx/IGPUManualGFXTuning.h +607 -0
- package/src/includes/adlx/IGPUManualPowerTuning.h +340 -0
- package/src/includes/adlx/IGPUManualVRAMTuning.h +576 -0
- package/src/includes/adlx/IGPUPresetTuning.h +469 -0
- package/src/includes/adlx/IGPUTuning.h +1239 -0
- package/src/includes/adlx/IGPUTuning1.h +197 -0
- package/src/includes/adlx/II2C.h +198 -0
- package/src/includes/adlx/ILog.h +72 -0
- package/src/includes/adlx/IMultiMedia.h +578 -0
- package/src/includes/adlx/IPerformanceMonitoring.h +2520 -0
- package/src/includes/adlx/IPerformanceMonitoring1.h +134 -0
- package/src/includes/adlx/IPerformanceMonitoring2.h +341 -0
- package/src/includes/adlx/IPerformanceMonitoring3.h +199 -0
- package/src/includes/adlx/IPowerTuning.h +473 -0
- package/src/includes/adlx/IPowerTuning1.h +515 -0
- package/src/includes/adlx/ISmartAccessMemory.h +114 -0
- package/src/includes/adlx/ISystem.h +1557 -0
- package/src/includes/adlx/ISystem1.h +237 -0
- package/src/includes/adlx/ISystem2.h +643 -0
- package/src/linux/amd_linux.c +269 -0
- package/src/linux/intel_linux.c +20 -0
- package/src/linux/nvidia_linux.c +257 -0
- package/src/macos/amd_mac.c +131 -0
- package/src/macos/intel_mac.c +131 -0
- package/src/macos/nvidia_mac.c +21 -0
- package/src/vendor/amd.c +37 -0
- package/src/vendor/intel.c +37 -0
- package/src/vendor/nvidia.c +37 -0
- package/src/windows/amd_windows.c +468 -0
- package/src/windows/intel_windows.c +157 -0
- package/src/windows/nvidia_windows.c +252 -0
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (c) 2021 - 2025 Advanced Micro Devices, Inc. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
//-------------------------------------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
#ifndef ADLX_POWERTUNING_H
|
|
7
|
+
#define ADLX_POWERTUNING_H
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "ADLXStructures.h"
|
|
11
|
+
#include "IChangedEvent.h"
|
|
12
|
+
|
|
13
|
+
#pragma region IADLXSmartShiftMax
|
|
14
|
+
#if defined (__cplusplus)
|
|
15
|
+
namespace adlx
|
|
16
|
+
{
|
|
17
|
+
class ADLX_NO_VTABLE IADLXSmartShiftMax : public IADLXInterface
|
|
18
|
+
{
|
|
19
|
+
public:
|
|
20
|
+
ADLX_DECLARE_IID (L"IADLXSmartShiftMax")
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
*@page DOX_IADLXSmartShiftMax_IsSupported IsSupported
|
|
24
|
+
*@ENG_START_DOX @brief Checks if AMD SmartShift Max is supported. @ENG_END_DOX
|
|
25
|
+
*
|
|
26
|
+
*@syntax
|
|
27
|
+
*@codeStart
|
|
28
|
+
* @ref ADLX_RESULT IsSupported (adlx_bool* supported)
|
|
29
|
+
*@codeEnd
|
|
30
|
+
*
|
|
31
|
+
*@params
|
|
32
|
+
* @paramrow{1.,[out],supported,adlx_bool*,@ENG_START_DOX The pointer to a variable where the state of AMD SmartShift Max is returned. The variable is __true__ if AMD SmartShift Max is supported. The variable is __false__ if AMD SmartShift Max is not supported. @ENG_END_DOX}
|
|
33
|
+
*
|
|
34
|
+
*@retvalues
|
|
35
|
+
*@ENG_START_DOX If the state of AMD SmartShift Max is successfully returned, __ADLX_OK__ is returned.<br>
|
|
36
|
+
* If the state of AMD SmartShift Max is not successfully returned, an error code is returned.<br>
|
|
37
|
+
* Refer to @ref ADLX_RESULT for success codes and error codes.<br> @ENG_END_DOX
|
|
38
|
+
*
|
|
39
|
+
*@addinfo
|
|
40
|
+
*@ENG_START_DOX
|
|
41
|
+
*AMD SmartShift Max dynamically shifts power between CPU and GPU to boost performance, depending on workload.
|
|
42
|
+
*@ENG_END_DOX
|
|
43
|
+
*
|
|
44
|
+
*@copydoc IADLXSmartShiftMax_REQ_TABLE
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
virtual ADLX_RESULT ADLX_STD_CALL IsSupported (adlx_bool* supported) = 0;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
*@page DOX_IADLXSmartShiftMax_GetBiasMode GetBiasMode
|
|
51
|
+
*@ENG_START_DOX @brief Gets the AMD SmartShift Max current bias mode. @ENG_END_DOX
|
|
52
|
+
*
|
|
53
|
+
*@syntax
|
|
54
|
+
*@codeStart
|
|
55
|
+
* @ref ADLX_RESULT GetBiasMode (@ref ADLX_SSM_BIAS_MODE* mode)
|
|
56
|
+
*@codeEnd
|
|
57
|
+
*
|
|
58
|
+
*@params
|
|
59
|
+
* @paramrow{1.,[out],mode,@ref ADLX_SSM_BIAS_MODE*,@ENG_START_DOX The pointer to a variable where the AMD SmartShift Max current bias mode is returned. @ENG_END_DOX}
|
|
60
|
+
*
|
|
61
|
+
*@retvalues
|
|
62
|
+
*@ENG_START_DOX If the current bias mode is successfully returned, __ADLX_OK__ is returned.<br>
|
|
63
|
+
* If the current bias mode is not successfully returned, an error code is returned.<br>
|
|
64
|
+
* Refer to @ref ADLX_RESULT for success codes and error codes.<br> @ENG_END_DOX
|
|
65
|
+
*
|
|
66
|
+
*@addinfo
|
|
67
|
+
*@ENG_START_DOX
|
|
68
|
+
*AMD SmartShift Max dynamically shifts power between CPU and GPU to boost performance according to workload dependencies.
|
|
69
|
+
*@ENG_END_DOX
|
|
70
|
+
*
|
|
71
|
+
*@copydoc IADLXSmartShiftMax_REQ_TABLE
|
|
72
|
+
*
|
|
73
|
+
*/
|
|
74
|
+
virtual ADLX_RESULT ADLX_STD_CALL GetBiasMode(ADLX_SSM_BIAS_MODE* mode) = 0;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
*@page DOX_IADLXSmartShiftMax_SetBiasMode SetBiasMode
|
|
78
|
+
*@ENG_START_DOX @brief Sets AMD SmartShift Max bias mode. @ENG_END_DOX
|
|
79
|
+
*
|
|
80
|
+
*@syntax
|
|
81
|
+
*@codeStart
|
|
82
|
+
* @ref ADLX_RESULT SetBiasMode (@ref ADLX_SSM_BIAS_MODE mode)
|
|
83
|
+
*@codeEnd
|
|
84
|
+
*
|
|
85
|
+
*@params
|
|
86
|
+
* @paramrow{1.,[in],mode,@ref ADLX_SSM_BIAS_MODE,@ENG_START_DOX The new AMD SmartShift Max bias mode. @ENG_END_DOX}
|
|
87
|
+
*
|
|
88
|
+
*@retvalues
|
|
89
|
+
*@ENG_START_DOX If the bias mode is successfully set, __ADLX_OK__ is returned.<br>
|
|
90
|
+
* If the bias mode is not successfully set, an error code is returned.<br>
|
|
91
|
+
* Refer to @ref ADLX_RESULT for success codes and error codes.<br> @ENG_END_DOX
|
|
92
|
+
*
|
|
93
|
+
*@addinfo
|
|
94
|
+
*@ENG_START_DOX
|
|
95
|
+
*AMD SmartShift Max dynamically shifts power between CPU and GPU to boost performance, depending on workload.
|
|
96
|
+
*@ENG_END_DOX
|
|
97
|
+
*
|
|
98
|
+
*@copydoc IADLXSmartShiftMax_REQ_TABLE
|
|
99
|
+
*
|
|
100
|
+
*/
|
|
101
|
+
virtual ADLX_RESULT ADLX_STD_CALL SetBiasMode(ADLX_SSM_BIAS_MODE mode) = 0;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
*@page DOX_IADLXSmartShiftMax_GetBiasRange GetBiasRange
|
|
105
|
+
*@ENG_START_DOX @brief Gets maximum bias, minimum bias, and step bias of AMD SmartShift Max. @ENG_END_DOX
|
|
106
|
+
*
|
|
107
|
+
*@syntax
|
|
108
|
+
*@codeStart
|
|
109
|
+
* @ref ADLX_RESULT GetBiasRange (@ref ADLX_IntRange* range)
|
|
110
|
+
*@codeEnd
|
|
111
|
+
*
|
|
112
|
+
*@params
|
|
113
|
+
* @paramrow{1.,[out],range,@ref ADLX_IntRange*,@ENG_START_DOX The pointer to a variable where the bias range of AMD SmartShift Max is returned. @ENG_END_DOX}
|
|
114
|
+
*
|
|
115
|
+
*@retvalues
|
|
116
|
+
*@ENG_START_DOX If the bias range is successfully returned, __ADLX_OK__ is returned.<br>
|
|
117
|
+
* If the bias range is not successfully returned, an error code is returned.<br>
|
|
118
|
+
* Refer to @ref ADLX_RESULT for success codes and error codes.<br> @ENG_END_DOX
|
|
119
|
+
*
|
|
120
|
+
*@addinfo
|
|
121
|
+
*@ENG_START_DOX
|
|
122
|
+
*AMD SmartShift Max dynamically shifts power between CPU and GPU to boost performance, depending on workload.
|
|
123
|
+
*@ENG_END_DOX
|
|
124
|
+
*
|
|
125
|
+
*@copydoc IADLXSmartShiftMax_REQ_TABLE
|
|
126
|
+
*
|
|
127
|
+
*/
|
|
128
|
+
virtual ADLX_RESULT ADLX_STD_CALL GetBiasRange(ADLX_IntRange* range) = 0;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
*@page DOX_IADLXSmartShiftMax_GetBias GetBias
|
|
132
|
+
*@ENG_START_DOX @brief Gets the AMD SmartShift Max current bias. @ENG_END_DOX
|
|
133
|
+
*
|
|
134
|
+
*@syntax
|
|
135
|
+
*@codeStart
|
|
136
|
+
* @ref ADLX_RESULT GetBias (adlx_int* bias)
|
|
137
|
+
*@codeEnd
|
|
138
|
+
*
|
|
139
|
+
*@params
|
|
140
|
+
* @paramrow{1.,[out],bias,adlx_int*,@ENG_START_DOX The pointer to a variable where the AMD SmartShift Max current bias is returned. @ENG_END_DOX}
|
|
141
|
+
*
|
|
142
|
+
*@retvalues
|
|
143
|
+
*@ENG_START_DOX If the current bias is successfully returned, __ADLX_OK__ is returned.<br>
|
|
144
|
+
* If the current bias is not successfully returned, an error code is returned.<br>
|
|
145
|
+
* Refer to @ref ADLX_RESULT for success codes and error codes.<br> @ENG_END_DOX
|
|
146
|
+
*
|
|
147
|
+
*@addinfo
|
|
148
|
+
*@ENG_START_DOX
|
|
149
|
+
*AMD SmartShift Max dynamically shifts power between CPU and GPU to boost performance, depending on workload.
|
|
150
|
+
*@ENG_END_DOX
|
|
151
|
+
*
|
|
152
|
+
*@copydoc IADLXSmartShiftMax_REQ_TABLE
|
|
153
|
+
*
|
|
154
|
+
*/
|
|
155
|
+
virtual ADLX_RESULT ADLX_STD_CALL GetBias(adlx_int* bias) = 0;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
*@page DOX_IADLXSmartShiftMax_SetBias SetBias
|
|
159
|
+
*@ENG_START_DOX @brief Sets the bias of AMD SmartShift Max. @ENG_END_DOX
|
|
160
|
+
*
|
|
161
|
+
*@syntax
|
|
162
|
+
*@codeStart
|
|
163
|
+
* @ref ADLX_RESULT SetBias (adlx_int bias)
|
|
164
|
+
*@codeEnd
|
|
165
|
+
*
|
|
166
|
+
*@params
|
|
167
|
+
* @paramrow{1.,[in],bias,adlx_int,@ENG_START_DOX The new AMD SmartShift Max bias. @ENG_END_DOX}
|
|
168
|
+
*
|
|
169
|
+
*@retvalues
|
|
170
|
+
*@ENG_START_DOX If the bias is successfully set, __ADLX_OK__ is returned.<br>
|
|
171
|
+
* If the bias is not successfully set, an error code is returned.<br>
|
|
172
|
+
* Refer to @ref ADLX_RESULT for success codes and error codes.<br> @ENG_END_DOX
|
|
173
|
+
*
|
|
174
|
+
*@addinfo
|
|
175
|
+
*@ENG_START_DOX
|
|
176
|
+
*AMD SmartShift Max dynamically shifts power between CPU and GPU to boost performance, depending on workload.
|
|
177
|
+
*@ENG_END_DOX
|
|
178
|
+
*
|
|
179
|
+
*@copydoc IADLXSmartShiftMax_REQ_TABLE
|
|
180
|
+
*
|
|
181
|
+
*/
|
|
182
|
+
virtual ADLX_RESULT ADLX_STD_CALL SetBias(adlx_int bias) = 0;
|
|
183
|
+
}; //IADLXSmartShiftMax
|
|
184
|
+
//----------------------------------------------------------------------------------------------
|
|
185
|
+
typedef IADLXInterfacePtr_T<IADLXSmartShiftMax> IADLXSmartShiftMaxPtr;
|
|
186
|
+
} //namespace adlx
|
|
187
|
+
#else //__cplusplus
|
|
188
|
+
ADLX_DECLARE_IID (IADLXSmartShiftMax, L"IADLXSmartShiftMax")
|
|
189
|
+
typedef struct IADLXSmartShiftMax IADLXSmartShiftMax;
|
|
190
|
+
typedef struct IADLXSmartShiftMaxVtbl
|
|
191
|
+
{
|
|
192
|
+
//IADLXInterface
|
|
193
|
+
adlx_long (ADLX_STD_CALL *Acquire)(IADLXSmartShiftMax* pThis);
|
|
194
|
+
adlx_long (ADLX_STD_CALL *Release)(IADLXSmartShiftMax* pThis);
|
|
195
|
+
ADLX_RESULT (ADLX_STD_CALL *QueryInterface)(IADLXSmartShiftMax* pThis, const wchar_t* interfaceId, void** ppInterface);
|
|
196
|
+
|
|
197
|
+
//IADLXSmartShiftMax
|
|
198
|
+
ADLX_RESULT (ADLX_STD_CALL *IsSupported)(IADLXSmartShiftMax* pThis, adlx_bool* supported);
|
|
199
|
+
ADLX_RESULT (ADLX_STD_CALL *GetBiasMode)(IADLXSmartShiftMax* pThis, ADLX_SSM_BIAS_MODE* mode);
|
|
200
|
+
ADLX_RESULT (ADLX_STD_CALL *SetBiasMode)(IADLXSmartShiftMax* pThis, ADLX_SSM_BIAS_MODE mode);
|
|
201
|
+
ADLX_RESULT (ADLX_STD_CALL *GetBiasRange)(IADLXSmartShiftMax* pThis, ADLX_IntRange* range);
|
|
202
|
+
ADLX_RESULT (ADLX_STD_CALL *GetBias)(IADLXSmartShiftMax* pThis, adlx_int* bias);
|
|
203
|
+
ADLX_RESULT (ADLX_STD_CALL *SetBias)(IADLXSmartShiftMax* pThis, adlx_int bias);
|
|
204
|
+
}IADLXSmartShiftMaxVtbl;
|
|
205
|
+
struct IADLXSmartShiftMax { const IADLXSmartShiftMaxVtbl *pVtbl; };
|
|
206
|
+
#endif //__cplusplus
|
|
207
|
+
#pragma endregion IADLXSmartShiftMax
|
|
208
|
+
|
|
209
|
+
#pragma region IADLXPowerTuningChangedEvent
|
|
210
|
+
#if defined (__cplusplus)
|
|
211
|
+
namespace adlx
|
|
212
|
+
{
|
|
213
|
+
class ADLX_NO_VTABLE IADLXPowerTuningChangedEvent : public IADLXChangedEvent
|
|
214
|
+
{
|
|
215
|
+
public:
|
|
216
|
+
ADLX_DECLARE_IID (L"IADLXPowerTuningChangedEvent")
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
*@page DOX_IADLXPowerTuningChangedEvent_IsSmartShiftMaxChanged IsSmartShiftMaxChanged
|
|
220
|
+
*@ENG_START_DOX @brief Checks for changes to the AMD SmartShift Max settings. @ENG_END_DOX
|
|
221
|
+
*
|
|
222
|
+
*@syntax
|
|
223
|
+
*@codeStart
|
|
224
|
+
* adlx_bool IsSmartShiftMaxChanged ()
|
|
225
|
+
*@codeEnd
|
|
226
|
+
*
|
|
227
|
+
*@params
|
|
228
|
+
*N/A
|
|
229
|
+
*
|
|
230
|
+
*@retvalues
|
|
231
|
+
*@ENG_START_DOX If there are any changes to the AMD SmartShift Max settings, __true__ is returned.<br>
|
|
232
|
+
* If there are on changes to the AMD SmartShift Max settings, __false__ is returned.<br> @ENG_END_DOX
|
|
233
|
+
*
|
|
234
|
+
*@copydoc IADLXPowerTuningChangedEvent_REQ_TABLE
|
|
235
|
+
*
|
|
236
|
+
*/
|
|
237
|
+
virtual adlx_bool ADLX_STD_CALL IsSmartShiftMaxChanged () = 0;
|
|
238
|
+
}; //IADLXPowerTuningChangedEvent
|
|
239
|
+
//----------------------------------------------------------------------------------------------
|
|
240
|
+
typedef IADLXInterfacePtr_T<IADLXPowerTuningChangedEvent> IADLXPowerTuningChangedEventPtr;
|
|
241
|
+
} //namespace adlx
|
|
242
|
+
#else //__cplusplus
|
|
243
|
+
ADLX_DECLARE_IID (IADLXPowerTuningChangedEvent, L"IADLXPowerTuningChangedEvent")
|
|
244
|
+
typedef struct IADLXPowerTuningChangedEvent IADLXPowerTuningChangedEvent;
|
|
245
|
+
typedef struct IADLXPowerTuningChangedEventVtbl
|
|
246
|
+
{
|
|
247
|
+
//IADLXInterface
|
|
248
|
+
adlx_long (ADLX_STD_CALL *Acquire)(IADLXPowerTuningChangedEvent* pThis);
|
|
249
|
+
adlx_long (ADLX_STD_CALL *Release)(IADLXPowerTuningChangedEvent* pThis);
|
|
250
|
+
ADLX_RESULT (ADLX_STD_CALL *QueryInterface)(IADLXPowerTuningChangedEvent* pThis, const wchar_t* interfaceId, void** ppInterface);
|
|
251
|
+
|
|
252
|
+
//IADLXChangedEvent
|
|
253
|
+
ADLX_SYNC_ORIGIN(ADLX_STD_CALL* GetOrigin)(IADLXPowerTuningChangedEvent* pThis);
|
|
254
|
+
|
|
255
|
+
//IADLXPowerTuningChangedEvent
|
|
256
|
+
adlx_bool (ADLX_STD_CALL *IsSmartShiftMaxChanged)(IADLXPowerTuningChangedEvent* pThis);
|
|
257
|
+
}IADLXPowerTuningChangedEventVtbl;
|
|
258
|
+
struct IADLXPowerTuningChangedEvent { const IADLXPowerTuningChangedEventVtbl *pVtbl; };
|
|
259
|
+
#endif //__cplusplus
|
|
260
|
+
#pragma endregion IADLXPowerTuningChangedEvent
|
|
261
|
+
|
|
262
|
+
#pragma region IADLXPowerTuningChangedListener
|
|
263
|
+
#if defined (__cplusplus)
|
|
264
|
+
namespace adlx
|
|
265
|
+
{
|
|
266
|
+
class ADLX_NO_VTABLE IADLXPowerTuningChangedListener
|
|
267
|
+
{
|
|
268
|
+
public:
|
|
269
|
+
/**
|
|
270
|
+
*@page DOX_IADLXPowerTuningChangedListener_OnPowerTuningChanged OnPowerTuningChanged
|
|
271
|
+
*@ENG_START_DOX @brief __OnPowerTuningChanged__ is called by ADLX when power tuning settings change. @ENG_END_DOX
|
|
272
|
+
*
|
|
273
|
+
*@syntax
|
|
274
|
+
*@codeStart
|
|
275
|
+
* adlx_bool OnPowerTuningChanged (@ref DOX_IADLXPowerTuningChangedEvent* pPowerTuningChangedEvent)
|
|
276
|
+
*@codeEnd
|
|
277
|
+
*
|
|
278
|
+
*@params
|
|
279
|
+
*@paramrow{1.,[in] ,pPowerTuningChangedEvent,@ref DOX_IADLXPowerTuningChangedEvent* ,@ENG_START_DOX The pointer to a power tuning settings change event. @ENG_END_DOX}
|
|
280
|
+
*
|
|
281
|
+
*@retvalues
|
|
282
|
+
*@ENG_START_DOX If the application requires ADLX to continue notifying the next listener, __true__ must be returned.<br>
|
|
283
|
+
* If the application requires ADLX to stop notifying the next listener, __false__ must be returned.<br> @ENG_END_DOX
|
|
284
|
+
*
|
|
285
|
+
*@detaileddesc
|
|
286
|
+
*@ENG_START_DOX Once the application registers to the notifications with @ref DOX_IADLXPowerTuningChangedHandling_AddPowerTuningEventListener, ADLX will call this method until the application unregisters from the notifications with @ref DOX_IADLXPowerTuningChangedHandling_RemovePowerTuningEventListener.
|
|
287
|
+
* The method should return quickly to not block the execution path in ADLX. If the method requires a long processing of the event notification, the application must hold onto a reference to the power tuning settings change event with @ref DOX_IADLXInterface_Acquire and make it available on an asynchronous thread and return immediately. When the asynchronous thread is done processing it must discard the power tuning settings change event with @ref DOX_IADLXInterface_Release. @ENG_END_DOX
|
|
288
|
+
*
|
|
289
|
+
*@copydoc IADLXPowerTuningChangedListener_REQ_TABLE
|
|
290
|
+
*
|
|
291
|
+
*/
|
|
292
|
+
virtual adlx_bool ADLX_STD_CALL OnPowerTuningChanged(IADLXPowerTuningChangedEvent* pPowerTuningChangedEvent) = 0;
|
|
293
|
+
}; //IADLXPowerTuningChangedListener
|
|
294
|
+
} //namespace adlx
|
|
295
|
+
#else //__cplusplus
|
|
296
|
+
typedef struct IADLXPowerTuningChangedListener IADLXPowerTuningChangedListener;
|
|
297
|
+
typedef struct IADLXPowerTuningChangedListenerVtbl
|
|
298
|
+
{
|
|
299
|
+
adlx_bool (ADLX_STD_CALL *OnPowerTuningChanged)(IADLXPowerTuningChangedListener* pThis, IADLXPowerTuningChangedEvent* pPowerTuningChangedEvent);
|
|
300
|
+
} IADLXPowerTuningChangedListenerVtbl;
|
|
301
|
+
struct IADLXPowerTuningChangedListener { const IADLXPowerTuningChangedListenerVtbl *pVtbl; };
|
|
302
|
+
#endif //__cplusplus
|
|
303
|
+
#pragma endregion IADLXPowerTuningChangedListener
|
|
304
|
+
|
|
305
|
+
#pragma region IADLXPowerTuningChangedHandling
|
|
306
|
+
#if defined (__cplusplus)
|
|
307
|
+
namespace adlx
|
|
308
|
+
{
|
|
309
|
+
class ADLX_NO_VTABLE IADLXPowerTuningChangedHandling : public IADLXInterface
|
|
310
|
+
{
|
|
311
|
+
public:
|
|
312
|
+
ADLX_DECLARE_IID (L"IADLXPowerTuningChangedHandling")
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
*@page DOX_IADLXPowerTuningChangedHandling_AddPowerTuningEventListener AddPowerTuningEventListener
|
|
316
|
+
*@ENG_START_DOX @brief Registers an event listener for notifications whenever power tuning settings are changed. @ENG_END_DOX
|
|
317
|
+
*
|
|
318
|
+
*@syntax
|
|
319
|
+
*@codeStart
|
|
320
|
+
* @ref ADLX_RESULT AddPowerTuningEventListener (@ref DOX_IADLXPowerTuningChangedListener* pPowerTuningChangedListener)
|
|
321
|
+
*@codeEnd
|
|
322
|
+
*
|
|
323
|
+
*@params
|
|
324
|
+
*@paramrow{1.,[in] ,pPowerTuningChangedListener,@ref DOX_IADLXPowerTuningChangedListener* ,@ENG_START_DOX The pointer to the event listener interface to register for receiving power tuning settings change notifications. @ENG_END_DOX}
|
|
325
|
+
*
|
|
326
|
+
*@retvalues
|
|
327
|
+
*@ENG_START_DOX If the event listener is successfully registered, __ADLX_OK__ is returned.<br>
|
|
328
|
+
* If the event listener is not successfully registered, an error code is returned.<br>
|
|
329
|
+
* Refer to @ref ADLX_RESULT for success codes and error codes.<br> @ENG_END_DOX
|
|
330
|
+
*
|
|
331
|
+
*@detaileddesc
|
|
332
|
+
*@ENG_START_DOX Once the event listener is successfully registered, ADLX calls the @ref DOX_IADLXPowerTuningChangedListener_OnPowerTuningChanged listener method whenever power tuning settings are changed.<br>
|
|
333
|
+
* The event listener instance must exist until the application unregisters the event listener with @ref DOX_IADLXPowerTuningChangedHandling_RemovePowerTuningEventListener.<br> @ENG_END_DOX
|
|
334
|
+
*
|
|
335
|
+
*@copydoc IADLXPowerTuningChangedHandling_REQ_TABLE
|
|
336
|
+
*
|
|
337
|
+
*/
|
|
338
|
+
virtual ADLX_RESULT ADLX_STD_CALL AddPowerTuningEventListener (IADLXPowerTuningChangedListener* pPowerTuningChangedListener) = 0;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
*@page DOX_IADLXPowerTuningChangedHandling_RemovePowerTuningEventListener RemovePowerTuningEventListener
|
|
342
|
+
*@ENG_START_DOX @brief Unregisters an event listener from the power tuning settings event list. @ENG_END_DOX
|
|
343
|
+
*
|
|
344
|
+
*@syntax
|
|
345
|
+
*@codeStart
|
|
346
|
+
* @ref ADLX_RESULT RemovePowerTuningEventListener (@ref DOX_IADLXPowerTuningChangedListener* pPowerTuningChangedListener)
|
|
347
|
+
*@codeEnd
|
|
348
|
+
*
|
|
349
|
+
*@params
|
|
350
|
+
*@paramrow{1.,[in] ,pPowerTuningChangedListener,@ref DOX_IADLXPowerTuningChangedListener* ,@ENG_START_DOX The pointer to the event listener interface to unregister from receiving power tuning settings change notifications. @ENG_END_DOX}
|
|
351
|
+
*
|
|
352
|
+
*@retvalues
|
|
353
|
+
*@ENG_START_DOX If the event listener is successfully unregistered, __ADLX_OK__ is returned.<br>
|
|
354
|
+
* If the event listener is not successfully unregistered, an error code is returned.<br>
|
|
355
|
+
* Refer to @ref ADLX_RESULT for success codes and error codes.<br> @ENG_END_DOX
|
|
356
|
+
*
|
|
357
|
+
*@detaileddesc
|
|
358
|
+
*@ENG_START_DOX Once the event listener is successfully unregistered, ADLX will no longer call the @ref DOX_IADLXPowerTuningChangedListener_OnPowerTuningChanged listener method when power tuning settings are changed.
|
|
359
|
+
* The application can discard the event listener instance. @ENG_END_DOX
|
|
360
|
+
*
|
|
361
|
+
*@copydoc IADLXPowerTuningChangedHandling_REQ_TABLE
|
|
362
|
+
*
|
|
363
|
+
*/
|
|
364
|
+
virtual ADLX_RESULT ADLX_STD_CALL RemovePowerTuningEventListener (IADLXPowerTuningChangedListener* pPowerTuningChangedListener) = 0;
|
|
365
|
+
|
|
366
|
+
}; //IADLXPowerTuningChangedHandling
|
|
367
|
+
//----------------------------------------------------------------------------------------------
|
|
368
|
+
typedef IADLXInterfacePtr_T<IADLXPowerTuningChangedHandling> IADLXPowerTuningChangedHandlingPtr;
|
|
369
|
+
} //namespace adlx
|
|
370
|
+
#else //__cplusplus
|
|
371
|
+
ADLX_DECLARE_IID (IADLXPowerTuningChangedHandling, L"IADLXPowerTuningChangedHandling")
|
|
372
|
+
typedef struct IADLXPowerTuningChangedHandling IADLXPowerTuningChangedHandling;
|
|
373
|
+
typedef struct IADLXPowerTuningChangedHandlingVtbl
|
|
374
|
+
{
|
|
375
|
+
//IADLXInterface
|
|
376
|
+
adlx_long (ADLX_STD_CALL *Acquire)(IADLXPowerTuningChangedHandling* pThis);
|
|
377
|
+
adlx_long (ADLX_STD_CALL *Release)(IADLXPowerTuningChangedHandling* pThis);
|
|
378
|
+
ADLX_RESULT (ADLX_STD_CALL *QueryInterface)(IADLXPowerTuningChangedHandling* pThis, const wchar_t* interfaceId, void** ppInterface);
|
|
379
|
+
|
|
380
|
+
//IADLXPowerTuningChangedHandling
|
|
381
|
+
ADLX_RESULT (ADLX_STD_CALL *AddPowerTuningEventListener)(IADLXPowerTuningChangedHandling* pThis, IADLXPowerTuningChangedListener* pPowerTuningChangedListener);
|
|
382
|
+
ADLX_RESULT (ADLX_STD_CALL *RemovePowerTuningEventListener)(IADLXPowerTuningChangedHandling* pThis, IADLXPowerTuningChangedListener* pPowerTuningChangedListener);
|
|
383
|
+
} IADLXPowerTuningChangedHandlingVtbl;
|
|
384
|
+
struct IADLXPowerTuningChangedHandling { const IADLXPowerTuningChangedHandlingVtbl *pVtbl; };
|
|
385
|
+
#endif //__cplusplus
|
|
386
|
+
#pragma endregion IADLXPowerTuningChangedHandling
|
|
387
|
+
|
|
388
|
+
#pragma region IADLXPowerTuningServices
|
|
389
|
+
#if defined (__cplusplus)
|
|
390
|
+
namespace adlx
|
|
391
|
+
{
|
|
392
|
+
class ADLX_NO_VTABLE IADLXPowerTuningServices : public IADLXInterface
|
|
393
|
+
{
|
|
394
|
+
public:
|
|
395
|
+
ADLX_DECLARE_IID (L"IADLXPowerTuningServices")
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
*@page DOX_IADLXPowerTuningServices_GetPowerTuningChangedHandling GetPowerTuningChangedHandling
|
|
399
|
+
*@ENG_START_DOX @brief Gets the reference counted interface that allows registering and unregistering for notifications when power tuning settings change. @ENG_END_DOX
|
|
400
|
+
*
|
|
401
|
+
*@syntax
|
|
402
|
+
*@codeStart
|
|
403
|
+
* @ref ADLX_RESULT GetPowerTuningChangedHandling (@ref DOX_IADLXPowerTuningChangedHandling** ppPowerTuningChangedHandling)
|
|
404
|
+
*@codeEnd
|
|
405
|
+
*
|
|
406
|
+
*@params
|
|
407
|
+
*@paramrow{1.,[out] ,ppPowerTuningChangedHandling,@ref DOX_IADLXPowerTuningChangedHandling** ,@ENG_START_DOX The address of a pointer to the returned interface. If the interface is not successfully returned\, the method sets the dereferenced address __*ppPowerTuningChangedHandling__ to __nullptr__. @ENG_END_DOX}
|
|
408
|
+
*
|
|
409
|
+
*@retvalues
|
|
410
|
+
*@ENG_START_DOX If the interface is successfully returned, __ADLX_OK__ is returned.<br>
|
|
411
|
+
* If the interface is not successfully returned, an error code is returned.<br>
|
|
412
|
+
* Refer to @ref ADLX_RESULT for success codes and error codes.<br> @ENG_END_DOX
|
|
413
|
+
*
|
|
414
|
+
*@detaileddesc
|
|
415
|
+
*@ENG_START_DOX @details The returned interface must be discarded with @ref DOX_IADLXInterface_Release when it is no longer needed. @ENG_END_DOX
|
|
416
|
+
*
|
|
417
|
+
*@addinfo
|
|
418
|
+
*@ENG_START_DOX In C++, when using ADLX interfaces as smart pointers, there is no need to call @ref DOX_IADLXInterface_Release because smart pointers call it in their internal implementation. @ENG_END_DOX
|
|
419
|
+
*
|
|
420
|
+
*@copydoc IADLXPowerTuningServices_REQ_TABLE
|
|
421
|
+
*
|
|
422
|
+
*/
|
|
423
|
+
virtual ADLX_RESULT ADLX_STD_CALL GetPowerTuningChangedHandling (IADLXPowerTuningChangedHandling** ppPowerTuningChangedHandling) = 0;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
*@page DOX_IADLXPowerTuningServices_GetSmartShiftMax GetSmartShiftMax
|
|
427
|
+
*@ENG_START_DOX @brief Gets the reference counted AMD SmartShift Max interface. @ENG_END_DOX
|
|
428
|
+
*@syntax
|
|
429
|
+
*@codeStart
|
|
430
|
+
* @ref ADLX_RESULT GetSmartShiftMax (@ref DOX_IADLXSmartShiftMax** ppSmartShiftMax)
|
|
431
|
+
*@codeEnd
|
|
432
|
+
*
|
|
433
|
+
*@params
|
|
434
|
+
*@paramrow{1.,[out] ,ppSmartShiftMax,@ref DOX_IADLXSmartShiftMax** ,@ENG_START_DOX The address of a pointer to the returned interface. If the interface is not successfully returned\, the method sets the dereferenced address __*ppSmartShiftMax__ to __nullptr__. @ENG_END_DOX}
|
|
435
|
+
*
|
|
436
|
+
*@retvalues
|
|
437
|
+
*@ENG_START_DOX If the interface is successfully returned, __ADLX_OK__ is returned.<br>
|
|
438
|
+
* If the interface is not successfully returned, an error code is returned.<br>
|
|
439
|
+
* Refer to @ref ADLX_RESULT for success codes and error codes.<br> @ENG_END_DOX
|
|
440
|
+
*
|
|
441
|
+
*@detaileddesc
|
|
442
|
+
*@ENG_START_DOX @details The returned interface must be discarded with @ref DOX_IADLXInterface_Release when it is no longer needed. @ENG_END_DOX
|
|
443
|
+
*
|
|
444
|
+
*@addinfo
|
|
445
|
+
*@ENG_START_DOX In C++, when using ADLX interfaces as smart pointers, there is no need to call @ref DOX_IADLXInterface_Release because smart pointers call it in their internal implementation. @ENG_END_DOX
|
|
446
|
+
*
|
|
447
|
+
*@copydoc IADLXPowerTuningServices_REQ_TABLE
|
|
448
|
+
*
|
|
449
|
+
*/
|
|
450
|
+
virtual ADLX_RESULT ADLX_STD_CALL GetSmartShiftMax (IADLXSmartShiftMax** ppSmartShiftMax) = 0;
|
|
451
|
+
}; //IADLXPowerTuningServices
|
|
452
|
+
//----------------------------------------------------------------------------------------------
|
|
453
|
+
typedef IADLXInterfacePtr_T<IADLXPowerTuningServices> IADLXPowerTuningServicesPtr;
|
|
454
|
+
} //namespace adlx
|
|
455
|
+
#else //__cplusplus
|
|
456
|
+
ADLX_DECLARE_IID (IADLXPowerTuningServices, L"IADLXPowerTuningServices")
|
|
457
|
+
typedef struct IADLXPowerTuningServices IADLXPowerTuningServices;
|
|
458
|
+
typedef struct IADLXPowerTuningServicesVtbl
|
|
459
|
+
{
|
|
460
|
+
//IADLXInterface
|
|
461
|
+
adlx_long (ADLX_STD_CALL *Acquire)(IADLXPowerTuningServices* pThis);
|
|
462
|
+
adlx_long (ADLX_STD_CALL *Release)(IADLXPowerTuningServices* pThis);
|
|
463
|
+
ADLX_RESULT (ADLX_STD_CALL *QueryInterface)(IADLXPowerTuningServices* pThis, const wchar_t* interfaceId, void** ppInterface);
|
|
464
|
+
|
|
465
|
+
//IADLXPowerTuningServices
|
|
466
|
+
ADLX_RESULT (ADLX_STD_CALL *GetPowerTuningChangedHandling)(IADLXPowerTuningServices* pThis, IADLXPowerTuningChangedHandling** ppPowerTuningChangedHandling);
|
|
467
|
+
ADLX_RESULT (ADLX_STD_CALL *GetSmartShiftMax)(IADLXPowerTuningServices* pThis, IADLXSmartShiftMax** ppSmartShiftMax);
|
|
468
|
+
}IADLXPowerTuningServicesVtbl;
|
|
469
|
+
struct IADLXPowerTuningServices { const IADLXPowerTuningServicesVtbl *pVtbl; };
|
|
470
|
+
#endif //__cplusplus
|
|
471
|
+
#pragma endregion IADLXPowerTuningServices
|
|
472
|
+
|
|
473
|
+
#endif //ADLX_POWERTUNING_H
|