-
Notifications
You must be signed in to change notification settings - Fork 58
/
nvml.go
2971 lines (2659 loc) · 145 KB
/
nvml.go
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// WARNING: THIS FILE WAS AUTOMATICALLY GENERATED.
// Code generated by https://git.io/c-for-go. DO NOT EDIT.
package nvml
/*
#cgo linux LDFLAGS: -Wl,--export-dynamic -Wl,--unresolved-symbols=ignore-in-object-files
#cgo darwin LDFLAGS: -Wl,-undefined,dynamic_lookup
#cgo CFLAGS: -DNVML_NO_UNVERSIONED_FUNC_DEFS=1
#include "nvml.h"
#include <stdlib.h>
#include "cgo_helpers.h"
*/
import "C"
import "unsafe"
// nvmlInit_v2 function as declared in nvml/nvml.h
func nvmlInit_v2() Return {
__ret := C.nvmlInit_v2()
__v := (Return)(__ret)
return __v
}
// nvmlInitWithFlags function as declared in nvml/nvml.h
func nvmlInitWithFlags(Flags uint32) Return {
cFlags, _ := (C.uint)(Flags), cgoAllocsUnknown
__ret := C.nvmlInitWithFlags(cFlags)
__v := (Return)(__ret)
return __v
}
// nvmlShutdown function as declared in nvml/nvml.h
func nvmlShutdown() Return {
__ret := C.nvmlShutdown()
__v := (Return)(__ret)
return __v
}
// nvmlErrorString function as declared in nvml/nvml.h
func nvmlErrorString(Result Return) string {
cResult, _ := (C.nvmlReturn_t)(Result), cgoAllocsUnknown
__ret := C.nvmlErrorString(cResult)
__v := packPCharString(__ret)
return __v
}
// nvmlSystemGetDriverVersion function as declared in nvml/nvml.h
func nvmlSystemGetDriverVersion(Version *byte, Length uint32) Return {
cVersion, _ := (*C.char)(unsafe.Pointer(Version)), cgoAllocsUnknown
cLength, _ := (C.uint)(Length), cgoAllocsUnknown
__ret := C.nvmlSystemGetDriverVersion(cVersion, cLength)
__v := (Return)(__ret)
return __v
}
// nvmlSystemGetNVMLVersion function as declared in nvml/nvml.h
func nvmlSystemGetNVMLVersion(Version *byte, Length uint32) Return {
cVersion, _ := (*C.char)(unsafe.Pointer(Version)), cgoAllocsUnknown
cLength, _ := (C.uint)(Length), cgoAllocsUnknown
__ret := C.nvmlSystemGetNVMLVersion(cVersion, cLength)
__v := (Return)(__ret)
return __v
}
// nvmlSystemGetCudaDriverVersion function as declared in nvml/nvml.h
func nvmlSystemGetCudaDriverVersion(CudaDriverVersion *int32) Return {
cCudaDriverVersion, _ := (*C.int)(unsafe.Pointer(CudaDriverVersion)), cgoAllocsUnknown
__ret := C.nvmlSystemGetCudaDriverVersion(cCudaDriverVersion)
__v := (Return)(__ret)
return __v
}
// nvmlSystemGetCudaDriverVersion_v2 function as declared in nvml/nvml.h
func nvmlSystemGetCudaDriverVersion_v2(CudaDriverVersion *int32) Return {
cCudaDriverVersion, _ := (*C.int)(unsafe.Pointer(CudaDriverVersion)), cgoAllocsUnknown
__ret := C.nvmlSystemGetCudaDriverVersion_v2(cCudaDriverVersion)
__v := (Return)(__ret)
return __v
}
// nvmlSystemGetProcessName function as declared in nvml/nvml.h
func nvmlSystemGetProcessName(Pid uint32, Name *byte, Length uint32) Return {
cPid, _ := (C.uint)(Pid), cgoAllocsUnknown
cName, _ := (*C.char)(unsafe.Pointer(Name)), cgoAllocsUnknown
cLength, _ := (C.uint)(Length), cgoAllocsUnknown
__ret := C.nvmlSystemGetProcessName(cPid, cName, cLength)
__v := (Return)(__ret)
return __v
}
// nvmlUnitGetCount function as declared in nvml/nvml.h
func nvmlUnitGetCount(UnitCount *uint32) Return {
cUnitCount, _ := (*C.uint)(unsafe.Pointer(UnitCount)), cgoAllocsUnknown
__ret := C.nvmlUnitGetCount(cUnitCount)
__v := (Return)(__ret)
return __v
}
// nvmlUnitGetHandleByIndex function as declared in nvml/nvml.h
func nvmlUnitGetHandleByIndex(Index uint32, nvmlUnit *nvmlUnit) Return {
cIndex, _ := (C.uint)(Index), cgoAllocsUnknown
cnvmlUnit, _ := (*C.nvmlUnit_t)(unsafe.Pointer(nvmlUnit)), cgoAllocsUnknown
__ret := C.nvmlUnitGetHandleByIndex(cIndex, cnvmlUnit)
__v := (Return)(__ret)
return __v
}
// nvmlUnitGetUnitInfo function as declared in nvml/nvml.h
func nvmlUnitGetUnitInfo(nvmlUnit nvmlUnit, Info *UnitInfo) Return {
cnvmlUnit, _ := *(*C.nvmlUnit_t)(unsafe.Pointer(&nvmlUnit)), cgoAllocsUnknown
cInfo, _ := (*C.nvmlUnitInfo_t)(unsafe.Pointer(Info)), cgoAllocsUnknown
__ret := C.nvmlUnitGetUnitInfo(cnvmlUnit, cInfo)
__v := (Return)(__ret)
return __v
}
// nvmlUnitGetLedState function as declared in nvml/nvml.h
func nvmlUnitGetLedState(nvmlUnit nvmlUnit, State *LedState) Return {
cnvmlUnit, _ := *(*C.nvmlUnit_t)(unsafe.Pointer(&nvmlUnit)), cgoAllocsUnknown
cState, _ := (*C.nvmlLedState_t)(unsafe.Pointer(State)), cgoAllocsUnknown
__ret := C.nvmlUnitGetLedState(cnvmlUnit, cState)
__v := (Return)(__ret)
return __v
}
// nvmlUnitGetPsuInfo function as declared in nvml/nvml.h
func nvmlUnitGetPsuInfo(nvmlUnit nvmlUnit, Psu *PSUInfo) Return {
cnvmlUnit, _ := *(*C.nvmlUnit_t)(unsafe.Pointer(&nvmlUnit)), cgoAllocsUnknown
cPsu, _ := (*C.nvmlPSUInfo_t)(unsafe.Pointer(Psu)), cgoAllocsUnknown
__ret := C.nvmlUnitGetPsuInfo(cnvmlUnit, cPsu)
__v := (Return)(__ret)
return __v
}
// nvmlUnitGetTemperature function as declared in nvml/nvml.h
func nvmlUnitGetTemperature(nvmlUnit nvmlUnit, _type uint32, Temp *uint32) Return {
cnvmlUnit, _ := *(*C.nvmlUnit_t)(unsafe.Pointer(&nvmlUnit)), cgoAllocsUnknown
c_type, _ := (C.uint)(_type), cgoAllocsUnknown
cTemp, _ := (*C.uint)(unsafe.Pointer(Temp)), cgoAllocsUnknown
__ret := C.nvmlUnitGetTemperature(cnvmlUnit, c_type, cTemp)
__v := (Return)(__ret)
return __v
}
// nvmlUnitGetFanSpeedInfo function as declared in nvml/nvml.h
func nvmlUnitGetFanSpeedInfo(nvmlUnit nvmlUnit, FanSpeeds *UnitFanSpeeds) Return {
cnvmlUnit, _ := *(*C.nvmlUnit_t)(unsafe.Pointer(&nvmlUnit)), cgoAllocsUnknown
cFanSpeeds, _ := (*C.nvmlUnitFanSpeeds_t)(unsafe.Pointer(FanSpeeds)), cgoAllocsUnknown
__ret := C.nvmlUnitGetFanSpeedInfo(cnvmlUnit, cFanSpeeds)
__v := (Return)(__ret)
return __v
}
// nvmlUnitGetDevices function as declared in nvml/nvml.h
func nvmlUnitGetDevices(nvmlUnit nvmlUnit, DeviceCount *uint32, Devices *nvmlDevice) Return {
cnvmlUnit, _ := *(*C.nvmlUnit_t)(unsafe.Pointer(&nvmlUnit)), cgoAllocsUnknown
cDeviceCount, _ := (*C.uint)(unsafe.Pointer(DeviceCount)), cgoAllocsUnknown
cDevices, _ := (*C.nvmlDevice_t)(unsafe.Pointer(Devices)), cgoAllocsUnknown
__ret := C.nvmlUnitGetDevices(cnvmlUnit, cDeviceCount, cDevices)
__v := (Return)(__ret)
return __v
}
// nvmlSystemGetHicVersion function as declared in nvml/nvml.h
func nvmlSystemGetHicVersion(HwbcCount *uint32, HwbcEntries *HwbcEntry) Return {
cHwbcCount, _ := (*C.uint)(unsafe.Pointer(HwbcCount)), cgoAllocsUnknown
cHwbcEntries, _ := (*C.nvmlHwbcEntry_t)(unsafe.Pointer(HwbcEntries)), cgoAllocsUnknown
__ret := C.nvmlSystemGetHicVersion(cHwbcCount, cHwbcEntries)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetCount_v2 function as declared in nvml/nvml.h
func nvmlDeviceGetCount_v2(DeviceCount *uint32) Return {
cDeviceCount, _ := (*C.uint)(unsafe.Pointer(DeviceCount)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetCount_v2(cDeviceCount)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetAttributes_v2 function as declared in nvml/nvml.h
func nvmlDeviceGetAttributes_v2(nvmlDevice nvmlDevice, Attributes *DeviceAttributes) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cAttributes, _ := (*C.nvmlDeviceAttributes_t)(unsafe.Pointer(Attributes)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetAttributes_v2(cnvmlDevice, cAttributes)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetHandleByIndex_v2 function as declared in nvml/nvml.h
func nvmlDeviceGetHandleByIndex_v2(Index uint32, nvmlDevice *nvmlDevice) Return {
cIndex, _ := (C.uint)(Index), cgoAllocsUnknown
cnvmlDevice, _ := (*C.nvmlDevice_t)(unsafe.Pointer(nvmlDevice)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetHandleByIndex_v2(cIndex, cnvmlDevice)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetHandleBySerial function as declared in nvml/nvml.h
func nvmlDeviceGetHandleBySerial(Serial string, nvmlDevice *nvmlDevice) Return {
cSerial, _ := unpackPCharString(Serial)
cnvmlDevice, _ := (*C.nvmlDevice_t)(unsafe.Pointer(nvmlDevice)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetHandleBySerial(cSerial, cnvmlDevice)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetHandleByUUID function as declared in nvml/nvml.h
func nvmlDeviceGetHandleByUUID(Uuid string, nvmlDevice *nvmlDevice) Return {
cUuid, _ := unpackPCharString(Uuid)
cnvmlDevice, _ := (*C.nvmlDevice_t)(unsafe.Pointer(nvmlDevice)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetHandleByUUID(cUuid, cnvmlDevice)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetHandleByPciBusId_v2 function as declared in nvml/nvml.h
func nvmlDeviceGetHandleByPciBusId_v2(PciBusId string, nvmlDevice *nvmlDevice) Return {
cPciBusId, _ := unpackPCharString(PciBusId)
cnvmlDevice, _ := (*C.nvmlDevice_t)(unsafe.Pointer(nvmlDevice)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetHandleByPciBusId_v2(cPciBusId, cnvmlDevice)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetName function as declared in nvml/nvml.h
func nvmlDeviceGetName(nvmlDevice nvmlDevice, Name *byte, Length uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cName, _ := (*C.char)(unsafe.Pointer(Name)), cgoAllocsUnknown
cLength, _ := (C.uint)(Length), cgoAllocsUnknown
__ret := C.nvmlDeviceGetName(cnvmlDevice, cName, cLength)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetBrand function as declared in nvml/nvml.h
func nvmlDeviceGetBrand(nvmlDevice nvmlDevice, _type *BrandType) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
c_type, _ := (*C.nvmlBrandType_t)(unsafe.Pointer(_type)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetBrand(cnvmlDevice, c_type)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetIndex function as declared in nvml/nvml.h
func nvmlDeviceGetIndex(nvmlDevice nvmlDevice, Index *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cIndex, _ := (*C.uint)(unsafe.Pointer(Index)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetIndex(cnvmlDevice, cIndex)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetSerial function as declared in nvml/nvml.h
func nvmlDeviceGetSerial(nvmlDevice nvmlDevice, Serial *byte, Length uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cSerial, _ := (*C.char)(unsafe.Pointer(Serial)), cgoAllocsUnknown
cLength, _ := (C.uint)(Length), cgoAllocsUnknown
__ret := C.nvmlDeviceGetSerial(cnvmlDevice, cSerial, cLength)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetMemoryAffinity function as declared in nvml/nvml.h
func nvmlDeviceGetMemoryAffinity(nvmlDevice nvmlDevice, NodeSetSize uint32, NodeSet *uint, Scope AffinityScope) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cNodeSetSize, _ := (C.uint)(NodeSetSize), cgoAllocsUnknown
cNodeSet, _ := (*C.ulong)(unsafe.Pointer(NodeSet)), cgoAllocsUnknown
cScope, _ := (C.nvmlAffinityScope_t)(Scope), cgoAllocsUnknown
__ret := C.nvmlDeviceGetMemoryAffinity(cnvmlDevice, cNodeSetSize, cNodeSet, cScope)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetCpuAffinityWithinScope function as declared in nvml/nvml.h
func nvmlDeviceGetCpuAffinityWithinScope(nvmlDevice nvmlDevice, CpuSetSize uint32, CpuSet *uint, Scope AffinityScope) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cCpuSetSize, _ := (C.uint)(CpuSetSize), cgoAllocsUnknown
cCpuSet, _ := (*C.ulong)(unsafe.Pointer(CpuSet)), cgoAllocsUnknown
cScope, _ := (C.nvmlAffinityScope_t)(Scope), cgoAllocsUnknown
__ret := C.nvmlDeviceGetCpuAffinityWithinScope(cnvmlDevice, cCpuSetSize, cCpuSet, cScope)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetCpuAffinity function as declared in nvml/nvml.h
func nvmlDeviceGetCpuAffinity(nvmlDevice nvmlDevice, CpuSetSize uint32, CpuSet *uint) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cCpuSetSize, _ := (C.uint)(CpuSetSize), cgoAllocsUnknown
cCpuSet, _ := (*C.ulong)(unsafe.Pointer(CpuSet)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetCpuAffinity(cnvmlDevice, cCpuSetSize, cCpuSet)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceSetCpuAffinity function as declared in nvml/nvml.h
func nvmlDeviceSetCpuAffinity(nvmlDevice nvmlDevice) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
__ret := C.nvmlDeviceSetCpuAffinity(cnvmlDevice)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceClearCpuAffinity function as declared in nvml/nvml.h
func nvmlDeviceClearCpuAffinity(nvmlDevice nvmlDevice) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
__ret := C.nvmlDeviceClearCpuAffinity(cnvmlDevice)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetTopologyCommonAncestor function as declared in nvml/nvml.h
func nvmlDeviceGetTopologyCommonAncestor(Device1 nvmlDevice, Device2 nvmlDevice, PathInfo *GpuTopologyLevel) Return {
cDevice1, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&Device1)), cgoAllocsUnknown
cDevice2, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&Device2)), cgoAllocsUnknown
cPathInfo, _ := (*C.nvmlGpuTopologyLevel_t)(unsafe.Pointer(PathInfo)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetTopologyCommonAncestor(cDevice1, cDevice2, cPathInfo)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetTopologyNearestGpus function as declared in nvml/nvml.h
func nvmlDeviceGetTopologyNearestGpus(nvmlDevice nvmlDevice, Level GpuTopologyLevel, Count *uint32, DeviceArray *nvmlDevice) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cLevel, _ := (C.nvmlGpuTopologyLevel_t)(Level), cgoAllocsUnknown
cCount, _ := (*C.uint)(unsafe.Pointer(Count)), cgoAllocsUnknown
cDeviceArray, _ := (*C.nvmlDevice_t)(unsafe.Pointer(DeviceArray)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetTopologyNearestGpus(cnvmlDevice, cLevel, cCount, cDeviceArray)
__v := (Return)(__ret)
return __v
}
// nvmlSystemGetTopologyGpuSet function as declared in nvml/nvml.h
func nvmlSystemGetTopologyGpuSet(CpuNumber uint32, Count *uint32, DeviceArray *nvmlDevice) Return {
cCpuNumber, _ := (C.uint)(CpuNumber), cgoAllocsUnknown
cCount, _ := (*C.uint)(unsafe.Pointer(Count)), cgoAllocsUnknown
cDeviceArray, _ := (*C.nvmlDevice_t)(unsafe.Pointer(DeviceArray)), cgoAllocsUnknown
__ret := C.nvmlSystemGetTopologyGpuSet(cCpuNumber, cCount, cDeviceArray)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetP2PStatus function as declared in nvml/nvml.h
func nvmlDeviceGetP2PStatus(Device1 nvmlDevice, Device2 nvmlDevice, P2pIndex GpuP2PCapsIndex, P2pStatus *GpuP2PStatus) Return {
cDevice1, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&Device1)), cgoAllocsUnknown
cDevice2, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&Device2)), cgoAllocsUnknown
cP2pIndex, _ := (C.nvmlGpuP2PCapsIndex_t)(P2pIndex), cgoAllocsUnknown
cP2pStatus, _ := (*C.nvmlGpuP2PStatus_t)(unsafe.Pointer(P2pStatus)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetP2PStatus(cDevice1, cDevice2, cP2pIndex, cP2pStatus)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetUUID function as declared in nvml/nvml.h
func nvmlDeviceGetUUID(nvmlDevice nvmlDevice, Uuid *byte, Length uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cUuid, _ := (*C.char)(unsafe.Pointer(Uuid)), cgoAllocsUnknown
cLength, _ := (C.uint)(Length), cgoAllocsUnknown
__ret := C.nvmlDeviceGetUUID(cnvmlDevice, cUuid, cLength)
__v := (Return)(__ret)
return __v
}
// nvmlVgpuInstanceGetMdevUUID function as declared in nvml/nvml.h
func nvmlVgpuInstanceGetMdevUUID(nvmlVgpuInstance nvmlVgpuInstance, MdevUuid *byte, Size uint32) Return {
cnvmlVgpuInstance, _ := (C.nvmlVgpuInstance_t)(nvmlVgpuInstance), cgoAllocsUnknown
cMdevUuid, _ := (*C.char)(unsafe.Pointer(MdevUuid)), cgoAllocsUnknown
cSize, _ := (C.uint)(Size), cgoAllocsUnknown
__ret := C.nvmlVgpuInstanceGetMdevUUID(cnvmlVgpuInstance, cMdevUuid, cSize)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetMinorNumber function as declared in nvml/nvml.h
func nvmlDeviceGetMinorNumber(nvmlDevice nvmlDevice, MinorNumber *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMinorNumber, _ := (*C.uint)(unsafe.Pointer(MinorNumber)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetMinorNumber(cnvmlDevice, cMinorNumber)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetBoardPartNumber function as declared in nvml/nvml.h
func nvmlDeviceGetBoardPartNumber(nvmlDevice nvmlDevice, PartNumber *byte, Length uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cPartNumber, _ := (*C.char)(unsafe.Pointer(PartNumber)), cgoAllocsUnknown
cLength, _ := (C.uint)(Length), cgoAllocsUnknown
__ret := C.nvmlDeviceGetBoardPartNumber(cnvmlDevice, cPartNumber, cLength)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetInforomVersion function as declared in nvml/nvml.h
func nvmlDeviceGetInforomVersion(nvmlDevice nvmlDevice, Object InforomObject, Version *byte, Length uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cObject, _ := (C.nvmlInforomObject_t)(Object), cgoAllocsUnknown
cVersion, _ := (*C.char)(unsafe.Pointer(Version)), cgoAllocsUnknown
cLength, _ := (C.uint)(Length), cgoAllocsUnknown
__ret := C.nvmlDeviceGetInforomVersion(cnvmlDevice, cObject, cVersion, cLength)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetInforomImageVersion function as declared in nvml/nvml.h
func nvmlDeviceGetInforomImageVersion(nvmlDevice nvmlDevice, Version *byte, Length uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cVersion, _ := (*C.char)(unsafe.Pointer(Version)), cgoAllocsUnknown
cLength, _ := (C.uint)(Length), cgoAllocsUnknown
__ret := C.nvmlDeviceGetInforomImageVersion(cnvmlDevice, cVersion, cLength)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetInforomConfigurationChecksum function as declared in nvml/nvml.h
func nvmlDeviceGetInforomConfigurationChecksum(nvmlDevice nvmlDevice, Checksum *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cChecksum, _ := (*C.uint)(unsafe.Pointer(Checksum)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetInforomConfigurationChecksum(cnvmlDevice, cChecksum)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceValidateInforom function as declared in nvml/nvml.h
func nvmlDeviceValidateInforom(nvmlDevice nvmlDevice) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
__ret := C.nvmlDeviceValidateInforom(cnvmlDevice)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetDisplayMode function as declared in nvml/nvml.h
func nvmlDeviceGetDisplayMode(nvmlDevice nvmlDevice, Display *EnableState) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cDisplay, _ := (*C.nvmlEnableState_t)(unsafe.Pointer(Display)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetDisplayMode(cnvmlDevice, cDisplay)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetDisplayActive function as declared in nvml/nvml.h
func nvmlDeviceGetDisplayActive(nvmlDevice nvmlDevice, IsActive *EnableState) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cIsActive, _ := (*C.nvmlEnableState_t)(unsafe.Pointer(IsActive)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetDisplayActive(cnvmlDevice, cIsActive)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetPersistenceMode function as declared in nvml/nvml.h
func nvmlDeviceGetPersistenceMode(nvmlDevice nvmlDevice, Mode *EnableState) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMode, _ := (*C.nvmlEnableState_t)(unsafe.Pointer(Mode)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetPersistenceMode(cnvmlDevice, cMode)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetPciInfo_v3 function as declared in nvml/nvml.h
func nvmlDeviceGetPciInfo_v3(nvmlDevice nvmlDevice, Pci *PciInfo) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cPci, _ := (*C.nvmlPciInfo_t)(unsafe.Pointer(Pci)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetPciInfo_v3(cnvmlDevice, cPci)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetMaxPcieLinkGeneration function as declared in nvml/nvml.h
func nvmlDeviceGetMaxPcieLinkGeneration(nvmlDevice nvmlDevice, MaxLinkGen *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMaxLinkGen, _ := (*C.uint)(unsafe.Pointer(MaxLinkGen)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetMaxPcieLinkGeneration(cnvmlDevice, cMaxLinkGen)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetGpuMaxPcieLinkGeneration function as declared in nvml/nvml.h
func nvmlDeviceGetGpuMaxPcieLinkGeneration(nvmlDevice nvmlDevice, MaxLinkGenDevice *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMaxLinkGenDevice, _ := (*C.uint)(unsafe.Pointer(MaxLinkGenDevice)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetGpuMaxPcieLinkGeneration(cnvmlDevice, cMaxLinkGenDevice)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetMaxPcieLinkWidth function as declared in nvml/nvml.h
func nvmlDeviceGetMaxPcieLinkWidth(nvmlDevice nvmlDevice, MaxLinkWidth *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMaxLinkWidth, _ := (*C.uint)(unsafe.Pointer(MaxLinkWidth)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetMaxPcieLinkWidth(cnvmlDevice, cMaxLinkWidth)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetCurrPcieLinkGeneration function as declared in nvml/nvml.h
func nvmlDeviceGetCurrPcieLinkGeneration(nvmlDevice nvmlDevice, CurrLinkGen *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cCurrLinkGen, _ := (*C.uint)(unsafe.Pointer(CurrLinkGen)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetCurrPcieLinkGeneration(cnvmlDevice, cCurrLinkGen)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetCurrPcieLinkWidth function as declared in nvml/nvml.h
func nvmlDeviceGetCurrPcieLinkWidth(nvmlDevice nvmlDevice, CurrLinkWidth *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cCurrLinkWidth, _ := (*C.uint)(unsafe.Pointer(CurrLinkWidth)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetCurrPcieLinkWidth(cnvmlDevice, cCurrLinkWidth)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetPcieThroughput function as declared in nvml/nvml.h
func nvmlDeviceGetPcieThroughput(nvmlDevice nvmlDevice, Counter PcieUtilCounter, Value *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cCounter, _ := (C.nvmlPcieUtilCounter_t)(Counter), cgoAllocsUnknown
cValue, _ := (*C.uint)(unsafe.Pointer(Value)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetPcieThroughput(cnvmlDevice, cCounter, cValue)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetPcieReplayCounter function as declared in nvml/nvml.h
func nvmlDeviceGetPcieReplayCounter(nvmlDevice nvmlDevice, Value *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cValue, _ := (*C.uint)(unsafe.Pointer(Value)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetPcieReplayCounter(cnvmlDevice, cValue)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetClockInfo function as declared in nvml/nvml.h
func nvmlDeviceGetClockInfo(nvmlDevice nvmlDevice, _type ClockType, Clock *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
c_type, _ := (C.nvmlClockType_t)(_type), cgoAllocsUnknown
cClock, _ := (*C.uint)(unsafe.Pointer(Clock)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetClockInfo(cnvmlDevice, c_type, cClock)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetMaxClockInfo function as declared in nvml/nvml.h
func nvmlDeviceGetMaxClockInfo(nvmlDevice nvmlDevice, _type ClockType, Clock *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
c_type, _ := (C.nvmlClockType_t)(_type), cgoAllocsUnknown
cClock, _ := (*C.uint)(unsafe.Pointer(Clock)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetMaxClockInfo(cnvmlDevice, c_type, cClock)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetApplicationsClock function as declared in nvml/nvml.h
func nvmlDeviceGetApplicationsClock(nvmlDevice nvmlDevice, ClockType ClockType, ClockMHz *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cClockType, _ := (C.nvmlClockType_t)(ClockType), cgoAllocsUnknown
cClockMHz, _ := (*C.uint)(unsafe.Pointer(ClockMHz)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetApplicationsClock(cnvmlDevice, cClockType, cClockMHz)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetDefaultApplicationsClock function as declared in nvml/nvml.h
func nvmlDeviceGetDefaultApplicationsClock(nvmlDevice nvmlDevice, ClockType ClockType, ClockMHz *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cClockType, _ := (C.nvmlClockType_t)(ClockType), cgoAllocsUnknown
cClockMHz, _ := (*C.uint)(unsafe.Pointer(ClockMHz)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetDefaultApplicationsClock(cnvmlDevice, cClockType, cClockMHz)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceResetApplicationsClocks function as declared in nvml/nvml.h
func nvmlDeviceResetApplicationsClocks(nvmlDevice nvmlDevice) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
__ret := C.nvmlDeviceResetApplicationsClocks(cnvmlDevice)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetClock function as declared in nvml/nvml.h
func nvmlDeviceGetClock(nvmlDevice nvmlDevice, ClockType ClockType, ClockId ClockId, ClockMHz *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cClockType, _ := (C.nvmlClockType_t)(ClockType), cgoAllocsUnknown
cClockId, _ := (C.nvmlClockId_t)(ClockId), cgoAllocsUnknown
cClockMHz, _ := (*C.uint)(unsafe.Pointer(ClockMHz)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetClock(cnvmlDevice, cClockType, cClockId, cClockMHz)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetMaxCustomerBoostClock function as declared in nvml/nvml.h
func nvmlDeviceGetMaxCustomerBoostClock(nvmlDevice nvmlDevice, ClockType ClockType, ClockMHz *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cClockType, _ := (C.nvmlClockType_t)(ClockType), cgoAllocsUnknown
cClockMHz, _ := (*C.uint)(unsafe.Pointer(ClockMHz)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetMaxCustomerBoostClock(cnvmlDevice, cClockType, cClockMHz)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetSupportedMemoryClocks function as declared in nvml/nvml.h
func nvmlDeviceGetSupportedMemoryClocks(nvmlDevice nvmlDevice, Count *uint32, ClocksMHz *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cCount, _ := (*C.uint)(unsafe.Pointer(Count)), cgoAllocsUnknown
cClocksMHz, _ := (*C.uint)(unsafe.Pointer(ClocksMHz)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetSupportedMemoryClocks(cnvmlDevice, cCount, cClocksMHz)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetSupportedGraphicsClocks function as declared in nvml/nvml.h
func nvmlDeviceGetSupportedGraphicsClocks(nvmlDevice nvmlDevice, MemoryClockMHz uint32, Count *uint32, ClocksMHz *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMemoryClockMHz, _ := (C.uint)(MemoryClockMHz), cgoAllocsUnknown
cCount, _ := (*C.uint)(unsafe.Pointer(Count)), cgoAllocsUnknown
cClocksMHz, _ := (*C.uint)(unsafe.Pointer(ClocksMHz)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetSupportedGraphicsClocks(cnvmlDevice, cMemoryClockMHz, cCount, cClocksMHz)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetAutoBoostedClocksEnabled function as declared in nvml/nvml.h
func nvmlDeviceGetAutoBoostedClocksEnabled(nvmlDevice nvmlDevice, IsEnabled *EnableState, DefaultIsEnabled *EnableState) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cIsEnabled, _ := (*C.nvmlEnableState_t)(unsafe.Pointer(IsEnabled)), cgoAllocsUnknown
cDefaultIsEnabled, _ := (*C.nvmlEnableState_t)(unsafe.Pointer(DefaultIsEnabled)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetAutoBoostedClocksEnabled(cnvmlDevice, cIsEnabled, cDefaultIsEnabled)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceSetAutoBoostedClocksEnabled function as declared in nvml/nvml.h
func nvmlDeviceSetAutoBoostedClocksEnabled(nvmlDevice nvmlDevice, Enabled EnableState) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cEnabled, _ := (C.nvmlEnableState_t)(Enabled), cgoAllocsUnknown
__ret := C.nvmlDeviceSetAutoBoostedClocksEnabled(cnvmlDevice, cEnabled)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceSetDefaultAutoBoostedClocksEnabled function as declared in nvml/nvml.h
func nvmlDeviceSetDefaultAutoBoostedClocksEnabled(nvmlDevice nvmlDevice, Enabled EnableState, Flags uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cEnabled, _ := (C.nvmlEnableState_t)(Enabled), cgoAllocsUnknown
cFlags, _ := (C.uint)(Flags), cgoAllocsUnknown
__ret := C.nvmlDeviceSetDefaultAutoBoostedClocksEnabled(cnvmlDevice, cEnabled, cFlags)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetFanSpeed function as declared in nvml/nvml.h
func nvmlDeviceGetFanSpeed(nvmlDevice nvmlDevice, Speed *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cSpeed, _ := (*C.uint)(unsafe.Pointer(Speed)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetFanSpeed(cnvmlDevice, cSpeed)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetFanSpeed_v2 function as declared in nvml/nvml.h
func nvmlDeviceGetFanSpeed_v2(nvmlDevice nvmlDevice, Fan uint32, Speed *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cFan, _ := (C.uint)(Fan), cgoAllocsUnknown
cSpeed, _ := (*C.uint)(unsafe.Pointer(Speed)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetFanSpeed_v2(cnvmlDevice, cFan, cSpeed)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetTargetFanSpeed function as declared in nvml/nvml.h
func nvmlDeviceGetTargetFanSpeed(nvmlDevice nvmlDevice, Fan uint32, TargetSpeed *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cFan, _ := (C.uint)(Fan), cgoAllocsUnknown
cTargetSpeed, _ := (*C.uint)(unsafe.Pointer(TargetSpeed)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetTargetFanSpeed(cnvmlDevice, cFan, cTargetSpeed)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceSetDefaultFanSpeed_v2 function as declared in nvml/nvml.h
func nvmlDeviceSetDefaultFanSpeed_v2(nvmlDevice nvmlDevice, Fan uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cFan, _ := (C.uint)(Fan), cgoAllocsUnknown
__ret := C.nvmlDeviceSetDefaultFanSpeed_v2(cnvmlDevice, cFan)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetMinMaxFanSpeed function as declared in nvml/nvml.h
func nvmlDeviceGetMinMaxFanSpeed(nvmlDevice nvmlDevice, MinSpeed *uint32, MaxSpeed *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMinSpeed, _ := (*C.uint)(unsafe.Pointer(MinSpeed)), cgoAllocsUnknown
cMaxSpeed, _ := (*C.uint)(unsafe.Pointer(MaxSpeed)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetMinMaxFanSpeed(cnvmlDevice, cMinSpeed, cMaxSpeed)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetFanControlPolicy_v2 function as declared in nvml/nvml.h
func nvmlDeviceGetFanControlPolicy_v2(nvmlDevice nvmlDevice, Fan uint32, Policy *FanControlPolicy) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cFan, _ := (C.uint)(Fan), cgoAllocsUnknown
cPolicy, _ := (*C.nvmlFanControlPolicy_t)(unsafe.Pointer(Policy)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetFanControlPolicy_v2(cnvmlDevice, cFan, cPolicy)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceSetFanControlPolicy function as declared in nvml/nvml.h
func nvmlDeviceSetFanControlPolicy(nvmlDevice nvmlDevice, Fan uint32, Policy FanControlPolicy) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cFan, _ := (C.uint)(Fan), cgoAllocsUnknown
cPolicy, _ := (C.nvmlFanControlPolicy_t)(Policy), cgoAllocsUnknown
__ret := C.nvmlDeviceSetFanControlPolicy(cnvmlDevice, cFan, cPolicy)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetNumFans function as declared in nvml/nvml.h
func nvmlDeviceGetNumFans(nvmlDevice nvmlDevice, NumFans *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cNumFans, _ := (*C.uint)(unsafe.Pointer(NumFans)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetNumFans(cnvmlDevice, cNumFans)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetTemperature function as declared in nvml/nvml.h
func nvmlDeviceGetTemperature(nvmlDevice nvmlDevice, SensorType TemperatureSensors, Temp *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cSensorType, _ := (C.nvmlTemperatureSensors_t)(SensorType), cgoAllocsUnknown
cTemp, _ := (*C.uint)(unsafe.Pointer(Temp)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetTemperature(cnvmlDevice, cSensorType, cTemp)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetTemperatureThreshold function as declared in nvml/nvml.h
func nvmlDeviceGetTemperatureThreshold(nvmlDevice nvmlDevice, ThresholdType TemperatureThresholds, Temp *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cThresholdType, _ := (C.nvmlTemperatureThresholds_t)(ThresholdType), cgoAllocsUnknown
cTemp, _ := (*C.uint)(unsafe.Pointer(Temp)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetTemperatureThreshold(cnvmlDevice, cThresholdType, cTemp)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceSetTemperatureThreshold function as declared in nvml/nvml.h
func nvmlDeviceSetTemperatureThreshold(nvmlDevice nvmlDevice, ThresholdType TemperatureThresholds, Temp *int32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cThresholdType, _ := (C.nvmlTemperatureThresholds_t)(ThresholdType), cgoAllocsUnknown
cTemp, _ := (*C.int)(unsafe.Pointer(Temp)), cgoAllocsUnknown
__ret := C.nvmlDeviceSetTemperatureThreshold(cnvmlDevice, cThresholdType, cTemp)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetThermalSettings function as declared in nvml/nvml.h
func nvmlDeviceGetThermalSettings(nvmlDevice nvmlDevice, SensorIndex uint32, PThermalSettings *GpuThermalSettings) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cSensorIndex, _ := (C.uint)(SensorIndex), cgoAllocsUnknown
cPThermalSettings, _ := (*C.nvmlGpuThermalSettings_t)(unsafe.Pointer(PThermalSettings)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetThermalSettings(cnvmlDevice, cSensorIndex, cPThermalSettings)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetPerformanceState function as declared in nvml/nvml.h
func nvmlDeviceGetPerformanceState(nvmlDevice nvmlDevice, PState *Pstates) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cPState, _ := (*C.nvmlPstates_t)(unsafe.Pointer(PState)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetPerformanceState(cnvmlDevice, cPState)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetCurrentClocksThrottleReasons function as declared in nvml/nvml.h
func nvmlDeviceGetCurrentClocksThrottleReasons(nvmlDevice nvmlDevice, ClocksThrottleReasons *uint64) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cClocksThrottleReasons, _ := (*C.ulonglong)(unsafe.Pointer(ClocksThrottleReasons)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetCurrentClocksThrottleReasons(cnvmlDevice, cClocksThrottleReasons)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetSupportedClocksThrottleReasons function as declared in nvml/nvml.h
func nvmlDeviceGetSupportedClocksThrottleReasons(nvmlDevice nvmlDevice, SupportedClocksThrottleReasons *uint64) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cSupportedClocksThrottleReasons, _ := (*C.ulonglong)(unsafe.Pointer(SupportedClocksThrottleReasons)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetSupportedClocksThrottleReasons(cnvmlDevice, cSupportedClocksThrottleReasons)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetPowerState function as declared in nvml/nvml.h
func nvmlDeviceGetPowerState(nvmlDevice nvmlDevice, PState *Pstates) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cPState, _ := (*C.nvmlPstates_t)(unsafe.Pointer(PState)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetPowerState(cnvmlDevice, cPState)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetPowerManagementMode function as declared in nvml/nvml.h
func nvmlDeviceGetPowerManagementMode(nvmlDevice nvmlDevice, Mode *EnableState) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMode, _ := (*C.nvmlEnableState_t)(unsafe.Pointer(Mode)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetPowerManagementMode(cnvmlDevice, cMode)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetPowerManagementLimit function as declared in nvml/nvml.h
func nvmlDeviceGetPowerManagementLimit(nvmlDevice nvmlDevice, Limit *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cLimit, _ := (*C.uint)(unsafe.Pointer(Limit)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetPowerManagementLimit(cnvmlDevice, cLimit)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetPowerManagementLimitConstraints function as declared in nvml/nvml.h
func nvmlDeviceGetPowerManagementLimitConstraints(nvmlDevice nvmlDevice, MinLimit *uint32, MaxLimit *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMinLimit, _ := (*C.uint)(unsafe.Pointer(MinLimit)), cgoAllocsUnknown
cMaxLimit, _ := (*C.uint)(unsafe.Pointer(MaxLimit)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetPowerManagementLimitConstraints(cnvmlDevice, cMinLimit, cMaxLimit)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetPowerManagementDefaultLimit function as declared in nvml/nvml.h
func nvmlDeviceGetPowerManagementDefaultLimit(nvmlDevice nvmlDevice, DefaultLimit *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cDefaultLimit, _ := (*C.uint)(unsafe.Pointer(DefaultLimit)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetPowerManagementDefaultLimit(cnvmlDevice, cDefaultLimit)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetPowerUsage function as declared in nvml/nvml.h
func nvmlDeviceGetPowerUsage(nvmlDevice nvmlDevice, Power *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cPower, _ := (*C.uint)(unsafe.Pointer(Power)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetPowerUsage(cnvmlDevice, cPower)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetTotalEnergyConsumption function as declared in nvml/nvml.h
func nvmlDeviceGetTotalEnergyConsumption(nvmlDevice nvmlDevice, Energy *uint64) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cEnergy, _ := (*C.ulonglong)(unsafe.Pointer(Energy)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetTotalEnergyConsumption(cnvmlDevice, cEnergy)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetEnforcedPowerLimit function as declared in nvml/nvml.h
func nvmlDeviceGetEnforcedPowerLimit(nvmlDevice nvmlDevice, Limit *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cLimit, _ := (*C.uint)(unsafe.Pointer(Limit)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetEnforcedPowerLimit(cnvmlDevice, cLimit)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetGpuOperationMode function as declared in nvml/nvml.h
func nvmlDeviceGetGpuOperationMode(nvmlDevice nvmlDevice, Current *GpuOperationMode, Pending *GpuOperationMode) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cCurrent, _ := (*C.nvmlGpuOperationMode_t)(unsafe.Pointer(Current)), cgoAllocsUnknown
cPending, _ := (*C.nvmlGpuOperationMode_t)(unsafe.Pointer(Pending)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetGpuOperationMode(cnvmlDevice, cCurrent, cPending)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetMemoryInfo function as declared in nvml/nvml.h
func nvmlDeviceGetMemoryInfo(nvmlDevice nvmlDevice, Memory *Memory) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMemory, _ := (*C.nvmlMemory_t)(unsafe.Pointer(Memory)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetMemoryInfo(cnvmlDevice, cMemory)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetMemoryInfo_v2 function as declared in nvml/nvml.h
func nvmlDeviceGetMemoryInfo_v2(nvmlDevice nvmlDevice, Memory *Memory_v2) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMemory, _ := (*C.nvmlMemory_v2_t)(unsafe.Pointer(Memory)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetMemoryInfo_v2(cnvmlDevice, cMemory)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetComputeMode function as declared in nvml/nvml.h
func nvmlDeviceGetComputeMode(nvmlDevice nvmlDevice, Mode *ComputeMode) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMode, _ := (*C.nvmlComputeMode_t)(unsafe.Pointer(Mode)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetComputeMode(cnvmlDevice, cMode)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetCudaComputeCapability function as declared in nvml/nvml.h
func nvmlDeviceGetCudaComputeCapability(nvmlDevice nvmlDevice, Major *int32, Minor *int32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMajor, _ := (*C.int)(unsafe.Pointer(Major)), cgoAllocsUnknown
cMinor, _ := (*C.int)(unsafe.Pointer(Minor)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetCudaComputeCapability(cnvmlDevice, cMajor, cMinor)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetEccMode function as declared in nvml/nvml.h
func nvmlDeviceGetEccMode(nvmlDevice nvmlDevice, Current *EnableState, Pending *EnableState) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cCurrent, _ := (*C.nvmlEnableState_t)(unsafe.Pointer(Current)), cgoAllocsUnknown
cPending, _ := (*C.nvmlEnableState_t)(unsafe.Pointer(Pending)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetEccMode(cnvmlDevice, cCurrent, cPending)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetDefaultEccMode function as declared in nvml/nvml.h
func nvmlDeviceGetDefaultEccMode(nvmlDevice nvmlDevice, DefaultMode *EnableState) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cDefaultMode, _ := (*C.nvmlEnableState_t)(unsafe.Pointer(DefaultMode)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetDefaultEccMode(cnvmlDevice, cDefaultMode)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetBoardId function as declared in nvml/nvml.h
func nvmlDeviceGetBoardId(nvmlDevice nvmlDevice, BoardId *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cBoardId, _ := (*C.uint)(unsafe.Pointer(BoardId)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetBoardId(cnvmlDevice, cBoardId)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetMultiGpuBoard function as declared in nvml/nvml.h
func nvmlDeviceGetMultiGpuBoard(nvmlDevice nvmlDevice, MultiGpuBool *uint32) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cMultiGpuBool, _ := (*C.uint)(unsafe.Pointer(MultiGpuBool)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetMultiGpuBoard(cnvmlDevice, cMultiGpuBool)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetTotalEccErrors function as declared in nvml/nvml.h
func nvmlDeviceGetTotalEccErrors(nvmlDevice nvmlDevice, ErrorType MemoryErrorType, CounterType EccCounterType, EccCounts *uint64) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cErrorType, _ := (C.nvmlMemoryErrorType_t)(ErrorType), cgoAllocsUnknown
cCounterType, _ := (C.nvmlEccCounterType_t)(CounterType), cgoAllocsUnknown
cEccCounts, _ := (*C.ulonglong)(unsafe.Pointer(EccCounts)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetTotalEccErrors(cnvmlDevice, cErrorType, cCounterType, cEccCounts)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetDetailedEccErrors function as declared in nvml/nvml.h
func nvmlDeviceGetDetailedEccErrors(nvmlDevice nvmlDevice, ErrorType MemoryErrorType, CounterType EccCounterType, EccCounts *EccErrorCounts) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cErrorType, _ := (C.nvmlMemoryErrorType_t)(ErrorType), cgoAllocsUnknown
cCounterType, _ := (C.nvmlEccCounterType_t)(CounterType), cgoAllocsUnknown
cEccCounts, _ := (*C.nvmlEccErrorCounts_t)(unsafe.Pointer(EccCounts)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetDetailedEccErrors(cnvmlDevice, cErrorType, cCounterType, cEccCounts)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetMemoryErrorCounter function as declared in nvml/nvml.h
func nvmlDeviceGetMemoryErrorCounter(nvmlDevice nvmlDevice, ErrorType MemoryErrorType, CounterType EccCounterType, LocationType MemoryLocation, Count *uint64) Return {
cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown
cErrorType, _ := (C.nvmlMemoryErrorType_t)(ErrorType), cgoAllocsUnknown
cCounterType, _ := (C.nvmlEccCounterType_t)(CounterType), cgoAllocsUnknown
cLocationType, _ := (C.nvmlMemoryLocation_t)(LocationType), cgoAllocsUnknown
cCount, _ := (*C.ulonglong)(unsafe.Pointer(Count)), cgoAllocsUnknown
__ret := C.nvmlDeviceGetMemoryErrorCounter(cnvmlDevice, cErrorType, cCounterType, cLocationType, cCount)
__v := (Return)(__ret)
return __v
}
// nvmlDeviceGetUtilizationRates function as declared in nvml/nvml.h
func nvmlDeviceGetUtilizationRates(nvmlDevice nvmlDevice, Utilization *Utilization) Return {