-
Notifications
You must be signed in to change notification settings - Fork 107
/
Copy pathzes_ddi.h
2029 lines (1804 loc) · 81.8 KB
/
zes_ddi.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
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) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
* @file zes_ddi.h
* @version v1.12-r1.12.15
*
*/
#ifndef _ZES_DDI_H
#define _ZES_DDI_H
#if defined(__cplusplus)
#pragma once
#endif
#include "zes_api.h"
#if defined(__cplusplus)
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesInit
typedef ze_result_t (ZE_APICALL *zes_pfnInit_t)(
zes_init_flags_t
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Table of Global functions pointers
typedef struct _zes_global_dditable_t
{
zes_pfnInit_t pfnInit;
} zes_global_dditable_t;
///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's Global table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zesGetGlobalProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
zes_global_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesGetGlobalProcAddrTable
typedef ze_result_t (ZE_APICALL *zes_pfnGetGlobalProcAddrTable_t)(
ze_api_version_t,
zes_global_dditable_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceGetProperties
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceGetProperties_t)(
zes_device_handle_t,
zes_device_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceGetState
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceGetState_t)(
zes_device_handle_t,
zes_device_state_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceReset
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceReset_t)(
zes_device_handle_t,
ze_bool_t
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceProcessesGetState
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceProcessesGetState_t)(
zes_device_handle_t,
uint32_t*,
zes_process_state_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDevicePciGetProperties
typedef ze_result_t (ZE_APICALL *zes_pfnDevicePciGetProperties_t)(
zes_device_handle_t,
zes_pci_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDevicePciGetState
typedef ze_result_t (ZE_APICALL *zes_pfnDevicePciGetState_t)(
zes_device_handle_t,
zes_pci_state_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDevicePciGetBars
typedef ze_result_t (ZE_APICALL *zes_pfnDevicePciGetBars_t)(
zes_device_handle_t,
uint32_t*,
zes_pci_bar_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDevicePciGetStats
typedef ze_result_t (ZE_APICALL *zes_pfnDevicePciGetStats_t)(
zes_device_handle_t,
zes_pci_stats_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumDiagnosticTestSuites
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumDiagnosticTestSuites_t)(
zes_device_handle_t,
uint32_t*,
zes_diag_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumEngineGroups
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumEngineGroups_t)(
zes_device_handle_t,
uint32_t*,
zes_engine_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEventRegister
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEventRegister_t)(
zes_device_handle_t,
zes_event_type_flags_t
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumFabricPorts
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumFabricPorts_t)(
zes_device_handle_t,
uint32_t*,
zes_fabric_port_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumFans
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumFans_t)(
zes_device_handle_t,
uint32_t*,
zes_fan_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumFirmwares
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumFirmwares_t)(
zes_device_handle_t,
uint32_t*,
zes_firmware_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumFrequencyDomains
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumFrequencyDomains_t)(
zes_device_handle_t,
uint32_t*,
zes_freq_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumLeds
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumLeds_t)(
zes_device_handle_t,
uint32_t*,
zes_led_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumMemoryModules
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumMemoryModules_t)(
zes_device_handle_t,
uint32_t*,
zes_mem_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumPerformanceFactorDomains
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumPerformanceFactorDomains_t)(
zes_device_handle_t,
uint32_t*,
zes_perf_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumPowerDomains
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumPowerDomains_t)(
zes_device_handle_t,
uint32_t*,
zes_pwr_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceGetCardPowerDomain
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceGetCardPowerDomain_t)(
zes_device_handle_t,
zes_pwr_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumPsus
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumPsus_t)(
zes_device_handle_t,
uint32_t*,
zes_psu_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumRasErrorSets
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumRasErrorSets_t)(
zes_device_handle_t,
uint32_t*,
zes_ras_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumSchedulers
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumSchedulers_t)(
zes_device_handle_t,
uint32_t*,
zes_sched_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumStandbyDomains
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumStandbyDomains_t)(
zes_device_handle_t,
uint32_t*,
zes_standby_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumTemperatureSensors
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumTemperatureSensors_t)(
zes_device_handle_t,
uint32_t*,
zes_temp_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEccAvailable
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEccAvailable_t)(
zes_device_handle_t,
ze_bool_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEccConfigurable
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEccConfigurable_t)(
zes_device_handle_t,
ze_bool_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceGetEccState
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceGetEccState_t)(
zes_device_handle_t,
zes_device_ecc_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceSetEccState
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceSetEccState_t)(
zes_device_handle_t,
const zes_device_ecc_desc_t*,
zes_device_ecc_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceGet
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceGet_t)(
zes_driver_handle_t,
uint32_t*,
zes_device_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceSetOverclockWaiver
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceSetOverclockWaiver_t)(
zes_device_handle_t
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceGetOverclockDomains
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceGetOverclockDomains_t)(
zes_device_handle_t,
uint32_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceGetOverclockControls
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceGetOverclockControls_t)(
zes_device_handle_t,
zes_overclock_domain_t,
uint32_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceResetOverclockSettings
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceResetOverclockSettings_t)(
zes_device_handle_t,
ze_bool_t
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceReadOverclockState
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceReadOverclockState_t)(
zes_device_handle_t,
zes_overclock_mode_t*,
ze_bool_t*,
ze_bool_t*,
zes_pending_action_t*,
ze_bool_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumOverclockDomains
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumOverclockDomains_t)(
zes_device_handle_t,
uint32_t*,
zes_overclock_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceResetExt
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceResetExt_t)(
zes_device_handle_t,
zes_reset_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Table of Device functions pointers
typedef struct _zes_device_dditable_t
{
zes_pfnDeviceGetProperties_t pfnGetProperties;
zes_pfnDeviceGetState_t pfnGetState;
zes_pfnDeviceReset_t pfnReset;
zes_pfnDeviceProcessesGetState_t pfnProcessesGetState;
zes_pfnDevicePciGetProperties_t pfnPciGetProperties;
zes_pfnDevicePciGetState_t pfnPciGetState;
zes_pfnDevicePciGetBars_t pfnPciGetBars;
zes_pfnDevicePciGetStats_t pfnPciGetStats;
zes_pfnDeviceEnumDiagnosticTestSuites_t pfnEnumDiagnosticTestSuites;
zes_pfnDeviceEnumEngineGroups_t pfnEnumEngineGroups;
zes_pfnDeviceEventRegister_t pfnEventRegister;
zes_pfnDeviceEnumFabricPorts_t pfnEnumFabricPorts;
zes_pfnDeviceEnumFans_t pfnEnumFans;
zes_pfnDeviceEnumFirmwares_t pfnEnumFirmwares;
zes_pfnDeviceEnumFrequencyDomains_t pfnEnumFrequencyDomains;
zes_pfnDeviceEnumLeds_t pfnEnumLeds;
zes_pfnDeviceEnumMemoryModules_t pfnEnumMemoryModules;
zes_pfnDeviceEnumPerformanceFactorDomains_t pfnEnumPerformanceFactorDomains;
zes_pfnDeviceEnumPowerDomains_t pfnEnumPowerDomains;
zes_pfnDeviceGetCardPowerDomain_t pfnGetCardPowerDomain;
zes_pfnDeviceEnumPsus_t pfnEnumPsus;
zes_pfnDeviceEnumRasErrorSets_t pfnEnumRasErrorSets;
zes_pfnDeviceEnumSchedulers_t pfnEnumSchedulers;
zes_pfnDeviceEnumStandbyDomains_t pfnEnumStandbyDomains;
zes_pfnDeviceEnumTemperatureSensors_t pfnEnumTemperatureSensors;
zes_pfnDeviceEccAvailable_t pfnEccAvailable;
zes_pfnDeviceEccConfigurable_t pfnEccConfigurable;
zes_pfnDeviceGetEccState_t pfnGetEccState;
zes_pfnDeviceSetEccState_t pfnSetEccState;
zes_pfnDeviceGet_t pfnGet;
zes_pfnDeviceSetOverclockWaiver_t pfnSetOverclockWaiver;
zes_pfnDeviceGetOverclockDomains_t pfnGetOverclockDomains;
zes_pfnDeviceGetOverclockControls_t pfnGetOverclockControls;
zes_pfnDeviceResetOverclockSettings_t pfnResetOverclockSettings;
zes_pfnDeviceReadOverclockState_t pfnReadOverclockState;
zes_pfnDeviceEnumOverclockDomains_t pfnEnumOverclockDomains;
zes_pfnDeviceResetExt_t pfnResetExt;
} zes_device_dditable_t;
///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's Device table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zesGetDeviceProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
zes_device_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesGetDeviceProcAddrTable
typedef ze_result_t (ZE_APICALL *zes_pfnGetDeviceProcAddrTable_t)(
ze_api_version_t,
zes_device_dditable_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceGetSubDevicePropertiesExp
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceGetSubDevicePropertiesExp_t)(
zes_device_handle_t,
uint32_t*,
zes_subdevice_exp_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumActiveVFExp
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumActiveVFExp_t)(
zes_device_handle_t,
uint32_t*,
zes_vf_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDeviceEnumEnabledVFExp
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumEnabledVFExp_t)(
zes_device_handle_t,
uint32_t*,
zes_vf_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Table of DeviceExp functions pointers
typedef struct _zes_device_exp_dditable_t
{
zes_pfnDeviceGetSubDevicePropertiesExp_t pfnGetSubDevicePropertiesExp;
zes_pfnDeviceEnumActiveVFExp_t pfnEnumActiveVFExp;
zes_pfnDeviceEnumEnabledVFExp_t pfnEnumEnabledVFExp;
} zes_device_exp_dditable_t;
///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's DeviceExp table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zesGetDeviceExpProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
zes_device_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesGetDeviceExpProcAddrTable
typedef ze_result_t (ZE_APICALL *zes_pfnGetDeviceExpProcAddrTable_t)(
ze_api_version_t,
zes_device_exp_dditable_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDriverEventListen
typedef ze_result_t (ZE_APICALL *zes_pfnDriverEventListen_t)(
ze_driver_handle_t,
uint32_t,
uint32_t,
zes_device_handle_t*,
uint32_t*,
zes_event_type_flags_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDriverEventListenEx
typedef ze_result_t (ZE_APICALL *zes_pfnDriverEventListenEx_t)(
ze_driver_handle_t,
uint64_t,
uint32_t,
zes_device_handle_t*,
uint32_t*,
zes_event_type_flags_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDriverGet
typedef ze_result_t (ZE_APICALL *zes_pfnDriverGet_t)(
uint32_t*,
zes_driver_handle_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDriverGetExtensionProperties
typedef ze_result_t (ZE_APICALL *zes_pfnDriverGetExtensionProperties_t)(
zes_driver_handle_t,
uint32_t*,
zes_driver_extension_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDriverGetExtensionFunctionAddress
typedef ze_result_t (ZE_APICALL *zes_pfnDriverGetExtensionFunctionAddress_t)(
zes_driver_handle_t,
const char*,
void**
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Table of Driver functions pointers
typedef struct _zes_driver_dditable_t
{
zes_pfnDriverEventListen_t pfnEventListen;
zes_pfnDriverEventListenEx_t pfnEventListenEx;
zes_pfnDriverGet_t pfnGet;
zes_pfnDriverGetExtensionProperties_t pfnGetExtensionProperties;
zes_pfnDriverGetExtensionFunctionAddress_t pfnGetExtensionFunctionAddress;
} zes_driver_dditable_t;
///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's Driver table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zesGetDriverProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
zes_driver_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesGetDriverProcAddrTable
typedef ze_result_t (ZE_APICALL *zes_pfnGetDriverProcAddrTable_t)(
ze_api_version_t,
zes_driver_dditable_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesDriverGetDeviceByUuidExp
typedef ze_result_t (ZE_APICALL *zes_pfnDriverGetDeviceByUuidExp_t)(
zes_driver_handle_t,
zes_uuid_t,
zes_device_handle_t*,
ze_bool_t*,
uint32_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Table of DriverExp functions pointers
typedef struct _zes_driver_exp_dditable_t
{
zes_pfnDriverGetDeviceByUuidExp_t pfnGetDeviceByUuidExp;
} zes_driver_exp_dditable_t;
///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's DriverExp table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zesGetDriverExpProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
zes_driver_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesGetDriverExpProcAddrTable
typedef ze_result_t (ZE_APICALL *zes_pfnGetDriverExpProcAddrTable_t)(
ze_api_version_t,
zes_driver_exp_dditable_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesOverclockGetDomainProperties
typedef ze_result_t (ZE_APICALL *zes_pfnOverclockGetDomainProperties_t)(
zes_overclock_handle_t,
zes_overclock_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesOverclockGetDomainVFProperties
typedef ze_result_t (ZE_APICALL *zes_pfnOverclockGetDomainVFProperties_t)(
zes_overclock_handle_t,
zes_vf_property_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesOverclockGetDomainControlProperties
typedef ze_result_t (ZE_APICALL *zes_pfnOverclockGetDomainControlProperties_t)(
zes_overclock_handle_t,
zes_overclock_control_t,
zes_control_property_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesOverclockGetControlCurrentValue
typedef ze_result_t (ZE_APICALL *zes_pfnOverclockGetControlCurrentValue_t)(
zes_overclock_handle_t,
zes_overclock_control_t,
double*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesOverclockGetControlPendingValue
typedef ze_result_t (ZE_APICALL *zes_pfnOverclockGetControlPendingValue_t)(
zes_overclock_handle_t,
zes_overclock_control_t,
double*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesOverclockSetControlUserValue
typedef ze_result_t (ZE_APICALL *zes_pfnOverclockSetControlUserValue_t)(
zes_overclock_handle_t,
zes_overclock_control_t,
double,
zes_pending_action_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesOverclockGetControlState
typedef ze_result_t (ZE_APICALL *zes_pfnOverclockGetControlState_t)(
zes_overclock_handle_t,
zes_overclock_control_t,
zes_control_state_t*,
zes_pending_action_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesOverclockGetVFPointValues
typedef ze_result_t (ZE_APICALL *zes_pfnOverclockGetVFPointValues_t)(
zes_overclock_handle_t,
zes_vf_type_t,
zes_vf_array_type_t,
uint32_t,
uint32_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesOverclockSetVFPointValues
typedef ze_result_t (ZE_APICALL *zes_pfnOverclockSetVFPointValues_t)(
zes_overclock_handle_t,
zes_vf_type_t,
uint32_t,
uint32_t
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Table of Overclock functions pointers
typedef struct _zes_overclock_dditable_t
{
zes_pfnOverclockGetDomainProperties_t pfnGetDomainProperties;
zes_pfnOverclockGetDomainVFProperties_t pfnGetDomainVFProperties;
zes_pfnOverclockGetDomainControlProperties_t pfnGetDomainControlProperties;
zes_pfnOverclockGetControlCurrentValue_t pfnGetControlCurrentValue;
zes_pfnOverclockGetControlPendingValue_t pfnGetControlPendingValue;
zes_pfnOverclockSetControlUserValue_t pfnSetControlUserValue;
zes_pfnOverclockGetControlState_t pfnGetControlState;
zes_pfnOverclockGetVFPointValues_t pfnGetVFPointValues;
zes_pfnOverclockSetVFPointValues_t pfnSetVFPointValues;
} zes_overclock_dditable_t;
///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's Overclock table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zesGetOverclockProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
zes_overclock_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesGetOverclockProcAddrTable
typedef ze_result_t (ZE_APICALL *zes_pfnGetOverclockProcAddrTable_t)(
ze_api_version_t,
zes_overclock_dditable_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesSchedulerGetProperties
typedef ze_result_t (ZE_APICALL *zes_pfnSchedulerGetProperties_t)(
zes_sched_handle_t,
zes_sched_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesSchedulerGetCurrentMode
typedef ze_result_t (ZE_APICALL *zes_pfnSchedulerGetCurrentMode_t)(
zes_sched_handle_t,
zes_sched_mode_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesSchedulerGetTimeoutModeProperties
typedef ze_result_t (ZE_APICALL *zes_pfnSchedulerGetTimeoutModeProperties_t)(
zes_sched_handle_t,
ze_bool_t,
zes_sched_timeout_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesSchedulerGetTimesliceModeProperties
typedef ze_result_t (ZE_APICALL *zes_pfnSchedulerGetTimesliceModeProperties_t)(
zes_sched_handle_t,
ze_bool_t,
zes_sched_timeslice_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesSchedulerSetTimeoutMode
typedef ze_result_t (ZE_APICALL *zes_pfnSchedulerSetTimeoutMode_t)(
zes_sched_handle_t,
zes_sched_timeout_properties_t*,
ze_bool_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesSchedulerSetTimesliceMode
typedef ze_result_t (ZE_APICALL *zes_pfnSchedulerSetTimesliceMode_t)(
zes_sched_handle_t,
zes_sched_timeslice_properties_t*,
ze_bool_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesSchedulerSetExclusiveMode
typedef ze_result_t (ZE_APICALL *zes_pfnSchedulerSetExclusiveMode_t)(
zes_sched_handle_t,
ze_bool_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesSchedulerSetComputeUnitDebugMode
typedef ze_result_t (ZE_APICALL *zes_pfnSchedulerSetComputeUnitDebugMode_t)(
zes_sched_handle_t,
ze_bool_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Table of Scheduler functions pointers
typedef struct _zes_scheduler_dditable_t
{
zes_pfnSchedulerGetProperties_t pfnGetProperties;
zes_pfnSchedulerGetCurrentMode_t pfnGetCurrentMode;
zes_pfnSchedulerGetTimeoutModeProperties_t pfnGetTimeoutModeProperties;
zes_pfnSchedulerGetTimesliceModeProperties_t pfnGetTimesliceModeProperties;
zes_pfnSchedulerSetTimeoutMode_t pfnSetTimeoutMode;
zes_pfnSchedulerSetTimesliceMode_t pfnSetTimesliceMode;
zes_pfnSchedulerSetExclusiveMode_t pfnSetExclusiveMode;
zes_pfnSchedulerSetComputeUnitDebugMode_t pfnSetComputeUnitDebugMode;
} zes_scheduler_dditable_t;
///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's Scheduler table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zesGetSchedulerProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
zes_scheduler_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesGetSchedulerProcAddrTable
typedef ze_result_t (ZE_APICALL *zes_pfnGetSchedulerProcAddrTable_t)(
ze_api_version_t,
zes_scheduler_dditable_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesPerformanceFactorGetProperties
typedef ze_result_t (ZE_APICALL *zes_pfnPerformanceFactorGetProperties_t)(
zes_perf_handle_t,
zes_perf_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesPerformanceFactorGetConfig
typedef ze_result_t (ZE_APICALL *zes_pfnPerformanceFactorGetConfig_t)(
zes_perf_handle_t,
double*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesPerformanceFactorSetConfig
typedef ze_result_t (ZE_APICALL *zes_pfnPerformanceFactorSetConfig_t)(
zes_perf_handle_t,
double
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Table of PerformanceFactor functions pointers
typedef struct _zes_performance_factor_dditable_t
{
zes_pfnPerformanceFactorGetProperties_t pfnGetProperties;
zes_pfnPerformanceFactorGetConfig_t pfnGetConfig;
zes_pfnPerformanceFactorSetConfig_t pfnSetConfig;
} zes_performance_factor_dditable_t;
///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's PerformanceFactor table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zesGetPerformanceFactorProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
zes_performance_factor_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesGetPerformanceFactorProcAddrTable
typedef ze_result_t (ZE_APICALL *zes_pfnGetPerformanceFactorProcAddrTable_t)(
ze_api_version_t,
zes_performance_factor_dditable_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesPowerGetProperties
typedef ze_result_t (ZE_APICALL *zes_pfnPowerGetProperties_t)(
zes_pwr_handle_t,
zes_power_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesPowerGetEnergyCounter
typedef ze_result_t (ZE_APICALL *zes_pfnPowerGetEnergyCounter_t)(
zes_pwr_handle_t,
zes_power_energy_counter_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesPowerGetLimits
typedef ze_result_t (ZE_APICALL *zes_pfnPowerGetLimits_t)(
zes_pwr_handle_t,
zes_power_sustained_limit_t*,
zes_power_burst_limit_t*,
zes_power_peak_limit_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesPowerSetLimits
typedef ze_result_t (ZE_APICALL *zes_pfnPowerSetLimits_t)(
zes_pwr_handle_t,
const zes_power_sustained_limit_t*,
const zes_power_burst_limit_t*,
const zes_power_peak_limit_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesPowerGetEnergyThreshold
typedef ze_result_t (ZE_APICALL *zes_pfnPowerGetEnergyThreshold_t)(
zes_pwr_handle_t,
zes_energy_threshold_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesPowerSetEnergyThreshold
typedef ze_result_t (ZE_APICALL *zes_pfnPowerSetEnergyThreshold_t)(
zes_pwr_handle_t,
double
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesPowerGetLimitsExt
typedef ze_result_t (ZE_APICALL *zes_pfnPowerGetLimitsExt_t)(
zes_pwr_handle_t,
uint32_t*,
zes_power_limit_ext_desc_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesPowerSetLimitsExt
typedef ze_result_t (ZE_APICALL *zes_pfnPowerSetLimitsExt_t)(
zes_pwr_handle_t,
uint32_t*,
zes_power_limit_ext_desc_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Table of Power functions pointers
typedef struct _zes_power_dditable_t
{
zes_pfnPowerGetProperties_t pfnGetProperties;
zes_pfnPowerGetEnergyCounter_t pfnGetEnergyCounter;
zes_pfnPowerGetLimits_t pfnGetLimits;
zes_pfnPowerSetLimits_t pfnSetLimits;
zes_pfnPowerGetEnergyThreshold_t pfnGetEnergyThreshold;
zes_pfnPowerSetEnergyThreshold_t pfnSetEnergyThreshold;
zes_pfnPowerGetLimitsExt_t pfnGetLimitsExt;
zes_pfnPowerSetLimitsExt_t pfnSetLimitsExt;
} zes_power_dditable_t;
///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's Power table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zesGetPowerProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
zes_power_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesGetPowerProcAddrTable
typedef ze_result_t (ZE_APICALL *zes_pfnGetPowerProcAddrTable_t)(
ze_api_version_t,
zes_power_dditable_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesFrequencyGetProperties
typedef ze_result_t (ZE_APICALL *zes_pfnFrequencyGetProperties_t)(
zes_freq_handle_t,
zes_freq_properties_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesFrequencyGetAvailableClocks
typedef ze_result_t (ZE_APICALL *zes_pfnFrequencyGetAvailableClocks_t)(
zes_freq_handle_t,
uint32_t*,
double*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesFrequencyGetRange
typedef ze_result_t (ZE_APICALL *zes_pfnFrequencyGetRange_t)(
zes_freq_handle_t,
zes_freq_range_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesFrequencySetRange
typedef ze_result_t (ZE_APICALL *zes_pfnFrequencySetRange_t)(
zes_freq_handle_t,
const zes_freq_range_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesFrequencyGetState
typedef ze_result_t (ZE_APICALL *zes_pfnFrequencyGetState_t)(
zes_freq_handle_t,
zes_freq_state_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesFrequencyGetThrottleTime
typedef ze_result_t (ZE_APICALL *zes_pfnFrequencyGetThrottleTime_t)(
zes_freq_handle_t,
zes_freq_throttle_time_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesFrequencyOcGetCapabilities
typedef ze_result_t (ZE_APICALL *zes_pfnFrequencyOcGetCapabilities_t)(
zes_freq_handle_t,
zes_oc_capabilities_t*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesFrequencyOcGetFrequencyTarget
typedef ze_result_t (ZE_APICALL *zes_pfnFrequencyOcGetFrequencyTarget_t)(
zes_freq_handle_t,
double*
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesFrequencyOcSetFrequencyTarget
typedef ze_result_t (ZE_APICALL *zes_pfnFrequencyOcSetFrequencyTarget_t)(
zes_freq_handle_t,
double
);
///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zesFrequencyOcGetVoltageTarget