83ba9156a149276b9bb2586472d5ae07516f6063
[hashcat.git] / include / ext_nvapi.h
1 /**
2 * Author......: Jens Steube <jens.steube@gmail.com>
3 * License.....: MIT
4 */
5
6 #ifndef EXT_NVAPI_H
7 #define EXT_NVAPI_H
8
9 #if defined(HAVE_HWMON) && defined(HAVE_NVAPI)
10
11 #include <common.h>
12
13 // Just annotations (they do nothing special)
14 #ifndef __success
15 #define __success(x)
16 #endif
17 #ifndef __in
18 #define __in
19 #endif
20 #ifndef __out
21 #define __out
22 #endif
23 #ifndef __in_ecount
24 #define __in_ecount(x)
25 #endif
26 #ifndef __out_ecount
27 #define __out_ecount(x)
28 #endif
29 #ifndef __in_opt
30 #define __in_opt
31 #endif
32 #ifndef __out_opt
33 #define __out_opt
34 #endif
35 #ifndef __inout
36 #define __inout
37 #endif
38 #ifndef __inout_opt
39 #define __inout_opt
40 #endif
41 #ifndef __inout_ecount
42 #define __inout_ecount(x)
43 #endif
44 #ifndef __inout_ecount_full
45 #define __inout_ecount_full(x)
46 #endif
47 #ifndef __inout_ecount_part_opt
48 #define __inout_ecount_part_opt(x,y)
49 #endif
50 #ifndef __inout_ecount_full_opt
51 #define __inout_ecount_full_opt(x,y)
52 #endif
53 #ifndef __out_ecount_full_opt
54 #define __out_ecount_full_opt(x)
55 #endif
56
57 #include <nvapi.h>
58
59 typedef NvPhysicalGpuHandle HM_ADAPTER_NV;
60
61 int hc_NvAPI_EnumPhysicalGPUs (NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
62 int hc_NvAPI_GPU_GetThermalSettings (NvPhysicalGpuHandle hPhysicalGpu, NvU32 sensorIndex, NV_GPU_THERMAL_SETTINGS *pThermalSettings);
63 int hc_NvAPI_GPU_GetTachReading (NvPhysicalGpuHandle hPhysicalGPU, NvU32 *pValue);
64 int hc_NvAPI_GPU_GetDynamicPstatesInfoEx (NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_DYNAMIC_PSTATES_INFO_EX *pDynamicPstatesInfoEx);
65
66 #endif // HAVE_HWMON && HAVE_NVAPI
67
68 #endif