opaque structs are also c.Struct (#15596)

This commit is contained in:
2026-04-03 19:40:43 -04:00
committed by GitHub
parent 645d45d968
commit 74ecf6d3e6
26 changed files with 246 additions and 246 deletions
+6 -6
View File
@@ -3235,7 +3235,7 @@ class struct_amdgpu_firmware_info(c.Struct):
ucode_size: Annotated[Annotated[int, ctypes.c_uint32], 32]
tmr_mc_addr_lo: Annotated[Annotated[int, ctypes.c_uint32], 36]
tmr_mc_addr_hi: Annotated[Annotated[int, ctypes.c_uint32], 40]
class struct_firmware(ctypes.Structure): pass
class struct_firmware(c.Struct): SIZE = 0
class enum_psp_gfx_crtl_cmd_id(Annotated[int, ctypes.c_uint32], c.Enum): pass
GFX_CTRL_CMD_ID_INIT_RBI_RING = enum_psp_gfx_crtl_cmd_id.define('GFX_CTRL_CMD_ID_INIT_RBI_RING', 65536)
GFX_CTRL_CMD_ID_INIT_GPCOM_RING = enum_psp_gfx_crtl_cmd_id.define('GFX_CTRL_CMD_ID_INIT_GPCOM_RING', 131072)
@@ -3568,10 +3568,10 @@ TA_TYPE_RAP = enum_ta_type_id.define('TA_TYPE_RAP', 5)
TA_TYPE_SECUREDISPLAY = enum_ta_type_id.define('TA_TYPE_SECUREDISPLAY', 6)
TA_TYPE_MAX_INDEX = enum_ta_type_id.define('TA_TYPE_MAX_INDEX', 7)
class struct_psp_context(ctypes.Structure): pass
class struct_psp_xgmi_node_info(ctypes.Structure): pass
class struct_psp_xgmi_topology_info(ctypes.Structure): pass
class struct_psp_bin_desc(ctypes.Structure): pass
class struct_psp_context(c.Struct): SIZE = 0
class struct_psp_xgmi_node_info(c.Struct): SIZE = 0
class struct_psp_xgmi_topology_info(c.Struct): SIZE = 0
class struct_psp_bin_desc(c.Struct): SIZE = 0
class enum_psp_bootloader_cmd(Annotated[int, ctypes.c_uint32], c.Enum): pass
PSP_BL__LOAD_SYSDRV = enum_psp_bootloader_cmd.define('PSP_BL__LOAD_SYSDRV', 65536)
PSP_BL__LOAD_SOSDRV = enum_psp_bootloader_cmd.define('PSP_BL__LOAD_SOSDRV', 131072)
@@ -3630,7 +3630,7 @@ SCPM_DISABLE = enum_psp_runtime_scpm_authentication.define('SCPM_DISABLE', 0)
SCPM_ENABLE = enum_psp_runtime_scpm_authentication.define('SCPM_ENABLE', 1)
SCPM_ENABLE_WITH_SCPM_ERR = enum_psp_runtime_scpm_authentication.define('SCPM_ENABLE_WITH_SCPM_ERR', 2)
class struct_amdgpu_device(ctypes.Structure): pass
class struct_amdgpu_device(c.Struct): SIZE = 0
class enum_amdgpu_interrupt_state(Annotated[int, ctypes.c_uint32], c.Enum): pass
AMDGPU_IRQ_STATE_DISABLE = enum_amdgpu_interrupt_state.define('AMDGPU_IRQ_STATE_DISABLE', 0)
AMDGPU_IRQ_STATE_ENABLE = enum_amdgpu_interrupt_state.define('AMDGPU_IRQ_STATE_ENABLE', 1)
+10 -10
View File
@@ -4,16 +4,16 @@ import ctypes
from typing import Annotated, Literal, TypeAlias
from tinygrad.runtime.support.c import _IO, _IOW, _IOR, _IOWR
from tinygrad.runtime.support import c
class union_PM4_MES_TYPE_3_HEADER(ctypes.Union): pass
class union_PM4_MES_TYPE_3_HEADER(c.Struct): SIZE = 0
class enum_mes_set_resources_queue_type_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
queue_type__mes_set_resources__kernel_interface_queue_kiq = enum_mes_set_resources_queue_type_enum.define('queue_type__mes_set_resources__kernel_interface_queue_kiq', 0)
queue_type__mes_set_resources__hsa_interface_queue_hiq = enum_mes_set_resources_queue_type_enum.define('queue_type__mes_set_resources__hsa_interface_queue_hiq', 1)
queue_type__mes_set_resources__hsa_debug_interface_queue = enum_mes_set_resources_queue_type_enum.define('queue_type__mes_set_resources__hsa_debug_interface_queue', 4)
class struct_pm4_mes_set_resources(ctypes.Structure): pass
class struct_pm4_mes_runlist(ctypes.Structure): pass
class struct_pm4_mes_map_process(ctypes.Structure): pass
class struct_PM4_MES_MAP_PROCESS_VM(ctypes.Structure): pass
class struct_pm4_mes_set_resources(c.Struct): SIZE = 0
class struct_pm4_mes_runlist(c.Struct): SIZE = 0
class struct_pm4_mes_map_process(c.Struct): SIZE = 0
class struct_PM4_MES_MAP_PROCESS_VM(c.Struct): SIZE = 0
class enum_mes_map_queues_queue_sel_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
queue_sel__mes_map_queues__map_to_specified_queue_slots_vi = enum_mes_map_queues_queue_sel_enum.define('queue_sel__mes_map_queues__map_to_specified_queue_slots_vi', 0)
queue_sel__mes_map_queues__map_to_hws_determined_queue_slots_vi = enum_mes_map_queues_queue_sel_enum.define('queue_sel__mes_map_queues__map_to_hws_determined_queue_slots_vi', 1)
@@ -34,7 +34,7 @@ extended_engine_sel__mes_map_queues__legacy_engine_sel = enum_mes_map_queues_ext
extended_engine_sel__mes_map_queues__sdma0_to_7_sel = enum_mes_map_queues_extended_engine_sel_enum.define('extended_engine_sel__mes_map_queues__sdma0_to_7_sel', 1)
extended_engine_sel__mes_map_queues__sdma8_to_15_sel = enum_mes_map_queues_extended_engine_sel_enum.define('extended_engine_sel__mes_map_queues__sdma8_to_15_sel', 2)
class struct_pm4_mes_map_queues(ctypes.Structure): pass
class struct_pm4_mes_map_queues(c.Struct): SIZE = 0
class enum_mes_query_status_interrupt_sel_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
interrupt_sel__mes_query_status__completion_status = enum_mes_query_status_interrupt_sel_enum.define('interrupt_sel__mes_query_status__completion_status', 0)
interrupt_sel__mes_query_status__process_status = enum_mes_query_status_interrupt_sel_enum.define('interrupt_sel__mes_query_status__process_status', 1)
@@ -51,7 +51,7 @@ engine_sel__mes_query_status__compute = enum_mes_query_status_engine_sel_enum.de
engine_sel__mes_query_status__sdma0_queue = enum_mes_query_status_engine_sel_enum.define('engine_sel__mes_query_status__sdma0_queue', 2)
engine_sel__mes_query_status__sdma1_queue = enum_mes_query_status_engine_sel_enum.define('engine_sel__mes_query_status__sdma1_queue', 3)
class struct_pm4_mes_query_status(ctypes.Structure): pass
class struct_pm4_mes_query_status(c.Struct): SIZE = 0
class enum_mes_unmap_queues_action_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
action__mes_unmap_queues__preempt_queues = enum_mes_unmap_queues_action_enum.define('action__mes_unmap_queues__preempt_queues', 0)
action__mes_unmap_queues__reset_queues = enum_mes_unmap_queues_action_enum.define('action__mes_unmap_queues__reset_queues', 1)
@@ -73,7 +73,7 @@ class enum_mes_unmap_queues_extended_engine_sel_enum(Annotated[int, ctypes.c_uin
extended_engine_sel__mes_unmap_queues__legacy_engine_sel = enum_mes_unmap_queues_extended_engine_sel_enum.define('extended_engine_sel__mes_unmap_queues__legacy_engine_sel', 0)
extended_engine_sel__mes_unmap_queues__sdma0_to_7_sel = enum_mes_unmap_queues_extended_engine_sel_enum.define('extended_engine_sel__mes_unmap_queues__sdma0_to_7_sel', 1)
class struct_pm4_mes_unmap_queues(ctypes.Structure): pass
class struct_pm4_mes_unmap_queues(c.Struct): SIZE = 0
class enum_mec_release_mem_event_index_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
event_index__mec_release_mem__end_of_pipe = enum_mec_release_mem_event_index_enum.define('event_index__mec_release_mem__end_of_pipe', 5)
event_index__mec_release_mem__shader_done = enum_mec_release_mem_event_index_enum.define('event_index__mec_release_mem__shader_done', 6)
@@ -109,7 +109,7 @@ data_sel__mec_release_mem__send_gpu_clock_counter = enum_mec_release_mem_data_se
data_sel__mec_release_mem__send_cp_perfcounter_hi_lo = enum_mec_release_mem_data_sel_enum.define('data_sel__mec_release_mem__send_cp_perfcounter_hi_lo', 4)
data_sel__mec_release_mem__store_gds_data_to_memory = enum_mec_release_mem_data_sel_enum.define('data_sel__mec_release_mem__store_gds_data_to_memory', 5)
class struct_pm4_mec_release_mem(ctypes.Structure): pass
class struct_pm4_mec_release_mem(c.Struct): SIZE = 0
class enum_WRITE_DATA_dst_sel_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
dst_sel___write_data__mem_mapped_register = enum_WRITE_DATA_dst_sel_enum.define('dst_sel___write_data__mem_mapped_register', 0)
dst_sel___write_data__tc_l2 = enum_WRITE_DATA_dst_sel_enum.define('dst_sel___write_data__tc_l2', 2)
@@ -129,7 +129,7 @@ class enum_WRITE_DATA_cache_policy_enum(Annotated[int, ctypes.c_uint32], c.Enum)
cache_policy___write_data__lru = enum_WRITE_DATA_cache_policy_enum.define('cache_policy___write_data__lru', 0)
cache_policy___write_data__stream = enum_WRITE_DATA_cache_policy_enum.define('cache_policy___write_data__stream', 1)
class struct_pm4_mec_write_data_mmio(ctypes.Structure): pass
class struct_pm4_mec_write_data_mmio(c.Struct): SIZE = 0
class _anonenum0(Annotated[int, ctypes.c_uint32], c.Enum): pass
CACHE_FLUSH_AND_INV_TS_EVENT = _anonenum0.define('CACHE_FLUSH_AND_INV_TS_EVENT', 20)
+10 -10
View File
@@ -4,16 +4,16 @@ import ctypes
from typing import Annotated, Literal, TypeAlias
from tinygrad.runtime.support.c import _IO, _IOW, _IOR, _IOWR
from tinygrad.runtime.support import c
class union_PM4_MES_TYPE_3_HEADER(ctypes.Union): pass
class union_PM4_MES_TYPE_3_HEADER(c.Struct): SIZE = 0
class enum_mes_set_resources_queue_type_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
queue_type__mes_set_resources__kernel_interface_queue_kiq = enum_mes_set_resources_queue_type_enum.define('queue_type__mes_set_resources__kernel_interface_queue_kiq', 0)
queue_type__mes_set_resources__hsa_interface_queue_hiq = enum_mes_set_resources_queue_type_enum.define('queue_type__mes_set_resources__hsa_interface_queue_hiq', 1)
queue_type__mes_set_resources__hsa_debug_interface_queue = enum_mes_set_resources_queue_type_enum.define('queue_type__mes_set_resources__hsa_debug_interface_queue', 4)
class struct_pm4_mes_set_resources(ctypes.Structure): pass
class struct_pm4_mes_runlist(ctypes.Structure): pass
class struct_pm4_mes_map_process(ctypes.Structure): pass
class struct_PM4_MES_MAP_PROCESS_VM(ctypes.Structure): pass
class struct_pm4_mes_set_resources(c.Struct): SIZE = 0
class struct_pm4_mes_runlist(c.Struct): SIZE = 0
class struct_pm4_mes_map_process(c.Struct): SIZE = 0
class struct_PM4_MES_MAP_PROCESS_VM(c.Struct): SIZE = 0
class enum_mes_map_queues_queue_sel_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
queue_sel__mes_map_queues__map_to_specified_queue_slots_vi = enum_mes_map_queues_queue_sel_enum.define('queue_sel__mes_map_queues__map_to_specified_queue_slots_vi', 0)
queue_sel__mes_map_queues__map_to_hws_determined_queue_slots_vi = enum_mes_map_queues_queue_sel_enum.define('queue_sel__mes_map_queues__map_to_hws_determined_queue_slots_vi', 1)
@@ -34,7 +34,7 @@ extended_engine_sel__mes_map_queues__legacy_engine_sel = enum_mes_map_queues_ext
extended_engine_sel__mes_map_queues__sdma0_to_7_sel = enum_mes_map_queues_extended_engine_sel_enum.define('extended_engine_sel__mes_map_queues__sdma0_to_7_sel', 1)
extended_engine_sel__mes_map_queues__sdma8_to_15_sel = enum_mes_map_queues_extended_engine_sel_enum.define('extended_engine_sel__mes_map_queues__sdma8_to_15_sel', 2)
class struct_pm4_mes_map_queues(ctypes.Structure): pass
class struct_pm4_mes_map_queues(c.Struct): SIZE = 0
class enum_mes_query_status_interrupt_sel_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
interrupt_sel__mes_query_status__completion_status = enum_mes_query_status_interrupt_sel_enum.define('interrupt_sel__mes_query_status__completion_status', 0)
interrupt_sel__mes_query_status__process_status = enum_mes_query_status_interrupt_sel_enum.define('interrupt_sel__mes_query_status__process_status', 1)
@@ -51,7 +51,7 @@ engine_sel__mes_query_status__compute = enum_mes_query_status_engine_sel_enum.de
engine_sel__mes_query_status__sdma0_queue = enum_mes_query_status_engine_sel_enum.define('engine_sel__mes_query_status__sdma0_queue', 2)
engine_sel__mes_query_status__sdma1_queue = enum_mes_query_status_engine_sel_enum.define('engine_sel__mes_query_status__sdma1_queue', 3)
class struct_pm4_mes_query_status(ctypes.Structure): pass
class struct_pm4_mes_query_status(c.Struct): SIZE = 0
class enum_mes_unmap_queues_action_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
action__mes_unmap_queues__preempt_queues = enum_mes_unmap_queues_action_enum.define('action__mes_unmap_queues__preempt_queues', 0)
action__mes_unmap_queues__reset_queues = enum_mes_unmap_queues_action_enum.define('action__mes_unmap_queues__reset_queues', 1)
@@ -73,7 +73,7 @@ class enum_mes_unmap_queues_extended_engine_sel_enum(Annotated[int, ctypes.c_uin
extended_engine_sel__mes_unmap_queues__legacy_engine_sel = enum_mes_unmap_queues_extended_engine_sel_enum.define('extended_engine_sel__mes_unmap_queues__legacy_engine_sel', 0)
extended_engine_sel__mes_unmap_queues__sdma0_to_7_sel = enum_mes_unmap_queues_extended_engine_sel_enum.define('extended_engine_sel__mes_unmap_queues__sdma0_to_7_sel', 1)
class struct_pm4_mes_unmap_queues(ctypes.Structure): pass
class struct_pm4_mes_unmap_queues(c.Struct): SIZE = 0
class enum_mec_release_mem_event_index_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
event_index__mec_release_mem__end_of_pipe = enum_mec_release_mem_event_index_enum.define('event_index__mec_release_mem__end_of_pipe', 5)
event_index__mec_release_mem__shader_done = enum_mec_release_mem_event_index_enum.define('event_index__mec_release_mem__shader_done', 6)
@@ -109,7 +109,7 @@ data_sel__mec_release_mem__send_gpu_clock_counter = enum_mec_release_mem_data_se
data_sel__mec_release_mem__send_cp_perfcounter_hi_lo = enum_mec_release_mem_data_sel_enum.define('data_sel__mec_release_mem__send_cp_perfcounter_hi_lo', 4)
data_sel__mec_release_mem__store_gds_data_to_memory = enum_mec_release_mem_data_sel_enum.define('data_sel__mec_release_mem__store_gds_data_to_memory', 5)
class struct_pm4_mec_release_mem(ctypes.Structure): pass
class struct_pm4_mec_release_mem(c.Struct): SIZE = 0
class enum_WRITE_DATA_dst_sel_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
dst_sel___write_data__mem_mapped_register = enum_WRITE_DATA_dst_sel_enum.define('dst_sel___write_data__mem_mapped_register', 0)
dst_sel___write_data__tc_l2 = enum_WRITE_DATA_dst_sel_enum.define('dst_sel___write_data__tc_l2', 2)
@@ -129,7 +129,7 @@ class enum_WRITE_DATA_cache_policy_enum(Annotated[int, ctypes.c_uint32], c.Enum)
cache_policy___write_data__lru = enum_WRITE_DATA_cache_policy_enum.define('cache_policy___write_data__lru', 0)
cache_policy___write_data__stream = enum_WRITE_DATA_cache_policy_enum.define('cache_policy___write_data__stream', 1)
class struct_pm4_mec_write_data_mmio(ctypes.Structure): pass
class struct_pm4_mec_write_data_mmio(c.Struct): SIZE = 0
class _anonenum0(Annotated[int, ctypes.c_uint32], c.Enum): pass
CACHE_FLUSH_AND_INV_TS_EVENT = _anonenum0.define('CACHE_FLUSH_AND_INV_TS_EVENT', 20)
+2 -2
View File
@@ -1019,7 +1019,7 @@ class DpmActivityMonitorCoeffIntExternal_t(c.Struct):
class struct_smu_hw_power_state(c.Struct):
SIZE = 4
magic: Annotated[Annotated[int, ctypes.c_uint32], 0]
class struct_smu_power_state(ctypes.Structure): pass
class struct_smu_power_state(c.Struct): SIZE = 0
class enum_smu_state_ui_label(Annotated[int, ctypes.c_uint32], c.Enum): pass
SMU_STATE_UI_LABEL_NONE = enum_smu_state_ui_label.define('SMU_STATE_UI_LABEL_NONE', 0)
SMU_STATE_UI_LABEL_BATTERY = enum_smu_state_ui_label.define('SMU_STATE_UI_LABEL_BATTERY', 1)
@@ -1187,7 +1187,7 @@ class struct_smu_table(c.Struct):
cpu_addr: Annotated[ctypes.c_void_p, 24]
bo: Annotated[c.POINTER[struct_amdgpu_bo], 32]
version: Annotated[Annotated[int, ctypes.c_uint32], 40]
class struct_amdgpu_bo(ctypes.Structure): pass
class struct_amdgpu_bo(c.Struct): SIZE = 0
class enum_smu_perf_level_designation(Annotated[int, ctypes.c_uint32], c.Enum): pass
PERF_LEVEL_ACTIVITY = enum_smu_perf_level_designation.define('PERF_LEVEL_ACTIVITY', 0)
PERF_LEVEL_POWER_CONTAINMENT = enum_smu_perf_level_designation.define('PERF_LEVEL_POWER_CONTAINMENT', 1)
+2 -2
View File
@@ -408,7 +408,7 @@ class AvfsDebugTableXcd_t(c.Struct):
class struct_smu_hw_power_state(c.Struct):
SIZE = 4
magic: Annotated[Annotated[int, ctypes.c_uint32], 0]
class struct_smu_power_state(ctypes.Structure): pass
class struct_smu_power_state(c.Struct): SIZE = 0
class enum_smu_state_ui_label(Annotated[int, ctypes.c_uint32], c.Enum): pass
SMU_STATE_UI_LABEL_NONE = enum_smu_state_ui_label.define('SMU_STATE_UI_LABEL_NONE', 0)
SMU_STATE_UI_LABEL_BATTERY = enum_smu_state_ui_label.define('SMU_STATE_UI_LABEL_BATTERY', 1)
@@ -576,7 +576,7 @@ class struct_smu_table(c.Struct):
cpu_addr: Annotated[ctypes.c_void_p, 24]
bo: Annotated[c.POINTER[struct_amdgpu_bo], 32]
version: Annotated[Annotated[int, ctypes.c_uint32], 40]
class struct_amdgpu_bo(ctypes.Structure): pass
class struct_amdgpu_bo(c.Struct): SIZE = 0
class enum_smu_perf_level_designation(Annotated[int, ctypes.c_uint32], c.Enum): pass
PERF_LEVEL_ACTIVITY = enum_smu_perf_level_designation.define('PERF_LEVEL_ACTIVITY', 0)
PERF_LEVEL_POWER_CONTAINMENT = enum_smu_perf_level_designation.define('PERF_LEVEL_POWER_CONTAINMENT', 1)
+2 -2
View File
@@ -474,7 +474,7 @@ class AvfsDebugTableXcd_t(c.Struct):
class struct_smu_hw_power_state(c.Struct):
SIZE = 4
magic: Annotated[Annotated[int, ctypes.c_uint32], 0]
class struct_smu_power_state(ctypes.Structure): pass
class struct_smu_power_state(c.Struct): SIZE = 0
class enum_smu_state_ui_label(Annotated[int, ctypes.c_uint32], c.Enum): pass
SMU_STATE_UI_LABEL_NONE = enum_smu_state_ui_label.define('SMU_STATE_UI_LABEL_NONE', 0)
SMU_STATE_UI_LABEL_BATTERY = enum_smu_state_ui_label.define('SMU_STATE_UI_LABEL_BATTERY', 1)
@@ -642,7 +642,7 @@ class struct_smu_table(c.Struct):
cpu_addr: Annotated[ctypes.c_void_p, 24]
bo: Annotated[c.POINTER[struct_amdgpu_bo], 32]
version: Annotated[Annotated[int, ctypes.c_uint32], 40]
class struct_amdgpu_bo(ctypes.Structure): pass
class struct_amdgpu_bo(c.Struct): SIZE = 0
class enum_smu_perf_level_designation(Annotated[int, ctypes.c_uint32], c.Enum): pass
PERF_LEVEL_ACTIVITY = enum_smu_perf_level_designation.define('PERF_LEVEL_ACTIVITY', 0)
PERF_LEVEL_POWER_CONTAINMENT = enum_smu_perf_level_designation.define('PERF_LEVEL_POWER_CONTAINMENT', 1)
+2 -2
View File
@@ -1308,7 +1308,7 @@ class DpmActivityMonitorCoeffIntExternal_t(c.Struct):
class struct_smu_hw_power_state(c.Struct):
SIZE = 4
magic: Annotated[Annotated[int, ctypes.c_uint32], 0]
class struct_smu_power_state(ctypes.Structure): pass
class struct_smu_power_state(c.Struct): SIZE = 0
class enum_smu_state_ui_label(Annotated[int, ctypes.c_uint32], c.Enum): pass
SMU_STATE_UI_LABEL_NONE = enum_smu_state_ui_label.define('SMU_STATE_UI_LABEL_NONE', 0)
SMU_STATE_UI_LABEL_BATTERY = enum_smu_state_ui_label.define('SMU_STATE_UI_LABEL_BATTERY', 1)
@@ -1476,7 +1476,7 @@ class struct_smu_table(c.Struct):
cpu_addr: Annotated[ctypes.c_void_p, 24]
bo: Annotated[c.POINTER[struct_amdgpu_bo], 32]
version: Annotated[Annotated[int, ctypes.c_uint32], 40]
class struct_amdgpu_bo(ctypes.Structure): pass
class struct_amdgpu_bo(c.Struct): SIZE = 0
class enum_smu_perf_level_designation(Annotated[int, ctypes.c_uint32], c.Enum): pass
PERF_LEVEL_ACTIVITY = enum_smu_perf_level_designation.define('PERF_LEVEL_ACTIVITY', 0)
PERF_LEVEL_POWER_CONTAINMENT = enum_smu_perf_level_designation.define('PERF_LEVEL_POWER_CONTAINMENT', 1)
+5 -5
View File
@@ -648,9 +648,9 @@ class struct_drm_amdgpu_userq_wait(c.Struct):
num_bo_write_handles: Annotated[Annotated[int, ctypes.c_uint32], 60]
out_fences: Annotated[Annotated[int, ctypes.c_uint64], 64]
__u16: TypeAlias = Annotated[int, ctypes.c_uint16]
class struct_drm_amdgpu_sem_in(ctypes.Structure): pass
class union_drm_amdgpu_sem_out(ctypes.Union): pass
class union_drm_amdgpu_sem(ctypes.Union): pass
class struct_drm_amdgpu_sem_in(c.Struct): SIZE = 0
class union_drm_amdgpu_sem_out(c.Struct): SIZE = 0
class union_drm_amdgpu_sem(c.Struct): SIZE = 0
@c.record
class struct_drm_amdgpu_vm_in(c.Struct):
SIZE = 8
@@ -1074,8 +1074,8 @@ class struct_drm_amdgpu_info_uq_metadata_gfx(c.Struct):
class struct_drm_amdgpu_info_uq_metadata(c.Struct):
SIZE = 16
gfx: Annotated[struct_drm_amdgpu_info_uq_metadata_gfx, 0]
class _anonstruct0(ctypes.Structure): pass
class struct_drm_amdgpu_virtual_range(ctypes.Structure): pass
class _anonstruct0(c.Struct): SIZE = 0
class struct_drm_amdgpu_virtual_range(c.Struct): SIZE = 0
@c.record
class struct_drm_amdgpu_capability(c.Struct):
SIZE = 8
+6 -6
View File
@@ -244,9 +244,9 @@ class struct_H265RawVUI(c.Struct):
log2_max_mv_length_horizontal: Annotated[uint8_t, 7732]
log2_max_mv_length_vertical: Annotated[uint8_t, 7733]
H265RawVUI: TypeAlias = struct_H265RawVUI
class struct_H265RawExtensionData(ctypes.Structure): pass
class struct_H265RawExtensionData(c.Struct): SIZE = 0
H265RawExtensionData: TypeAlias = struct_H265RawExtensionData
class struct_H265RawVPS(ctypes.Structure): pass
class struct_H265RawVPS(c.Struct): SIZE = 0
H265RawVPS: TypeAlias = struct_H265RawVPS
@c.record
class struct_H265RawSTRefPicSet(c.Struct):
@@ -274,9 +274,9 @@ class struct_H265RawScalingList(c.Struct):
int16_t: TypeAlias = Annotated[int, ctypes.c_int16]
int8_t: TypeAlias = Annotated[int, ctypes.c_byte]
H265RawScalingList: TypeAlias = struct_H265RawScalingList
class struct_H265RawSPS(ctypes.Structure): pass
class struct_H265RawSPS(c.Struct): SIZE = 0
H265RawSPS: TypeAlias = struct_H265RawSPS
class struct_H265RawPPS(ctypes.Structure): pass
class struct_H265RawPPS(c.Struct): SIZE = 0
H265RawPPS: TypeAlias = struct_H265RawPPS
@c.record
class struct_H265RawAUD(c.Struct):
@@ -356,7 +356,7 @@ class struct_H265RawSliceHeader(c.Struct):
slice_segment_header_extension_length: Annotated[uint16_t, 11512]
slice_segment_header_extension_data_byte: Annotated[c.Array[uint8_t, Literal[256]], 11514]
H265RawSliceHeader: TypeAlias = struct_H265RawSliceHeader
class struct_H265RawSlice(ctypes.Structure): pass
class struct_H265RawSlice(c.Struct): SIZE = 0
H265RawSlice: TypeAlias = struct_H265RawSlice
@c.record
class struct_H265RawSEIBufferingPeriod(c.Struct):
@@ -541,6 +541,6 @@ class struct_H265RawFiller(c.Struct):
nal_unit_header: Annotated[H265RawNALUnitHeader, 0]
filler_size: Annotated[uint32_t, 4]
H265RawFiller: TypeAlias = struct_H265RawFiller
class struct_CodedBitstreamH265Context(ctypes.Structure): pass
class struct_CodedBitstreamH265Context(c.Struct): SIZE = 0
CodedBitstreamH265Context: TypeAlias = struct_CodedBitstreamH265Context
c.init_records()
+8 -8
View File
@@ -26,10 +26,10 @@ kCFStringEncodingUTF32LE = _anonenum0.define('kCFStringEncodingUTF32LE', 4697623
CFTypeID: TypeAlias = Annotated[int, ctypes.c_uint64]
@dll.bind
def CFStringGetTypeID() -> CFTypeID: ...
class struct___CFAllocator(ctypes.Structure): pass
class struct___CFAllocator(c.Struct): SIZE = 0
CFAllocatorRef: TypeAlias = c.POINTER[struct___CFAllocator]
ConstStr255Param: TypeAlias = c.POINTER[Annotated[int, ctypes.c_ubyte]]
class struct___CFString(ctypes.Structure): pass
class struct___CFString(c.Struct): SIZE = 0
CFStringRef: TypeAlias = c.POINTER[struct___CFString]
@dll.bind
def CFStringCreateWithPascalString(alloc:CFAllocatorRef, pStr:ConstStr255Param, encoding:CFStringEncoding) -> CFStringRef: ...
@@ -60,13 +60,13 @@ class CFRange(c.Struct):
def CFStringCreateWithSubstring(alloc:CFAllocatorRef, str:CFStringRef, range:CFRange) -> CFStringRef: ...
@dll.bind
def CFStringCreateCopy(alloc:CFAllocatorRef, theString:CFStringRef) -> CFStringRef: ...
class struct___CFDictionary(ctypes.Structure): pass
class struct___CFDictionary(c.Struct): SIZE = 0
CFDictionaryRef: TypeAlias = c.POINTER[struct___CFDictionary]
@dll.bind
def CFStringCreateWithFormat(alloc:CFAllocatorRef, formatOptions:CFDictionaryRef, format:CFStringRef) -> CFStringRef: ...
@dll.bind
def CFStringCreateWithFormatAndArguments(alloc:CFAllocatorRef, formatOptions:CFDictionaryRef, format:CFStringRef, arguments:Annotated[int, ctypes.c_int32]) -> CFStringRef: ...
class struct___CFError(ctypes.Structure): pass
class struct___CFError(c.Struct): SIZE = 0
CFErrorRef: TypeAlias = c.POINTER[struct___CFError]
@dll.bind
def CFStringCreateStringWithValidatedFormat(alloc:CFAllocatorRef, formatOptions:CFDictionaryRef, validFormatSpecifiers:CFStringRef, format:CFStringRef, errorPtr:c.POINTER[CFErrorRef]) -> CFStringRef: ...
@@ -99,7 +99,7 @@ def CFStringGetCStringPtr(theString:CFStringRef, encoding:CFStringEncoding) -> c
def CFStringGetCharactersPtr(theString:CFStringRef) -> c.POINTER[UniChar]: ...
@dll.bind
def CFStringGetBytes(theString:CFStringRef, range:CFRange, encoding:CFStringEncoding, lossByte:UInt8, isExternalRepresentation:Boolean, buffer:c.POINTER[UInt8], maxBufLen:CFIndex, usedBufLen:c.POINTER[CFIndex]) -> CFIndex: ...
class struct___CFData(ctypes.Structure): pass
class struct___CFData(c.Struct): SIZE = 0
CFDataRef: TypeAlias = c.POINTER[struct___CFData]
@dll.bind
def CFStringCreateFromExternalRepresentation(alloc:CFAllocatorRef, data:CFDataRef, encoding:CFStringEncoding) -> CFStringRef: ...
@@ -131,7 +131,7 @@ kCFCompareDiacriticInsensitive = _anonenum1.define('kCFCompareDiacriticInsensiti
kCFCompareWidthInsensitive = _anonenum1.define('kCFCompareWidthInsensitive', 256)
kCFCompareForcedOrdering = _anonenum1.define('kCFCompareForcedOrdering', 512)
class struct___CFLocale(ctypes.Structure): pass
class struct___CFLocale(c.Struct): SIZE = 0
CFLocaleRef: TypeAlias = c.POINTER[struct___CFLocale]
CFComparisonResult: TypeAlias = Annotated[int, ctypes.c_int64]
@dll.bind
@@ -144,7 +144,7 @@ def CFStringCompare(theString1:CFStringRef, theString2:CFStringRef, compareOptio
def CFStringFindWithOptionsAndLocale(theString:CFStringRef, stringToFind:CFStringRef, rangeToSearch:CFRange, searchOptions:CFStringCompareFlags, locale:CFLocaleRef, result:c.POINTER[CFRange]) -> Boolean: ...
@dll.bind
def CFStringFindWithOptions(theString:CFStringRef, stringToFind:CFStringRef, rangeToSearch:CFRange, searchOptions:CFStringCompareFlags, result:c.POINTER[CFRange]) -> Boolean: ...
class struct___CFArray(ctypes.Structure): pass
class struct___CFArray(c.Struct): SIZE = 0
CFArrayRef: TypeAlias = c.POINTER[struct___CFArray]
@dll.bind
def CFStringCreateArrayWithFindResults(alloc:CFAllocatorRef, theString:CFStringRef, stringToFind:CFStringRef, rangeToSearch:CFRange, compareOptions:CFStringCompareFlags) -> CFArrayRef: ...
@@ -156,7 +156,7 @@ def CFStringHasPrefix(theString:CFStringRef, prefix:CFStringRef) -> Boolean: ...
def CFStringHasSuffix(theString:CFStringRef, suffix:CFStringRef) -> Boolean: ...
@dll.bind
def CFStringGetRangeOfComposedCharactersAtIndex(theString:CFStringRef, theIndex:CFIndex) -> CFRange: ...
class struct___CFCharacterSet(ctypes.Structure): pass
class struct___CFCharacterSet(c.Struct): SIZE = 0
CFCharacterSetRef: TypeAlias = c.POINTER[struct___CFCharacterSet]
@dll.bind
def CFStringFindCharacterFromSet(theString:CFStringRef, theSet:CFCharacterSetRef, rangeToSearch:CFRange, searchOptions:CFStringCompareFlags, result:c.POINTER[CFRange]) -> Boolean: ...
+20 -20
View File
@@ -11,47 +11,47 @@ CUdeviceptr_v2: TypeAlias = Annotated[int, ctypes.c_uint64]
CUdeviceptr: TypeAlias = Annotated[int, ctypes.c_uint64]
CUdevice_v1: TypeAlias = Annotated[int, ctypes.c_int32]
CUdevice: TypeAlias = Annotated[int, ctypes.c_int32]
class struct_CUctx_st(ctypes.Structure): pass
class struct_CUctx_st(c.Struct): SIZE = 0
CUcontext: TypeAlias = c.POINTER[struct_CUctx_st]
class struct_CUmod_st(ctypes.Structure): pass
class struct_CUmod_st(c.Struct): SIZE = 0
CUmodule: TypeAlias = c.POINTER[struct_CUmod_st]
class struct_CUfunc_st(ctypes.Structure): pass
class struct_CUfunc_st(c.Struct): SIZE = 0
CUfunction: TypeAlias = c.POINTER[struct_CUfunc_st]
class struct_CUlib_st(ctypes.Structure): pass
class struct_CUlib_st(c.Struct): SIZE = 0
CUlibrary: TypeAlias = c.POINTER[struct_CUlib_st]
class struct_CUkern_st(ctypes.Structure): pass
class struct_CUkern_st(c.Struct): SIZE = 0
CUkernel: TypeAlias = c.POINTER[struct_CUkern_st]
class struct_CUarray_st(ctypes.Structure): pass
class struct_CUarray_st(c.Struct): SIZE = 0
CUarray: TypeAlias = c.POINTER[struct_CUarray_st]
class struct_CUmipmappedArray_st(ctypes.Structure): pass
class struct_CUmipmappedArray_st(c.Struct): SIZE = 0
CUmipmappedArray: TypeAlias = c.POINTER[struct_CUmipmappedArray_st]
class struct_CUtexref_st(ctypes.Structure): pass
class struct_CUtexref_st(c.Struct): SIZE = 0
CUtexref: TypeAlias = c.POINTER[struct_CUtexref_st]
class struct_CUsurfref_st(ctypes.Structure): pass
class struct_CUsurfref_st(c.Struct): SIZE = 0
CUsurfref: TypeAlias = c.POINTER[struct_CUsurfref_st]
class struct_CUevent_st(ctypes.Structure): pass
class struct_CUevent_st(c.Struct): SIZE = 0
CUevent: TypeAlias = c.POINTER[struct_CUevent_st]
class struct_CUstream_st(ctypes.Structure): pass
class struct_CUstream_st(c.Struct): SIZE = 0
CUstream: TypeAlias = c.POINTER[struct_CUstream_st]
class struct_CUgraphicsResource_st(ctypes.Structure): pass
class struct_CUgraphicsResource_st(c.Struct): SIZE = 0
CUgraphicsResource: TypeAlias = c.POINTER[struct_CUgraphicsResource_st]
CUtexObject_v1: TypeAlias = Annotated[int, ctypes.c_uint64]
CUtexObject: TypeAlias = Annotated[int, ctypes.c_uint64]
CUsurfObject_v1: TypeAlias = Annotated[int, ctypes.c_uint64]
CUsurfObject: TypeAlias = Annotated[int, ctypes.c_uint64]
class struct_CUextMemory_st(ctypes.Structure): pass
class struct_CUextMemory_st(c.Struct): SIZE = 0
CUexternalMemory: TypeAlias = c.POINTER[struct_CUextMemory_st]
class struct_CUextSemaphore_st(ctypes.Structure): pass
class struct_CUextSemaphore_st(c.Struct): SIZE = 0
CUexternalSemaphore: TypeAlias = c.POINTER[struct_CUextSemaphore_st]
class struct_CUgraph_st(ctypes.Structure): pass
class struct_CUgraph_st(c.Struct): SIZE = 0
CUgraph: TypeAlias = c.POINTER[struct_CUgraph_st]
class struct_CUgraphNode_st(ctypes.Structure): pass
class struct_CUgraphNode_st(c.Struct): SIZE = 0
CUgraphNode: TypeAlias = c.POINTER[struct_CUgraphNode_st]
class struct_CUgraphExec_st(ctypes.Structure): pass
class struct_CUgraphExec_st(c.Struct): SIZE = 0
CUgraphExec: TypeAlias = c.POINTER[struct_CUgraphExec_st]
class struct_CUmemPoolHandle_st(ctypes.Structure): pass
class struct_CUmemPoolHandle_st(c.Struct): SIZE = 0
CUmemoryPool: TypeAlias = c.POINTER[struct_CUmemPoolHandle_st]
class struct_CUuserObject_st(ctypes.Structure): pass
class struct_CUuserObject_st(c.Struct): SIZE = 0
CUuserObject: TypeAlias = c.POINTER[struct_CUuserObject_st]
@c.record
class struct_CUuuid_st(c.Struct):
@@ -591,7 +591,7 @@ CU_JIT_INPUT_NVVM = enum_CUjitInputType_enum.define('CU_JIT_INPUT_NVVM', 5)
CU_JIT_NUM_INPUT_TYPES = enum_CUjitInputType_enum.define('CU_JIT_NUM_INPUT_TYPES', 6)
CUjitInputType: TypeAlias = enum_CUjitInputType_enum
class struct_CUlinkState_st(ctypes.Structure): pass
class struct_CUlinkState_st(c.Struct): SIZE = 0
CUlinkState: TypeAlias = c.POINTER[struct_CUlinkState_st]
class enum_CUgraphicsRegisterFlags_enum(Annotated[int, ctypes.c_uint32], c.Enum): pass
CU_GRAPHICS_REGISTER_FLAGS_NONE = enum_CUgraphicsRegisterFlags_enum.define('CU_GRAPHICS_REGISTER_FLAGS_NONE', 0)
+20 -20
View File
@@ -6,13 +6,13 @@ from tinygrad.runtime.support.c import _IO, _IOW, _IOR, _IOWR
from tinygrad.runtime.support import c
import os
dll = c.DLL('hip', os.getenv('ROCM_PATH', '/opt/rocm')+'/lib/libamdhip64.so')
class ihipModuleSymbol_t(ctypes.Structure): pass
class ihipModuleSymbol_t(c.Struct): SIZE = 0
hipFunction_t: TypeAlias = c.POINTER[ihipModuleSymbol_t]
uint32_t: TypeAlias = Annotated[int, ctypes.c_uint32]
size_t: TypeAlias = Annotated[int, ctypes.c_uint64]
class ihipStream_t(ctypes.Structure): pass
class ihipStream_t(c.Struct): SIZE = 0
hipStream_t: TypeAlias = c.POINTER[ihipStream_t]
class ihipEvent_t(ctypes.Structure): pass
class ihipEvent_t(c.Struct): SIZE = 0
hipEvent_t: TypeAlias = c.POINTER[ihipEvent_t]
class hipError_t(Annotated[int, ctypes.c_uint32], c.Enum): pass
hipSuccess = hipError_t.define('hipSuccess', 0)
@@ -123,13 +123,13 @@ HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID = hiprtcResult.define('HIPRTC_ERROR_NAME_
HIPRTC_ERROR_INTERNAL_ERROR = hiprtcResult.define('HIPRTC_ERROR_INTERNAL_ERROR', 11)
HIPRTC_ERROR_LINKING = hiprtcResult.define('HIPRTC_ERROR_LINKING', 100)
class ihiprtcLinkState(ctypes.Structure): pass
class ihiprtcLinkState(c.Struct): SIZE = 0
hiprtcLinkState: TypeAlias = c.POINTER[ihiprtcLinkState]
@dll.bind
def hiprtcGetErrorString(result:hiprtcResult) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
@dll.bind
def hiprtcVersion(major:c.POINTER[Annotated[int, ctypes.c_int32]], minor:c.POINTER[Annotated[int, ctypes.c_int32]]) -> hiprtcResult: ...
class _hiprtcProgram(ctypes.Structure): pass
class _hiprtcProgram(c.Struct): SIZE = 0
hiprtcProgram: TypeAlias = c.POINTER[_hiprtcProgram]
@dll.bind
def hiprtcAddNameExpression(prog:hiprtcProgram, name_expression:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> hiprtcResult: ...
@@ -512,7 +512,7 @@ hipGPUDirectRDMAWritesOrderingAllDevices = hipGPUDirectRDMAWritesOrdering.define
@dll.bind
def hip_init() -> hipError_t: ...
class ihipCtx_t(ctypes.Structure): pass
class ihipCtx_t(c.Struct): SIZE = 0
hipCtx_t: TypeAlias = c.POINTER[ihipCtx_t]
hipDevice_t: TypeAlias = Annotated[int, ctypes.c_int32]
class hipDeviceP2PAttr(Annotated[int, ctypes.c_uint32], c.Enum): pass
@@ -536,15 +536,15 @@ class hipIpcEventHandle_st(c.Struct):
SIZE = 64
reserved: Annotated[c.Array[Annotated[bytes, ctypes.c_char], Literal[64]], 0]
hipIpcEventHandle_t: TypeAlias = hipIpcEventHandle_st
class ihipModule_t(ctypes.Structure): pass
class ihipModule_t(c.Struct): SIZE = 0
hipModule_t: TypeAlias = c.POINTER[ihipModule_t]
class ihipLinkState_t(ctypes.Structure): pass
class ihipLinkState_t(c.Struct): SIZE = 0
hipLinkState_t: TypeAlias = c.POINTER[ihipLinkState_t]
class ihipLibrary_t(ctypes.Structure): pass
class ihipLibrary_t(c.Struct): SIZE = 0
hipLibrary_t: TypeAlias = c.POINTER[ihipLibrary_t]
class ihipKernel_t(ctypes.Structure): pass
class ihipKernel_t(c.Struct): SIZE = 0
hipKernel_t: TypeAlias = c.POINTER[ihipKernel_t]
class ihipMemPoolHandle_t(ctypes.Structure): pass
class ihipMemPoolHandle_t(c.Struct): SIZE = 0
hipMemPool_t: TypeAlias = c.POINTER[ihipMemPoolHandle_t]
@c.record
class hipFuncAttributes(c.Struct):
@@ -909,16 +909,16 @@ hipGraphicsRegisterFlagsWriteDiscard = hipGraphicsRegisterFlags.define('hipGraph
hipGraphicsRegisterFlagsSurfaceLoadStore = hipGraphicsRegisterFlags.define('hipGraphicsRegisterFlagsSurfaceLoadStore', 4)
hipGraphicsRegisterFlagsTextureGather = hipGraphicsRegisterFlags.define('hipGraphicsRegisterFlagsTextureGather', 8)
class _hipGraphicsResource(ctypes.Structure): pass
class _hipGraphicsResource(c.Struct): SIZE = 0
hipGraphicsResource: TypeAlias = _hipGraphicsResource
hipGraphicsResource_t: TypeAlias = c.POINTER[_hipGraphicsResource]
class ihipGraph(ctypes.Structure): pass
class ihipGraph(c.Struct): SIZE = 0
hipGraph_t: TypeAlias = c.POINTER[ihipGraph]
class hipGraphNode(ctypes.Structure): pass
class hipGraphNode(c.Struct): SIZE = 0
hipGraphNode_t: TypeAlias = c.POINTER[hipGraphNode]
class hipGraphExec(ctypes.Structure): pass
class hipGraphExec(c.Struct): SIZE = 0
hipGraphExec_t: TypeAlias = c.POINTER[hipGraphExec]
class hipUserObject(ctypes.Structure): pass
class hipUserObject(c.Struct): SIZE = 0
hipUserObject_t: TypeAlias = c.POINTER[hipUserObject]
class hipGraphNodeType(Annotated[int, ctypes.c_uint32], c.Enum): pass
hipGraphNodeTypeKernel = hipGraphNodeType.define('hipGraphNodeTypeKernel', 0)
@@ -1112,7 +1112,7 @@ class hipExternalSemaphoreWaitNodeParams(c.Struct):
extSemArray: Annotated[c.POINTER[hipExternalSemaphore_t], 0]
paramsArray: Annotated[c.POINTER[hipExternalSemaphoreWaitParams], 8]
numExtSems: Annotated[Annotated[int, ctypes.c_uint32], 16]
class ihipMemGenericAllocationHandle(ctypes.Structure): pass
class ihipMemGenericAllocationHandle(c.Struct): SIZE = 0
hipMemGenericAllocationHandle_t: TypeAlias = c.POINTER[ihipMemGenericAllocationHandle]
class hipMemAllocationGranularity_flags(Annotated[int, ctypes.c_uint32], c.Enum): pass
hipMemAllocationGranularityMinimum = hipMemAllocationGranularity_flags.define('hipMemAllocationGranularityMinimum', 0)
@@ -1178,7 +1178,7 @@ HIP_AD_FORMAT_SIGNED_INT32 = hipArray_Format.define('HIP_AD_FORMAT_SIGNED_INT32'
HIP_AD_FORMAT_HALF = hipArray_Format.define('HIP_AD_FORMAT_HALF', 16)
HIP_AD_FORMAT_FLOAT = hipArray_Format.define('HIP_AD_FORMAT_FLOAT', 32)
class hipArray(ctypes.Structure): pass
class hipArray(c.Struct): SIZE = 0
hipArray_t: TypeAlias = c.POINTER[hipArray]
@c.record
class hipArrayMapInfo_subresource(c.Struct):
@@ -2018,7 +2018,7 @@ hipAddressModeClamp = hipTextureAddressMode.define('hipAddressModeClamp', 1)
hipAddressModeMirror = hipTextureAddressMode.define('hipAddressModeMirror', 2)
hipAddressModeBorder = hipTextureAddressMode.define('hipAddressModeBorder', 3)
class __hip_texture(ctypes.Structure): pass
class __hip_texture(c.Struct): SIZE = 0
hipTextureObject_t: TypeAlias = c.POINTER[__hip_texture]
@dll.bind
def hipModuleGetTexRef(texRef:c.POINTER[c.POINTER[textureReference]], hmod:hipModule_t, name:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> hipError_t: ...
@@ -2660,7 +2660,7 @@ def hipGraphicsResourceGetMappedPointer(devPtr:c.POINTER[ctypes.c_void_p], size:
def hipGraphicsUnmapResources(count:Annotated[int, ctypes.c_int32], resources:c.POINTER[hipGraphicsResource_t], stream:hipStream_t) -> hipError_t: ...
@dll.bind
def hipGraphicsUnregisterResource(resource:hipGraphicsResource_t) -> hipError_t: ...
class __hip_surface(ctypes.Structure): pass
class __hip_surface(c.Struct): SIZE = 0
hipSurfaceObject_t: TypeAlias = c.POINTER[__hip_surface]
@dll.bind
def hipCreateSurfaceObject(pSurfObject:c.POINTER[hipSurfaceObject_t], pResDesc:c.POINTER[hipResourceDesc]) -> hipError_t: ...
+1 -1
View File
@@ -2105,7 +2105,7 @@ class struct_amd_runtime_loader_debug_info_s(c.Struct):
kernel_name: Annotated[c.POINTER[Annotated[bytes, ctypes.c_char]], 16]
owning_segment: Annotated[ctypes.c_void_p, 24]
amd_runtime_loader_debug_info_t: TypeAlias = struct_amd_runtime_loader_debug_info_s
class struct_BrigModuleHeader(ctypes.Structure): pass
class struct_BrigModuleHeader(c.Struct): SIZE = 0
BrigModule_t: TypeAlias = c.POINTER[struct_BrigModuleHeader]
class _anonenum1(Annotated[int, ctypes.c_uint32], c.Enum): pass
HSA_EXT_STATUS_ERROR_INVALID_PROGRAM = _anonenum1.define('HSA_EXT_STATUS_ERROR_INVALID_PROGRAM', 8192)
+2 -2
View File
@@ -208,7 +208,7 @@ class struct_ibv_device_attr(c.Struct):
phys_port_cnt: Annotated[uint8_t, 227]
uint64_t: TypeAlias = Annotated[int, ctypes.c_uint64]
uint16_t: TypeAlias = Annotated[int, ctypes.c_uint16]
class struct__compat_ibv_port_attr(ctypes.Structure): pass
class struct__compat_ibv_port_attr(c.Struct): SIZE = 0
@c.record
class struct_ibv_mw(c.Struct):
SIZE = 32
@@ -1693,7 +1693,7 @@ IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH = enum_ib_uverbs_advise_mr_advice.define('IB
IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE = enum_ib_uverbs_advise_mr_advice.define('IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE', 1)
IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_NO_FAULT = enum_ib_uverbs_advise_mr_advice.define('IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_NO_FAULT', 2)
class struct_verbs_ex_private(ctypes.Structure): pass
class struct_verbs_ex_private(c.Struct): SIZE = 0
@dll.bind
def ibv_get_device_list(num_devices:c.POINTER[Annotated[int, ctypes.c_int32]]) -> c.POINTER[c.POINTER[struct_ibv_device]]: ...
@dll.bind
+4 -4
View File
@@ -131,9 +131,9 @@ class struct_io_uring_cqe_iter(c.Struct):
shift: Annotated[Annotated[int, ctypes.c_uint32], 12]
head: Annotated[Annotated[int, ctypes.c_uint32], 16]
tail: Annotated[Annotated[int, ctypes.c_uint32], 20]
class struct_epoll_event(ctypes.Structure): pass
class struct_statx(ctypes.Structure): pass
class struct_futex_waitv(ctypes.Structure): pass
class struct_epoll_event(c.Struct): SIZE = 0
class struct_statx(c.Struct): SIZE = 0
class struct_futex_waitv(c.Struct): SIZE = 0
@c.record
class struct_io_uring_attr_pi(c.Struct):
SIZE = 32
@@ -411,7 +411,7 @@ class struct_io_uring_buf_ring(c.Struct):
tail: Annotated[Annotated[int, ctypes.c_uint16], 14]
__empty_bufs: Annotated[struct_io_uring_buf_ring___empty_bufs, 0]
bufs: Annotated[c.Array[struct_io_uring_buf, Literal[0]], 0]
class struct_io_uring_buf_ring___empty_bufs(ctypes.Structure): pass
class struct_io_uring_buf_ring___empty_bufs(c.Struct): SIZE = 0
class enum_io_uring_register_pbuf_ring_flags(Annotated[int, ctypes.c_uint32], c.Enum): pass
IOU_PBUF_RING_MMAP = enum_io_uring_register_pbuf_ring_flags.define('IOU_PBUF_RING_MMAP', 1)
IOU_PBUF_RING_INC = enum_io_uring_register_pbuf_ring_flags.define('IOU_PBUF_RING_INC', 2)
+6 -6
View File
@@ -5,7 +5,7 @@ from typing import Annotated, Literal, TypeAlias
from tinygrad.runtime.support.c import _IO, _IOW, _IOR, _IOWR
from tinygrad.runtime.support import c
dll = c.DLL('iokit', 'IOKit')
class struct_IONotificationPort(ctypes.Structure): pass
class struct_IONotificationPort(c.Struct): SIZE = 0
IONotificationPortRef: TypeAlias = c.POINTER[struct_IONotificationPort]
IOServiceMatchingCallback: TypeAlias = c.CFUNCTYPE[None, [ctypes.c_void_p, Annotated[int, ctypes.c_uint32]]]
IOServiceInterestCallback: TypeAlias = c.CFUNCTYPE[None, [ctypes.c_void_p, Annotated[int, ctypes.c_uint32], Annotated[int, ctypes.c_uint32], ctypes.c_void_p]]
@@ -23,7 +23,7 @@ def IOMasterPort(bootstrapPort:mach_port_t, mainPort:c.POINTER[mach_port_t]) ->
def IONotificationPortCreate(mainPort:mach_port_t) -> IONotificationPortRef: ...
@dll.bind
def IONotificationPortDestroy(notify:IONotificationPortRef) -> None: ...
class struct___CFRunLoopSource(ctypes.Structure): pass
class struct___CFRunLoopSource(c.Struct): SIZE = 0
CFRunLoopSourceRef: TypeAlias = c.POINTER[struct___CFRunLoopSource]
@dll.bind
def IONotificationPortGetRunLoopSource(notify:IONotificationPortRef) -> CFRunLoopSourceRef: ...
@@ -31,7 +31,7 @@ def IONotificationPortGetRunLoopSource(notify:IONotificationPortRef) -> CFRunLoo
def IONotificationPortGetMachPort(notify:IONotificationPortRef) -> mach_port_t: ...
@dll.bind
def IONotificationPortSetImportanceReceiver(notify:IONotificationPortRef) -> kern_return_t: ...
class struct_dispatch_queue_s(ctypes.Structure): pass
class struct_dispatch_queue_s(c.Struct): SIZE = 0
dispatch_queue_t: TypeAlias = c.POINTER[struct_dispatch_queue_s]
@dll.bind
def IONotificationPortSetDispatchQueue(notify:IONotificationPortRef, queue:dispatch_queue_t) -> None: ...
@@ -61,7 +61,7 @@ def IOObjectRetain(object:io_object_t) -> kern_return_t: ...
io_name_t: TypeAlias = c.Array[Annotated[bytes, ctypes.c_char], Literal[128]]
@dll.bind
def IOObjectGetClass(object:io_object_t, className:io_name_t) -> kern_return_t: ...
class struct___CFString(ctypes.Structure): pass
class struct___CFString(c.Struct): SIZE = 0
CFStringRef: TypeAlias = c.POINTER[struct___CFString]
@dll.bind
def IOObjectCopyClass(object:io_object_t) -> CFStringRef: ...
@@ -87,7 +87,7 @@ def IOIteratorNext(iterator:io_iterator_t) -> io_object_t: ...
def IOIteratorReset(iterator:io_iterator_t) -> None: ...
@dll.bind
def IOIteratorIsValid(iterator:io_iterator_t) -> boolean_t: ...
class struct___CFDictionary(ctypes.Structure): pass
class struct___CFDictionary(c.Struct): SIZE = 0
CFDictionaryRef: TypeAlias = c.POINTER[struct___CFDictionary]
io_service_t: TypeAlias = Annotated[int, ctypes.c_uint32]
@dll.bind
@@ -222,7 +222,7 @@ def IORegistryEntryCopyPath(entry:io_registry_entry_t, plane:io_name_t) -> CFStr
@dll.bind
def IORegistryEntryGetRegistryEntryID(entry:io_registry_entry_t, entryID:c.POINTER[uint64_t]) -> kern_return_t: ...
CFMutableDictionaryRef: TypeAlias = c.POINTER[struct___CFDictionary]
class struct___CFAllocator(ctypes.Structure): pass
class struct___CFAllocator(c.Struct): SIZE = 0
CFAllocatorRef: TypeAlias = c.POINTER[struct___CFAllocator]
@dll.bind
def IORegistryEntryCreateCFProperties(entry:io_registry_entry_t, properties:c.POINTER[CFMutableDictionaryRef], allocator:CFAllocatorRef, options:IOOptionBits) -> kern_return_t: ...
+1 -1
View File
@@ -73,7 +73,7 @@ class struct___locale_struct(c.Struct):
__ctype_tolower: Annotated[c.POINTER[Annotated[int, ctypes.c_int32]], 112]
__ctype_toupper: Annotated[c.POINTER[Annotated[int, ctypes.c_int32]], 120]
__names: Annotated[c.Array[c.POINTER[Annotated[bytes, ctypes.c_char]], Literal[13]], 128]
class struct___locale_data(ctypes.Structure): pass
class struct___locale_data(c.Struct): SIZE = 0
locale_t: TypeAlias = c.POINTER[struct___locale_struct]
@dll.bind
def strcoll_l(__s1:c.POINTER[Annotated[bytes, ctypes.c_char]], __s2:c.POINTER[Annotated[bytes, ctypes.c_char]], __l:locale_t) -> Annotated[int, ctypes.c_int32]: ...
+3 -3
View File
@@ -259,9 +259,9 @@ class struct_libusb_control_setup(c.Struct):
wValue: Annotated[uint16_t, 2]
wIndex: Annotated[uint16_t, 4]
wLength: Annotated[uint16_t, 6]
class struct_libusb_context(ctypes.Structure): pass
class struct_libusb_device(ctypes.Structure): pass
class struct_libusb_device_handle(ctypes.Structure): pass
class struct_libusb_context(c.Struct): SIZE = 0
class struct_libusb_device(c.Struct): SIZE = 0
class struct_libusb_device_handle(c.Struct): SIZE = 0
@c.record
class struct_libusb_version(c.Struct):
SIZE = 24
+66 -66
View File
@@ -57,12 +57,12 @@ LLVMAbortProcessAction = LLVMVerifierFailureAction.define('LLVMAbortProcessActio
LLVMPrintMessageAction = LLVMVerifierFailureAction.define('LLVMPrintMessageAction', 1)
LLVMReturnStatusAction = LLVMVerifierFailureAction.define('LLVMReturnStatusAction', 2)
class struct_LLVMOpaqueModule(ctypes.Structure): pass
class struct_LLVMOpaqueModule(c.Struct): SIZE = 0
LLVMModuleRef: TypeAlias = c.POINTER[struct_LLVMOpaqueModule]
LLVMBool: TypeAlias = Annotated[int, ctypes.c_int32]
@dll.bind
def LLVMVerifyModule(M:LLVMModuleRef, Action:LLVMVerifierFailureAction, OutMessage:c.POINTER[c.POINTER[Annotated[bytes, ctypes.c_char]]]) -> LLVMBool: ...
class struct_LLVMOpaqueValue(ctypes.Structure): pass
class struct_LLVMOpaqueValue(c.Struct): SIZE = 0
LLVMValueRef: TypeAlias = c.POINTER[struct_LLVMOpaqueValue]
@dll.bind
def LLVMVerifyFunction(Fn:LLVMValueRef, Action:LLVMVerifierFailureAction) -> LLVMBool: ...
@@ -70,13 +70,13 @@ def LLVMVerifyFunction(Fn:LLVMValueRef, Action:LLVMVerifierFailureAction) -> LLV
def LLVMViewFunctionCFG(Fn:LLVMValueRef) -> None: ...
@dll.bind
def LLVMViewFunctionCFGOnly(Fn:LLVMValueRef) -> None: ...
class struct_LLVMOpaqueMemoryBuffer(ctypes.Structure): pass
class struct_LLVMOpaqueMemoryBuffer(c.Struct): SIZE = 0
LLVMMemoryBufferRef: TypeAlias = c.POINTER[struct_LLVMOpaqueMemoryBuffer]
@dll.bind
def LLVMParseBitcode(MemBuf:LLVMMemoryBufferRef, OutModule:c.POINTER[LLVMModuleRef], OutMessage:c.POINTER[c.POINTER[Annotated[bytes, ctypes.c_char]]]) -> LLVMBool: ...
@dll.bind
def LLVMParseBitcode2(MemBuf:LLVMMemoryBufferRef, OutModule:c.POINTER[LLVMModuleRef]) -> LLVMBool: ...
class struct_LLVMOpaqueContext(ctypes.Structure): pass
class struct_LLVMOpaqueContext(c.Struct): SIZE = 0
LLVMContextRef: TypeAlias = c.POINTER[struct_LLVMOpaqueContext]
@dll.bind
def LLVMParseBitcodeInContext(ContextRef:LLVMContextRef, MemBuf:LLVMMemoryBufferRef, OutModule:c.POINTER[LLVMModuleRef], OutMessage:c.POINTER[c.POINTER[Annotated[bytes, ctypes.c_char]]]) -> LLVMBool: ...
@@ -105,7 +105,7 @@ LLVMLargestComdatSelectionKind = LLVMComdatSelectionKind.define('LLVMLargestComd
LLVMNoDeduplicateComdatSelectionKind = LLVMComdatSelectionKind.define('LLVMNoDeduplicateComdatSelectionKind', 3)
LLVMSameSizeComdatSelectionKind = LLVMComdatSelectionKind.define('LLVMSameSizeComdatSelectionKind', 4)
class struct_LLVMComdat(ctypes.Structure): pass
class struct_LLVMComdat(c.Struct): SIZE = 0
LLVMComdatRef: TypeAlias = c.POINTER[struct_LLVMComdat]
@dll.bind
def LLVMGetOrInsertComdat(M:LLVMModuleRef, Name:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> LLVMComdatRef: ...
@@ -448,7 +448,7 @@ def LLVMGetVersion(Major:c.POINTER[Annotated[int, ctypes.c_uint32]], Minor:c.POI
def LLVMCreateMessage(Message:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
@dll.bind
def LLVMDisposeMessage(Message:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> None: ...
class struct_LLVMOpaqueDiagnosticInfo(ctypes.Structure): pass
class struct_LLVMOpaqueDiagnosticInfo(c.Struct): SIZE = 0
LLVMDiagnosticHandler: TypeAlias = c.CFUNCTYPE[None, [c.POINTER[struct_LLVMOpaqueDiagnosticInfo], ctypes.c_void_p]]
LLVMYieldCallback: TypeAlias = c.CFUNCTYPE[None, [c.POINTER[struct_LLVMOpaqueContext], ctypes.c_void_p]]
@dll.bind
@@ -486,7 +486,7 @@ def LLVMGetEnumAttributeKindForName(Name:c.POINTER[Annotated[bytes, ctypes.c_cha
@dll.bind
def LLVMGetLastEnumAttributeKind() -> Annotated[int, ctypes.c_uint32]: ...
uint64_t: TypeAlias = Annotated[int, ctypes.c_uint64]
class struct_LLVMOpaqueAttributeRef(ctypes.Structure): pass
class struct_LLVMOpaqueAttributeRef(c.Struct): SIZE = 0
LLVMAttributeRef: TypeAlias = c.POINTER[struct_LLVMOpaqueAttributeRef]
@dll.bind
def LLVMCreateEnumAttribute(C:LLVMContextRef, KindID:Annotated[int, ctypes.c_uint32], Val:uint64_t) -> LLVMAttributeRef: ...
@@ -494,7 +494,7 @@ def LLVMCreateEnumAttribute(C:LLVMContextRef, KindID:Annotated[int, ctypes.c_uin
def LLVMGetEnumAttributeKind(A:LLVMAttributeRef) -> Annotated[int, ctypes.c_uint32]: ...
@dll.bind
def LLVMGetEnumAttributeValue(A:LLVMAttributeRef) -> uint64_t: ...
class struct_LLVMOpaqueType(ctypes.Structure): pass
class struct_LLVMOpaqueType(c.Struct): SIZE = 0
LLVMTypeRef: TypeAlias = c.POINTER[struct_LLVMOpaqueType]
@dll.bind
def LLVMCreateTypeAttribute(C:LLVMContextRef, KindID:Annotated[int, ctypes.c_uint32], type_ref:LLVMTypeRef) -> LLVMAttributeRef: ...
@@ -546,7 +546,7 @@ def LLVMSetDataLayout(M:LLVMModuleRef, DataLayoutStr:c.POINTER[Annotated[bytes,
def LLVMGetTarget(M:LLVMModuleRef) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
@dll.bind
def LLVMSetTarget(M:LLVMModuleRef, Triple:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> None: ...
class struct_LLVMOpaqueModuleFlagEntry(ctypes.Structure): pass
class struct_LLVMOpaqueModuleFlagEntry(c.Struct): SIZE = 0
LLVMModuleFlagEntry: TypeAlias = struct_LLVMOpaqueModuleFlagEntry
@dll.bind
def LLVMCopyModuleFlagsMetadata(M:LLVMModuleRef, Len:c.POINTER[size_t]) -> c.POINTER[LLVMModuleFlagEntry]: ...
@@ -556,7 +556,7 @@ def LLVMDisposeModuleFlagsMetadata(Entries:c.POINTER[LLVMModuleFlagEntry]) -> No
def LLVMModuleFlagEntriesGetFlagBehavior(Entries:c.POINTER[LLVMModuleFlagEntry], Index:Annotated[int, ctypes.c_uint32]) -> LLVMModuleFlagBehavior: ...
@dll.bind
def LLVMModuleFlagEntriesGetKey(Entries:c.POINTER[LLVMModuleFlagEntry], Index:Annotated[int, ctypes.c_uint32], Len:c.POINTER[size_t]) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
class struct_LLVMOpaqueMetadata(ctypes.Structure): pass
class struct_LLVMOpaqueMetadata(c.Struct): SIZE = 0
LLVMMetadataRef: TypeAlias = c.POINTER[struct_LLVMOpaqueMetadata]
@dll.bind
def LLVMModuleFlagEntriesGetMetadata(Entries:c.POINTER[LLVMModuleFlagEntry], Index:Annotated[int, ctypes.c_uint32]) -> LLVMMetadataRef: ...
@@ -596,7 +596,7 @@ def LLVMGetInlineAsmCanUnwind(InlineAsmVal:LLVMValueRef) -> LLVMBool: ...
def LLVMGetModuleContext(M:LLVMModuleRef) -> LLVMContextRef: ...
@dll.bind
def LLVMGetTypeByName(M:LLVMModuleRef, Name:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> LLVMTypeRef: ...
class struct_LLVMOpaqueNamedMDNode(ctypes.Structure): pass
class struct_LLVMOpaqueNamedMDNode(c.Struct): SIZE = 0
LLVMNamedMDNodeRef: TypeAlias = c.POINTER[struct_LLVMOpaqueNamedMDNode]
@dll.bind
def LLVMGetFirstNamedMetadata(M:LLVMModuleRef) -> LLVMNamedMDNodeRef: ...
@@ -820,7 +820,7 @@ def LLVMDumpValue(Val:LLVMValueRef) -> None: ...
def LLVMPrintValueToString(Val:LLVMValueRef) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
@dll.bind
def LLVMGetValueContext(Val:LLVMValueRef) -> LLVMContextRef: ...
class struct_LLVMOpaqueDbgRecord(ctypes.Structure): pass
class struct_LLVMOpaqueDbgRecord(c.Struct): SIZE = 0
LLVMDbgRecordRef: TypeAlias = c.POINTER[struct_LLVMOpaqueDbgRecord]
@dll.bind
def LLVMPrintDbgRecordToString(Record:LLVMDbgRecordRef) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
@@ -1020,7 +1020,7 @@ def LLVMIsAMDString(Val:LLVMValueRef) -> LLVMValueRef: ...
def LLVMGetValueName(Val:LLVMValueRef) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
@dll.bind
def LLVMSetValueName(Val:LLVMValueRef, Name:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> None: ...
class struct_LLVMOpaqueUse(ctypes.Structure): pass
class struct_LLVMOpaqueUse(c.Struct): SIZE = 0
LLVMUseRef: TypeAlias = c.POINTER[struct_LLVMOpaqueUse]
@dll.bind
def LLVMGetFirstUse(Val:LLVMValueRef) -> LLVMUseRef: ...
@@ -1159,7 +1159,7 @@ def LLVMConstExtractElement(VectorConstant:LLVMValueRef, IndexConstant:LLVMValue
def LLVMConstInsertElement(VectorConstant:LLVMValueRef, ElementValueConstant:LLVMValueRef, IndexConstant:LLVMValueRef) -> LLVMValueRef: ...
@dll.bind
def LLVMConstShuffleVector(VectorAConstant:LLVMValueRef, VectorBConstant:LLVMValueRef, MaskConstant:LLVMValueRef) -> LLVMValueRef: ...
class struct_LLVMOpaqueBasicBlock(ctypes.Structure): pass
class struct_LLVMOpaqueBasicBlock(c.Struct): SIZE = 0
LLVMBasicBlockRef: TypeAlias = c.POINTER[struct_LLVMOpaqueBasicBlock]
@dll.bind
def LLVMBlockAddress(F:LLVMValueRef, BB:LLVMBasicBlockRef) -> LLVMValueRef: ...
@@ -1209,7 +1209,7 @@ def LLVMGlobalSetMetadata(Global:LLVMValueRef, Kind:Annotated[int, ctypes.c_uint
def LLVMGlobalEraseMetadata(Global:LLVMValueRef, Kind:Annotated[int, ctypes.c_uint32]) -> None: ...
@dll.bind
def LLVMGlobalClearMetadata(Global:LLVMValueRef) -> None: ...
class struct_LLVMOpaqueValueMetadataEntry(ctypes.Structure): pass
class struct_LLVMOpaqueValueMetadataEntry(c.Struct): SIZE = 0
LLVMValueMetadataEntry: TypeAlias = struct_LLVMOpaqueValueMetadataEntry
@dll.bind
def LLVMGlobalCopyAllMetadata(Value:LLVMValueRef, NumEntries:c.POINTER[size_t]) -> c.POINTER[LLVMValueMetadataEntry]: ...
@@ -1395,7 +1395,7 @@ def LLVMMDString(Str:c.POINTER[Annotated[bytes, ctypes.c_char]], SLen:Annotated[
def LLVMMDNodeInContext(C:LLVMContextRef, Vals:c.POINTER[LLVMValueRef], Count:Annotated[int, ctypes.c_uint32]) -> LLVMValueRef: ...
@dll.bind
def LLVMMDNode(Vals:c.POINTER[LLVMValueRef], Count:Annotated[int, ctypes.c_uint32]) -> LLVMValueRef: ...
class struct_LLVMOpaqueOperandBundle(ctypes.Structure): pass
class struct_LLVMOpaqueOperandBundle(c.Struct): SIZE = 0
LLVMOperandBundleRef: TypeAlias = c.POINTER[struct_LLVMOpaqueOperandBundle]
@dll.bind
def LLVMCreateOperandBundle(Tag:c.POINTER[Annotated[bytes, ctypes.c_char]], TagLen:size_t, Args:c.POINTER[LLVMValueRef], NumArgs:Annotated[int, ctypes.c_uint32]) -> LLVMOperandBundleRef: ...
@@ -1433,7 +1433,7 @@ def LLVMGetNextBasicBlock(BB:LLVMBasicBlockRef) -> LLVMBasicBlockRef: ...
def LLVMGetPreviousBasicBlock(BB:LLVMBasicBlockRef) -> LLVMBasicBlockRef: ...
@dll.bind
def LLVMGetEntryBasicBlock(Fn:LLVMValueRef) -> LLVMBasicBlockRef: ...
class struct_LLVMOpaqueBuilder(ctypes.Structure): pass
class struct_LLVMOpaqueBuilder(c.Struct): SIZE = 0
LLVMBuilderRef: TypeAlias = c.POINTER[struct_LLVMOpaqueBuilder]
@dll.bind
def LLVMInsertExistingBasicBlockAfterInsertBlock(Builder:LLVMBuilderRef, BB:LLVMBasicBlockRef) -> None: ...
@@ -1945,7 +1945,7 @@ def LLVMSetCmpXchgSuccessOrdering(CmpXchgInst:LLVMValueRef, Ordering:LLVMAtomicO
def LLVMGetCmpXchgFailureOrdering(CmpXchgInst:LLVMValueRef) -> LLVMAtomicOrdering: ...
@dll.bind
def LLVMSetCmpXchgFailureOrdering(CmpXchgInst:LLVMValueRef, Ordering:LLVMAtomicOrdering) -> None: ...
class struct_LLVMOpaqueModuleProvider(ctypes.Structure): pass
class struct_LLVMOpaqueModuleProvider(c.Struct): SIZE = 0
LLVMModuleProviderRef: TypeAlias = c.POINTER[struct_LLVMOpaqueModuleProvider]
@dll.bind
def LLVMCreateModuleProviderForExistingModule(M:LLVMModuleRef) -> LLVMModuleProviderRef: ...
@@ -1965,7 +1965,7 @@ def LLVMGetBufferStart(MemBuf:LLVMMemoryBufferRef) -> c.POINTER[Annotated[bytes,
def LLVMGetBufferSize(MemBuf:LLVMMemoryBufferRef) -> size_t: ...
@dll.bind
def LLVMDisposeMemoryBuffer(MemBuf:LLVMMemoryBufferRef) -> None: ...
class struct_LLVMOpaquePassManager(ctypes.Structure): pass
class struct_LLVMOpaquePassManager(c.Struct): SIZE = 0
LLVMPassManagerRef: TypeAlias = c.POINTER[struct_LLVMOpaquePassManager]
@dll.bind
def LLVMCreatePassManager() -> LLVMPassManagerRef: ...
@@ -2149,7 +2149,7 @@ def LLVMDebugMetadataVersion() -> Annotated[int, ctypes.c_uint32]: ...
def LLVMGetModuleDebugMetadataVersion(Module:LLVMModuleRef) -> Annotated[int, ctypes.c_uint32]: ...
@dll.bind
def LLVMStripModuleDebugInfo(Module:LLVMModuleRef) -> LLVMBool: ...
class struct_LLVMOpaqueDIBuilder(ctypes.Structure): pass
class struct_LLVMOpaqueDIBuilder(c.Struct): SIZE = 0
LLVMDIBuilderRef: TypeAlias = c.POINTER[struct_LLVMOpaqueDIBuilder]
@dll.bind
def LLVMCreateDIBuilderDisallowUnresolved(M:LLVMModuleRef) -> LLVMDIBuilderRef: ...
@@ -2362,7 +2362,7 @@ class struct_LLVMOpInfo1(c.Struct):
SubtractSymbol: Annotated[struct_LLVMOpInfoSymbol1, 24]
Value: Annotated[uint64_t, 48]
VariantKind: Annotated[uint64_t, 56]
class struct_LLVMOpaqueError(ctypes.Structure): pass
class struct_LLVMOpaqueError(c.Struct): SIZE = 0
LLVMErrorRef: TypeAlias = c.POINTER[struct_LLVMOpaqueError]
LLVMErrorTypeId: TypeAlias = ctypes.c_void_p
@dll.bind
@@ -2633,7 +2633,7 @@ def LLVMInitializeXCoreDisassembler() -> None: ...
def LLVMInitializeM68kDisassembler() -> None: ...
@dll.bind
def LLVMInitializeXtensaDisassembler() -> None: ...
class struct_LLVMOpaqueTargetData(ctypes.Structure): pass
class struct_LLVMOpaqueTargetData(c.Struct): SIZE = 0
LLVMTargetDataRef: TypeAlias = c.POINTER[struct_LLVMOpaqueTargetData]
@dll.bind
def LLVMGetModuleDataLayout(M:LLVMModuleRef) -> LLVMTargetDataRef: ...
@@ -2643,7 +2643,7 @@ def LLVMSetModuleDataLayout(M:LLVMModuleRef, DL:LLVMTargetDataRef) -> None: ...
def LLVMCreateTargetData(StringRep:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> LLVMTargetDataRef: ...
@dll.bind
def LLVMDisposeTargetData(TD:LLVMTargetDataRef) -> None: ...
class struct_LLVMOpaqueTargetLibraryInfotData(ctypes.Structure): pass
class struct_LLVMOpaqueTargetLibraryInfotData(c.Struct): SIZE = 0
LLVMTargetLibraryInfoRef: TypeAlias = c.POINTER[struct_LLVMOpaqueTargetLibraryInfotData]
@dll.bind
def LLVMAddTargetLibraryInfo(TLI:LLVMTargetLibraryInfoRef, PM:LLVMPassManagerRef) -> None: ...
@@ -2685,7 +2685,7 @@ def LLVMPreferredAlignmentOfGlobal(TD:LLVMTargetDataRef, GlobalVar:LLVMValueRef)
def LLVMElementAtOffset(TD:LLVMTargetDataRef, StructTy:LLVMTypeRef, Offset:Annotated[int, ctypes.c_uint64]) -> Annotated[int, ctypes.c_uint32]: ...
@dll.bind
def LLVMOffsetOfElement(TD:LLVMTargetDataRef, StructTy:LLVMTypeRef, Element:Annotated[int, ctypes.c_uint32]) -> Annotated[int, ctypes.c_uint64]: ...
class struct_LLVMTarget(ctypes.Structure): pass
class struct_LLVMTarget(c.Struct): SIZE = 0
LLVMTargetRef: TypeAlias = c.POINTER[struct_LLVMTarget]
@dll.bind
def LLVMGetFirstTarget() -> LLVMTargetRef: ...
@@ -2705,7 +2705,7 @@ def LLVMTargetHasJIT(T:LLVMTargetRef) -> LLVMBool: ...
def LLVMTargetHasTargetMachine(T:LLVMTargetRef) -> LLVMBool: ...
@dll.bind
def LLVMTargetHasAsmBackend(T:LLVMTargetRef) -> LLVMBool: ...
class struct_LLVMOpaqueTargetMachineOptions(ctypes.Structure): pass
class struct_LLVMOpaqueTargetMachineOptions(c.Struct): SIZE = 0
LLVMTargetMachineOptionsRef: TypeAlias = c.POINTER[struct_LLVMOpaqueTargetMachineOptions]
@dll.bind
def LLVMCreateTargetMachineOptions() -> LLVMTargetMachineOptionsRef: ...
@@ -2747,7 +2747,7 @@ LLVMCodeModelLarge = LLVMCodeModel.define('LLVMCodeModelLarge', 6)
@dll.bind
def LLVMTargetMachineOptionsSetCodeModel(Options:LLVMTargetMachineOptionsRef, CodeModel:LLVMCodeModel) -> None: ...
class struct_LLVMOpaqueTargetMachine(ctypes.Structure): pass
class struct_LLVMOpaqueTargetMachine(c.Struct): SIZE = 0
LLVMTargetMachineRef: TypeAlias = c.POINTER[struct_LLVMOpaqueTargetMachine]
@dll.bind
def LLVMCreateTargetMachineWithOptions(T:LLVMTargetRef, Triple:c.POINTER[Annotated[bytes, ctypes.c_char]], Options:LLVMTargetMachineOptionsRef) -> LLVMTargetMachineRef: ...
@@ -2802,11 +2802,11 @@ def LLVMAddAnalysisPasses(T:LLVMTargetMachineRef, PM:LLVMPassManagerRef) -> None
def LLVMLinkInMCJIT() -> None: ...
@dll.bind
def LLVMLinkInInterpreter() -> None: ...
class struct_LLVMOpaqueGenericValue(ctypes.Structure): pass
class struct_LLVMOpaqueGenericValue(c.Struct): SIZE = 0
LLVMGenericValueRef: TypeAlias = c.POINTER[struct_LLVMOpaqueGenericValue]
class struct_LLVMOpaqueExecutionEngine(ctypes.Structure): pass
class struct_LLVMOpaqueExecutionEngine(c.Struct): SIZE = 0
LLVMExecutionEngineRef: TypeAlias = c.POINTER[struct_LLVMOpaqueExecutionEngine]
class struct_LLVMOpaqueMCJITMemoryManager(ctypes.Structure): pass
class struct_LLVMOpaqueMCJITMemoryManager(c.Struct): SIZE = 0
LLVMMCJITMemoryManagerRef: TypeAlias = c.POINTER[struct_LLVMOpaqueMCJITMemoryManager]
@c.record
class struct_LLVMMCJITCompilerOptions(c.Struct):
@@ -2884,7 +2884,7 @@ LLVMMemoryManagerDestroyCallback: TypeAlias = c.CFUNCTYPE[None, [ctypes.c_void_p
def LLVMCreateSimpleMCJITMemoryManager(Opaque:ctypes.c_void_p, AllocateCodeSection:LLVMMemoryManagerAllocateCodeSectionCallback, AllocateDataSection:LLVMMemoryManagerAllocateDataSectionCallback, FinalizeMemory:LLVMMemoryManagerFinalizeMemoryCallback, Destroy:LLVMMemoryManagerDestroyCallback) -> LLVMMCJITMemoryManagerRef: ...
@dll.bind
def LLVMDisposeMCJITMemoryManager(MM:LLVMMCJITMemoryManagerRef) -> None: ...
class struct_LLVMOpaqueJITEventListener(ctypes.Structure): pass
class struct_LLVMOpaqueJITEventListener(c.Struct): SIZE = 0
LLVMJITEventListenerRef: TypeAlias = c.POINTER[struct_LLVMOpaqueJITEventListener]
@dll.bind
def LLVMCreateGDBRegistrationListener() -> LLVMJITEventListenerRef: ...
@@ -2896,18 +2896,18 @@ def LLVMCreateOProfileJITEventListener() -> LLVMJITEventListenerRef: ...
def LLVMCreatePerfJITEventListener() -> LLVMJITEventListenerRef: ...
@dll.bind
def LLVMParseIRInContext(ContextRef:LLVMContextRef, MemBuf:LLVMMemoryBufferRef, OutM:c.POINTER[LLVMModuleRef], OutMessage:c.POINTER[c.POINTER[Annotated[bytes, ctypes.c_char]]]) -> LLVMBool: ...
class struct_LLVMOrcOpaqueExecutionSession(ctypes.Structure): pass
class struct_LLVMOrcOpaqueExecutionSession(c.Struct): SIZE = 0
LLVMOrcExecutionSessionRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueExecutionSession]
LLVMOrcErrorReporterFunction: TypeAlias = c.CFUNCTYPE[None, [ctypes.c_void_p, c.POINTER[struct_LLVMOpaqueError]]]
@dll.bind
def LLVMOrcExecutionSessionSetErrorReporter(ES:LLVMOrcExecutionSessionRef, ReportError:LLVMOrcErrorReporterFunction, Ctx:ctypes.c_void_p) -> None: ...
class struct_LLVMOrcOpaqueSymbolStringPool(ctypes.Structure): pass
class struct_LLVMOrcOpaqueSymbolStringPool(c.Struct): SIZE = 0
LLVMOrcSymbolStringPoolRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueSymbolStringPool]
@dll.bind
def LLVMOrcExecutionSessionGetSymbolStringPool(ES:LLVMOrcExecutionSessionRef) -> LLVMOrcSymbolStringPoolRef: ...
@dll.bind
def LLVMOrcSymbolStringPoolClearDeadEntries(SSP:LLVMOrcSymbolStringPoolRef) -> None: ...
class struct_LLVMOrcOpaqueSymbolStringPoolEntry(ctypes.Structure): pass
class struct_LLVMOrcOpaqueSymbolStringPoolEntry(c.Struct): SIZE = 0
LLVMOrcSymbolStringPoolEntryRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueSymbolStringPoolEntry]
@dll.bind
def LLVMOrcExecutionSessionIntern(ES:LLVMOrcExecutionSessionRef, Name:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> LLVMOrcSymbolStringPoolEntryRef: ...
@@ -2920,7 +2920,7 @@ class LLVMOrcCJITDylibSearchOrderElement(c.Struct):
SIZE = 16
JD: Annotated[LLVMOrcJITDylibRef, 0]
JDLookupFlags: Annotated[LLVMOrcJITDylibLookupFlags, 8]
class struct_LLVMOrcOpaqueJITDylib(ctypes.Structure): pass
class struct_LLVMOrcOpaqueJITDylib(c.Struct): SIZE = 0
LLVMOrcJITDylibRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueJITDylib]
class LLVMOrcJITDylibLookupFlags(Annotated[int, ctypes.c_uint32], c.Enum): pass
LLVMOrcJITDylibLookupFlagsMatchExportedSymbolsOnly = LLVMOrcJITDylibLookupFlags.define('LLVMOrcJITDylibLookupFlagsMatchExportedSymbolsOnly', 0)
@@ -2962,7 +2962,7 @@ def LLVMOrcRetainSymbolStringPoolEntry(S:LLVMOrcSymbolStringPoolEntryRef) -> Non
def LLVMOrcReleaseSymbolStringPoolEntry(S:LLVMOrcSymbolStringPoolEntryRef) -> None: ...
@dll.bind
def LLVMOrcSymbolStringPoolEntryStr(S:LLVMOrcSymbolStringPoolEntryRef) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
class struct_LLVMOrcOpaqueResourceTracker(ctypes.Structure): pass
class struct_LLVMOrcOpaqueResourceTracker(c.Struct): SIZE = 0
LLVMOrcResourceTrackerRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueResourceTracker]
@dll.bind
def LLVMOrcReleaseResourceTracker(RT:LLVMOrcResourceTrackerRef) -> None: ...
@@ -2970,11 +2970,11 @@ def LLVMOrcReleaseResourceTracker(RT:LLVMOrcResourceTrackerRef) -> None: ...
def LLVMOrcResourceTrackerTransferTo(SrcRT:LLVMOrcResourceTrackerRef, DstRT:LLVMOrcResourceTrackerRef) -> None: ...
@dll.bind
def LLVMOrcResourceTrackerRemove(RT:LLVMOrcResourceTrackerRef) -> LLVMErrorRef: ...
class struct_LLVMOrcOpaqueDefinitionGenerator(ctypes.Structure): pass
class struct_LLVMOrcOpaqueDefinitionGenerator(c.Struct): SIZE = 0
LLVMOrcDefinitionGeneratorRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueDefinitionGenerator]
@dll.bind
def LLVMOrcDisposeDefinitionGenerator(DG:LLVMOrcDefinitionGeneratorRef) -> None: ...
class struct_LLVMOrcOpaqueMaterializationUnit(ctypes.Structure): pass
class struct_LLVMOrcOpaqueMaterializationUnit(c.Struct): SIZE = 0
LLVMOrcMaterializationUnitRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueMaterializationUnit]
@dll.bind
def LLVMOrcDisposeMaterializationUnit(MU:LLVMOrcMaterializationUnitRef) -> None: ...
@@ -2984,7 +2984,7 @@ class LLVMOrcCSymbolFlagsMapPair(c.Struct):
Name: Annotated[LLVMOrcSymbolStringPoolEntryRef, 0]
Flags: Annotated[LLVMJITSymbolFlags, 8]
LLVMOrcCSymbolFlagsMapPairs: TypeAlias = c.POINTER[LLVMOrcCSymbolFlagsMapPair]
class struct_LLVMOrcOpaqueMaterializationResponsibility(ctypes.Structure): pass
class struct_LLVMOrcOpaqueMaterializationResponsibility(c.Struct): SIZE = 0
LLVMOrcMaterializationUnitMaterializeFunction: TypeAlias = c.CFUNCTYPE[None, [ctypes.c_void_p, c.POINTER[struct_LLVMOrcOpaqueMaterializationResponsibility]]]
LLVMOrcMaterializationUnitDiscardFunction: TypeAlias = c.CFUNCTYPE[None, [ctypes.c_void_p, c.POINTER[struct_LLVMOrcOpaqueJITDylib], c.POINTER[struct_LLVMOrcOpaqueSymbolStringPoolEntry]]]
LLVMOrcMaterializationUnitDestroyFunction: TypeAlias = c.CFUNCTYPE[None, [ctypes.c_void_p]]
@@ -2993,9 +2993,9 @@ def LLVMOrcCreateCustomMaterializationUnit(Name:c.POINTER[Annotated[bytes, ctype
LLVMOrcCSymbolMapPairs: TypeAlias = c.POINTER[LLVMOrcCSymbolMapPair]
@dll.bind
def LLVMOrcAbsoluteSymbols(Syms:LLVMOrcCSymbolMapPairs, NumPairs:size_t) -> LLVMOrcMaterializationUnitRef: ...
class struct_LLVMOrcOpaqueLazyCallThroughManager(ctypes.Structure): pass
class struct_LLVMOrcOpaqueLazyCallThroughManager(c.Struct): SIZE = 0
LLVMOrcLazyCallThroughManagerRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueLazyCallThroughManager]
class struct_LLVMOrcOpaqueIndirectStubsManager(ctypes.Structure): pass
class struct_LLVMOrcOpaqueIndirectStubsManager(c.Struct): SIZE = 0
LLVMOrcIndirectStubsManagerRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueIndirectStubsManager]
@c.record
class LLVMOrcCSymbolAliasMapPair(c.Struct):
@@ -3072,7 +3072,7 @@ def LLVMOrcJITDylibDefine(JD:LLVMOrcJITDylibRef, MU:LLVMOrcMaterializationUnitRe
def LLVMOrcJITDylibClear(JD:LLVMOrcJITDylibRef) -> LLVMErrorRef: ...
@dll.bind
def LLVMOrcJITDylibAddGenerator(JD:LLVMOrcJITDylibRef, DG:LLVMOrcDefinitionGeneratorRef) -> None: ...
class struct_LLVMOrcOpaqueLookupState(ctypes.Structure): pass
class struct_LLVMOrcOpaqueLookupState(c.Struct): SIZE = 0
LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction: TypeAlias = c.CFUNCTYPE[c.POINTER[struct_LLVMOpaqueError], [c.POINTER[struct_LLVMOrcOpaqueDefinitionGenerator], ctypes.c_void_p, c.POINTER[c.POINTER[struct_LLVMOrcOpaqueLookupState]], LLVMOrcLookupKind, c.POINTER[struct_LLVMOrcOpaqueJITDylib], LLVMOrcJITDylibLookupFlags, c.POINTER[LLVMOrcCLookupSetElement], Annotated[int, ctypes.c_uint64]]]
LLVMOrcDisposeCAPIDefinitionGeneratorFunction: TypeAlias = c.CFUNCTYPE[None, [ctypes.c_void_p]]
@dll.bind
@@ -3085,11 +3085,11 @@ LLVMOrcSymbolPredicate: TypeAlias = c.CFUNCTYPE[Annotated[int, ctypes.c_int32],
def LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(Result:c.POINTER[LLVMOrcDefinitionGeneratorRef], GlobalPrefx:Annotated[bytes, ctypes.c_char], Filter:LLVMOrcSymbolPredicate, FilterCtx:ctypes.c_void_p) -> LLVMErrorRef: ...
@dll.bind
def LLVMOrcCreateDynamicLibrarySearchGeneratorForPath(Result:c.POINTER[LLVMOrcDefinitionGeneratorRef], FileName:c.POINTER[Annotated[bytes, ctypes.c_char]], GlobalPrefix:Annotated[bytes, ctypes.c_char], Filter:LLVMOrcSymbolPredicate, FilterCtx:ctypes.c_void_p) -> LLVMErrorRef: ...
class struct_LLVMOrcOpaqueObjectLayer(ctypes.Structure): pass
class struct_LLVMOrcOpaqueObjectLayer(c.Struct): SIZE = 0
LLVMOrcObjectLayerRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueObjectLayer]
@dll.bind
def LLVMOrcCreateStaticLibrarySearchGeneratorForPath(Result:c.POINTER[LLVMOrcDefinitionGeneratorRef], ObjLayer:LLVMOrcObjectLayerRef, FileName:c.POINTER[Annotated[bytes, ctypes.c_char]], TargetTriple:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> LLVMErrorRef: ...
class struct_LLVMOrcOpaqueThreadSafeContext(ctypes.Structure): pass
class struct_LLVMOrcOpaqueThreadSafeContext(c.Struct): SIZE = 0
LLVMOrcThreadSafeContextRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueThreadSafeContext]
@dll.bind
def LLVMOrcCreateNewThreadSafeContext() -> LLVMOrcThreadSafeContextRef: ...
@@ -3097,7 +3097,7 @@ def LLVMOrcCreateNewThreadSafeContext() -> LLVMOrcThreadSafeContextRef: ...
def LLVMOrcThreadSafeContextGetContext(TSCtx:LLVMOrcThreadSafeContextRef) -> LLVMContextRef: ...
@dll.bind
def LLVMOrcDisposeThreadSafeContext(TSCtx:LLVMOrcThreadSafeContextRef) -> None: ...
class struct_LLVMOrcOpaqueThreadSafeModule(ctypes.Structure): pass
class struct_LLVMOrcOpaqueThreadSafeModule(c.Struct): SIZE = 0
LLVMOrcThreadSafeModuleRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueThreadSafeModule]
@dll.bind
def LLVMOrcCreateNewThreadSafeModule(M:LLVMModuleRef, TSCtx:LLVMOrcThreadSafeContextRef) -> LLVMOrcThreadSafeModuleRef: ...
@@ -3106,7 +3106,7 @@ def LLVMOrcDisposeThreadSafeModule(TSM:LLVMOrcThreadSafeModuleRef) -> None: ...
LLVMOrcGenericIRModuleOperationFunction: TypeAlias = c.CFUNCTYPE[c.POINTER[struct_LLVMOpaqueError], [ctypes.c_void_p, c.POINTER[struct_LLVMOpaqueModule]]]
@dll.bind
def LLVMOrcThreadSafeModuleWithModuleDo(TSM:LLVMOrcThreadSafeModuleRef, F:LLVMOrcGenericIRModuleOperationFunction, Ctx:ctypes.c_void_p) -> LLVMErrorRef: ...
class struct_LLVMOrcOpaqueJITTargetMachineBuilder(ctypes.Structure): pass
class struct_LLVMOrcOpaqueJITTargetMachineBuilder(c.Struct): SIZE = 0
LLVMOrcJITTargetMachineBuilderRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueJITTargetMachineBuilder]
@dll.bind
def LLVMOrcJITTargetMachineBuilderDetectHost(Result:c.POINTER[LLVMOrcJITTargetMachineBuilderRef]) -> LLVMErrorRef: ...
@@ -3126,14 +3126,14 @@ def LLVMOrcObjectLayerAddObjectFileWithRT(ObjLayer:LLVMOrcObjectLayerRef, RT:LLV
def LLVMOrcObjectLayerEmit(ObjLayer:LLVMOrcObjectLayerRef, R:LLVMOrcMaterializationResponsibilityRef, ObjBuffer:LLVMMemoryBufferRef) -> None: ...
@dll.bind
def LLVMOrcDisposeObjectLayer(ObjLayer:LLVMOrcObjectLayerRef) -> None: ...
class struct_LLVMOrcOpaqueIRTransformLayer(ctypes.Structure): pass
class struct_LLVMOrcOpaqueIRTransformLayer(c.Struct): SIZE = 0
LLVMOrcIRTransformLayerRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueIRTransformLayer]
@dll.bind
def LLVMOrcIRTransformLayerEmit(IRTransformLayer:LLVMOrcIRTransformLayerRef, MR:LLVMOrcMaterializationResponsibilityRef, TSM:LLVMOrcThreadSafeModuleRef) -> None: ...
LLVMOrcIRTransformLayerTransformFunction: TypeAlias = c.CFUNCTYPE[c.POINTER[struct_LLVMOpaqueError], [ctypes.c_void_p, c.POINTER[c.POINTER[struct_LLVMOrcOpaqueThreadSafeModule]], c.POINTER[struct_LLVMOrcOpaqueMaterializationResponsibility]]]
@dll.bind
def LLVMOrcIRTransformLayerSetTransform(IRTransformLayer:LLVMOrcIRTransformLayerRef, TransformFunction:LLVMOrcIRTransformLayerTransformFunction, Ctx:ctypes.c_void_p) -> None: ...
class struct_LLVMOrcOpaqueObjectTransformLayer(ctypes.Structure): pass
class struct_LLVMOrcOpaqueObjectTransformLayer(c.Struct): SIZE = 0
LLVMOrcObjectTransformLayerRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueObjectTransformLayer]
LLVMOrcObjectTransformLayerTransformFunction: TypeAlias = c.CFUNCTYPE[c.POINTER[struct_LLVMOpaqueError], [ctypes.c_void_p, c.POINTER[c.POINTER[struct_LLVMOpaqueMemoryBuffer]]]]
@dll.bind
@@ -3147,7 +3147,7 @@ LLVMOrcJITTargetAddress: TypeAlias = Annotated[int, ctypes.c_uint64]
def LLVMOrcCreateLocalLazyCallThroughManager(TargetTriple:c.POINTER[Annotated[bytes, ctypes.c_char]], ES:LLVMOrcExecutionSessionRef, ErrorHandlerAddr:LLVMOrcJITTargetAddress, LCTM:c.POINTER[LLVMOrcLazyCallThroughManagerRef]) -> LLVMErrorRef: ...
@dll.bind
def LLVMOrcDisposeLazyCallThroughManager(LCTM:LLVMOrcLazyCallThroughManagerRef) -> None: ...
class struct_LLVMOrcOpaqueDumpObjects(ctypes.Structure): pass
class struct_LLVMOrcOpaqueDumpObjects(c.Struct): SIZE = 0
LLVMOrcDumpObjectsRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueDumpObjects]
@dll.bind
def LLVMOrcCreateDumpObjects(DumpDir:c.POINTER[Annotated[bytes, ctypes.c_char]], IdentifierOverride:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> LLVMOrcDumpObjectsRef: ...
@@ -3156,9 +3156,9 @@ def LLVMOrcDisposeDumpObjects(DumpObjects:LLVMOrcDumpObjectsRef) -> None: ...
@dll.bind
def LLVMOrcDumpObjects_CallOperator(DumpObjects:LLVMOrcDumpObjectsRef, ObjBuffer:c.POINTER[LLVMMemoryBufferRef]) -> LLVMErrorRef: ...
LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction: TypeAlias = c.CFUNCTYPE[c.POINTER[struct_LLVMOrcOpaqueObjectLayer], [ctypes.c_void_p, c.POINTER[struct_LLVMOrcOpaqueExecutionSession], c.POINTER[Annotated[bytes, ctypes.c_char]]]]
class struct_LLVMOrcOpaqueLLJITBuilder(ctypes.Structure): pass
class struct_LLVMOrcOpaqueLLJITBuilder(c.Struct): SIZE = 0
LLVMOrcLLJITBuilderRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueLLJITBuilder]
class struct_LLVMOrcOpaqueLLJIT(ctypes.Structure): pass
class struct_LLVMOrcOpaqueLLJIT(c.Struct): SIZE = 0
LLVMOrcLLJITRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueLLJIT]
@dll.bind
def LLVMOrcCreateLLJITBuilder() -> LLVMOrcLLJITBuilderRef: ...
@@ -3208,11 +3208,11 @@ LLVMLinkerPreserveSource_Removed = LLVMLinkerMode.define('LLVMLinkerPreserveSour
@dll.bind
def LLVMLinkModules2(Dest:LLVMModuleRef, Src:LLVMModuleRef) -> LLVMBool: ...
class struct_LLVMOpaqueSectionIterator(ctypes.Structure): pass
class struct_LLVMOpaqueSectionIterator(c.Struct): SIZE = 0
LLVMSectionIteratorRef: TypeAlias = c.POINTER[struct_LLVMOpaqueSectionIterator]
class struct_LLVMOpaqueSymbolIterator(ctypes.Structure): pass
class struct_LLVMOpaqueSymbolIterator(c.Struct): SIZE = 0
LLVMSymbolIteratorRef: TypeAlias = c.POINTER[struct_LLVMOpaqueSymbolIterator]
class struct_LLVMOpaqueRelocationIterator(ctypes.Structure): pass
class struct_LLVMOpaqueRelocationIterator(c.Struct): SIZE = 0
LLVMRelocationIteratorRef: TypeAlias = c.POINTER[struct_LLVMOpaqueRelocationIterator]
class LLVMBinaryType(Annotated[int, ctypes.c_uint32], c.Enum): pass
LLVMBinaryTypeArchive = LLVMBinaryType.define('LLVMBinaryTypeArchive', 0)
@@ -3232,7 +3232,7 @@ LLVMBinaryTypeMachO64B = LLVMBinaryType.define('LLVMBinaryTypeMachO64B', 13)
LLVMBinaryTypeWasm = LLVMBinaryType.define('LLVMBinaryTypeWasm', 14)
LLVMBinaryTypeOffload = LLVMBinaryType.define('LLVMBinaryTypeOffload', 15)
class struct_LLVMOpaqueBinary(ctypes.Structure): pass
class struct_LLVMOpaqueBinary(c.Struct): SIZE = 0
LLVMBinaryRef: TypeAlias = c.POINTER[struct_LLVMOpaqueBinary]
@dll.bind
def LLVMCreateBinary(MemBuf:LLVMMemoryBufferRef, Context:LLVMContextRef, ErrorMessage:c.POINTER[c.POINTER[Annotated[bytes, ctypes.c_char]]]) -> LLVMBinaryRef: ...
@@ -3296,7 +3296,7 @@ def LLVMGetRelocationType(RI:LLVMRelocationIteratorRef) -> uint64_t: ...
def LLVMGetRelocationTypeName(RI:LLVMRelocationIteratorRef) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
@dll.bind
def LLVMGetRelocationValueString(RI:LLVMRelocationIteratorRef) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
class struct_LLVMOpaqueObjectFile(ctypes.Structure): pass
class struct_LLVMOpaqueObjectFile(c.Struct): SIZE = 0
LLVMObjectFileRef: TypeAlias = c.POINTER[struct_LLVMOpaqueObjectFile]
@dll.bind
def LLVMCreateObjectFile(MemBuf:LLVMMemoryBufferRef) -> LLVMObjectFileRef: ...
@@ -3318,7 +3318,7 @@ LLVMJITSymbolGenericFlagsCallable = LLVMJITSymbolGenericFlags.define('LLVMJITSym
LLVMJITSymbolGenericFlagsMaterializationSideEffectsOnly = LLVMJITSymbolGenericFlags.define('LLVMJITSymbolGenericFlagsMaterializationSideEffectsOnly', 8)
LLVMJITSymbolTargetFlags: TypeAlias = Annotated[int, ctypes.c_ubyte]
class struct_LLVMOrcOpaqueObjectLinkingLayer(ctypes.Structure): pass
class struct_LLVMOrcOpaqueObjectLinkingLayer(c.Struct): SIZE = 0
LLVMOrcObjectLinkingLayerRef: TypeAlias = c.POINTER[struct_LLVMOrcOpaqueObjectLinkingLayer]
LLVMMemoryManagerCreateContextCallback: TypeAlias = c.CFUNCTYPE[ctypes.c_void_p, [ctypes.c_void_p]]
LLVMMemoryManagerNotifyTerminatingCallback: TypeAlias = c.CFUNCTYPE[None, [ctypes.c_void_p]]
@@ -3337,13 +3337,13 @@ LLVMRemarkTypeAnalysisFPCommute = enum_LLVMRemarkType.define('LLVMRemarkTypeAnal
LLVMRemarkTypeAnalysisAliasing = enum_LLVMRemarkType.define('LLVMRemarkTypeAnalysisAliasing', 5)
LLVMRemarkTypeFailure = enum_LLVMRemarkType.define('LLVMRemarkTypeFailure', 6)
class struct_LLVMRemarkOpaqueString(ctypes.Structure): pass
class struct_LLVMRemarkOpaqueString(c.Struct): SIZE = 0
LLVMRemarkStringRef: TypeAlias = c.POINTER[struct_LLVMRemarkOpaqueString]
@dll.bind
def LLVMRemarkStringGetData(String:LLVMRemarkStringRef) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
@dll.bind
def LLVMRemarkStringGetLen(String:LLVMRemarkStringRef) -> uint32_t: ...
class struct_LLVMRemarkOpaqueDebugLoc(ctypes.Structure): pass
class struct_LLVMRemarkOpaqueDebugLoc(c.Struct): SIZE = 0
LLVMRemarkDebugLocRef: TypeAlias = c.POINTER[struct_LLVMRemarkOpaqueDebugLoc]
@dll.bind
def LLVMRemarkDebugLocGetSourceFilePath(DL:LLVMRemarkDebugLocRef) -> LLVMRemarkStringRef: ...
@@ -3351,7 +3351,7 @@ def LLVMRemarkDebugLocGetSourceFilePath(DL:LLVMRemarkDebugLocRef) -> LLVMRemarkS
def LLVMRemarkDebugLocGetSourceLine(DL:LLVMRemarkDebugLocRef) -> uint32_t: ...
@dll.bind
def LLVMRemarkDebugLocGetSourceColumn(DL:LLVMRemarkDebugLocRef) -> uint32_t: ...
class struct_LLVMRemarkOpaqueArg(ctypes.Structure): pass
class struct_LLVMRemarkOpaqueArg(c.Struct): SIZE = 0
LLVMRemarkArgRef: TypeAlias = c.POINTER[struct_LLVMRemarkOpaqueArg]
@dll.bind
def LLVMRemarkArgGetKey(Arg:LLVMRemarkArgRef) -> LLVMRemarkStringRef: ...
@@ -3359,7 +3359,7 @@ def LLVMRemarkArgGetKey(Arg:LLVMRemarkArgRef) -> LLVMRemarkStringRef: ...
def LLVMRemarkArgGetValue(Arg:LLVMRemarkArgRef) -> LLVMRemarkStringRef: ...
@dll.bind
def LLVMRemarkArgGetDebugLoc(Arg:LLVMRemarkArgRef) -> LLVMRemarkDebugLocRef: ...
class struct_LLVMRemarkOpaqueEntry(ctypes.Structure): pass
class struct_LLVMRemarkOpaqueEntry(c.Struct): SIZE = 0
LLVMRemarkEntryRef: TypeAlias = c.POINTER[struct_LLVMRemarkOpaqueEntry]
@dll.bind
def LLVMRemarkEntryDispose(Remark:LLVMRemarkEntryRef) -> None: ...
@@ -3381,7 +3381,7 @@ def LLVMRemarkEntryGetNumArgs(Remark:LLVMRemarkEntryRef) -> uint32_t: ...
def LLVMRemarkEntryGetFirstArg(Remark:LLVMRemarkEntryRef) -> LLVMRemarkArgRef: ...
@dll.bind
def LLVMRemarkEntryGetNextArg(It:LLVMRemarkArgRef, Remark:LLVMRemarkEntryRef) -> LLVMRemarkArgRef: ...
class struct_LLVMRemarkOpaqueParser(ctypes.Structure): pass
class struct_LLVMRemarkOpaqueParser(c.Struct): SIZE = 0
LLVMRemarkParserRef: TypeAlias = c.POINTER[struct_LLVMRemarkOpaqueParser]
@dll.bind
def LLVMRemarkParserCreateYAML(Buf:ctypes.c_void_p, Size:uint64_t) -> LLVMRemarkParserRef: ...
@@ -3405,7 +3405,7 @@ def LLVMParseCommandLineOptions(argc:Annotated[int, ctypes.c_int32], argv:c.POIN
def LLVMSearchForAddressOfSymbol(symbolName:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> ctypes.c_void_p: ...
@dll.bind
def LLVMAddSymbol(symbolName:c.POINTER[Annotated[bytes, ctypes.c_char]], symbolValue:ctypes.c_void_p) -> None: ...
class struct_LLVMOpaquePassBuilderOptions(ctypes.Structure): pass
class struct_LLVMOpaquePassBuilderOptions(c.Struct): SIZE = 0
LLVMPassBuilderOptionsRef: TypeAlias = c.POINTER[struct_LLVMOpaquePassBuilderOptions]
@dll.bind
def LLVMRunPasses(M:LLVMModuleRef, Passes:c.POINTER[Annotated[bytes, ctypes.c_char]], TM:LLVMTargetMachineRef, Options:LLVMPassBuilderOptionsRef) -> LLVMErrorRef: ...
@@ -3507,11 +3507,11 @@ LTO_CODEGEN_PIC_MODEL_DYNAMIC = lto_codegen_model.define('LTO_CODEGEN_PIC_MODEL_
LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC = lto_codegen_model.define('LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC', 2)
LTO_CODEGEN_PIC_MODEL_DEFAULT = lto_codegen_model.define('LTO_CODEGEN_PIC_MODEL_DEFAULT', 3)
class struct_LLVMOpaqueLTOModule(ctypes.Structure): pass
class struct_LLVMOpaqueLTOModule(c.Struct): SIZE = 0
lto_module_t: TypeAlias = c.POINTER[struct_LLVMOpaqueLTOModule]
class struct_LLVMOpaqueLTOCodeGenerator(ctypes.Structure): pass
class struct_LLVMOpaqueLTOCodeGenerator(c.Struct): SIZE = 0
lto_code_gen_t: TypeAlias = c.POINTER[struct_LLVMOpaqueLTOCodeGenerator]
class struct_LLVMOpaqueThinLTOCodeGenerator(ctypes.Structure): pass
class struct_LLVMOpaqueThinLTOCodeGenerator(c.Struct): SIZE = 0
thinlto_code_gen_t: TypeAlias = c.POINTER[struct_LLVMOpaqueThinLTOCodeGenerator]
@dll.bind
def lto_get_version() -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
@@ -3615,7 +3615,7 @@ def lto_initialize_disassembler() -> None: ...
def lto_codegen_set_should_internalize(cg:lto_code_gen_t, ShouldInternalize:lto_bool_t) -> None: ...
@dll.bind
def lto_codegen_set_should_embed_uselists(cg:lto_code_gen_t, ShouldEmbedUselists:lto_bool_t) -> None: ...
class struct_LLVMOpaqueLTOInput(ctypes.Structure): pass
class struct_LLVMOpaqueLTOInput(c.Struct): SIZE = 0
lto_input_t: TypeAlias = c.POINTER[struct_LLVMOpaqueLTOInput]
@dll.bind
def lto_input_create(buffer:ctypes.c_void_p, buffer_size:size_t, path:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> lto_input_t: ...
+30 -30
View File
@@ -7,7 +7,7 @@ from tinygrad.runtime.support import c
from tinygrad.helpers import CPU_CC, DEV
import gzip, base64
dll = c.DLL('mesa', ([] if CPU_CC.value == 'LVP' or DEV.renderer == 'LVP' else ['tinymesa']) + ['tinymesa_cpu'])
class struct_u_printf_info(ctypes.Structure): pass
class struct_u_printf_info(c.Struct): SIZE = 0
u_printf_info: TypeAlias = struct_u_printf_info
uint32_t: TypeAlias = Annotated[int, ctypes.c_uint32]
try: nir_debug = uint32_t.in_dll(dll, 'nir_debug') # type: ignore
@@ -1614,7 +1614,7 @@ class struct_nir_shader(c.Struct):
printf_info: Annotated[c.POINTER[u_printf_info], 504]
has_debug_info: Annotated[Annotated[bool, ctypes.c_bool], 512]
nir_shader: TypeAlias = struct_nir_shader
class struct_gc_ctx(ctypes.Structure): pass
class struct_gc_ctx(c.Struct): SIZE = 0
gc_ctx: TypeAlias = struct_gc_ctx
@c.record
class struct_nir_shader_compiler_options(c.Struct):
@@ -2132,7 +2132,7 @@ class struct_shader_info_mesh(c.Struct):
max_primitives_out: Annotated[uint16_t, 22]
primitive_type: Annotated[enum_mesa_prim, 24]
nv: Annotated[Annotated[bool, ctypes.c_bool], 25]
class struct_nir_xfb_info(ctypes.Structure): pass
class struct_nir_xfb_info(c.Struct): SIZE = 0
nir_xfb_info: TypeAlias = struct_nir_xfb_info
@c.record
class struct_nir_parameter(c.Struct):
@@ -3526,12 +3526,12 @@ class struct__IO_FILE(c.Struct):
_mode: Annotated[Annotated[int, ctypes.c_int32], 192]
_unused2: Annotated[c.Array[Annotated[bytes, ctypes.c_char], Literal[20]], 196]
FILE: TypeAlias = struct__IO_FILE
class struct__IO_marker(ctypes.Structure): pass
class struct__IO_marker(c.Struct): SIZE = 0
__off_t: TypeAlias = Annotated[int, ctypes.c_int64]
_IO_lock_t: TypeAlias = None
__off64_t: TypeAlias = Annotated[int, ctypes.c_int64]
class struct__IO_codecvt(ctypes.Structure): pass
class struct__IO_wide_data(ctypes.Structure): pass
class struct__IO_codecvt(c.Struct): SIZE = 0
class struct__IO_wide_data(c.Struct): SIZE = 0
size_t: TypeAlias = Annotated[int, ctypes.c_uint64]
@dll.bind
def nir_print_shader(shader:c.POINTER[nir_shader], fp:c.POINTER[FILE]) -> None: ...
@@ -4955,7 +4955,7 @@ def nir_remove_tex_shadow(shader:c.POINTER[nir_shader], textures_bitmask:Annotat
def nir_trivialize_registers(s:c.POINTER[nir_shader]) -> Annotated[bool, ctypes.c_bool]: ...
@dll.bind
def nir_static_workgroup_size(s:c.POINTER[nir_shader]) -> Annotated[int, ctypes.c_uint32]: ...
class struct_nir_use_dominance_state(ctypes.Structure): pass
class struct_nir_use_dominance_state(c.Struct): SIZE = 0
nir_use_dominance_state: TypeAlias = struct_nir_use_dominance_state
@dll.bind
def nir_calc_use_dominance_impl(impl:c.POINTER[nir_function_impl], post_dominance:Annotated[bool, ctypes.c_bool]) -> c.POINTER[nir_use_dominance_state]: ...
@@ -5216,7 +5216,7 @@ class struct_nv_device_info_pci(c.Struct):
dev: Annotated[uint8_t, 3]
func: Annotated[uint8_t, 4]
revision_id: Annotated[uint8_t, 5]
class struct_nak_compiler(ctypes.Structure): pass
class struct_nak_compiler(c.Struct): SIZE = 0
@dll.bind
def nak_compiler_create(dev:c.POINTER[struct_nv_device_info]) -> c.POINTER[struct_nak_compiler]: ...
@dll.bind
@@ -5383,15 +5383,15 @@ class struct_lp_context_ref(c.Struct):
SIZE = 16
ref: Annotated[LLVMContextRef, 0]
owned: Annotated[Annotated[bool, ctypes.c_bool], 8]
class struct_LLVMOpaqueContext(ctypes.Structure): pass
class struct_LLVMOpaqueContext(c.Struct): SIZE = 0
LLVMContextRef: TypeAlias = c.POINTER[struct_LLVMOpaqueContext]
lp_context_ref: TypeAlias = struct_lp_context_ref
class struct_lp_passmgr(ctypes.Structure): pass
class struct_LLVMOpaqueModule(ctypes.Structure): pass
class struct_lp_passmgr(c.Struct): SIZE = 0
class struct_LLVMOpaqueModule(c.Struct): SIZE = 0
LLVMModuleRef: TypeAlias = c.POINTER[struct_LLVMOpaqueModule]
@dll.bind
def lp_passmgr_create(module:LLVMModuleRef, mgr:c.POINTER[c.POINTER[struct_lp_passmgr]]) -> Annotated[bool, ctypes.c_bool]: ...
class struct_LLVMOpaqueTargetMachine(ctypes.Structure): pass
class struct_LLVMOpaqueTargetMachine(c.Struct): SIZE = 0
LLVMTargetMachineRef: TypeAlias = c.POINTER[struct_LLVMOpaqueTargetMachine]
@dll.bind
def lp_passmgr_run(mgr:c.POINTER[struct_lp_passmgr], module:LLVMModuleRef, tm:LLVMTargetMachineRef, module_name:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> None: ...
@@ -5404,8 +5404,8 @@ class struct_lp_cached_code(c.Struct):
data_size: Annotated[size_t, 8]
dont_cache: Annotated[Annotated[bool, ctypes.c_bool], 16]
jit_obj_cache: Annotated[ctypes.c_void_p, 24]
class struct_lp_generated_code(ctypes.Structure): pass
class struct_LLVMOpaqueTargetLibraryInfotData(ctypes.Structure): pass
class struct_lp_generated_code(c.Struct): SIZE = 0
class struct_LLVMOpaqueTargetLibraryInfotData(c.Struct): SIZE = 0
LLVMTargetLibraryInfoRef: TypeAlias = c.POINTER[struct_LLVMOpaqueTargetLibraryInfotData]
@dll.bind
def gallivm_create_target_library_info(triple:c.POINTER[Annotated[bytes, ctypes.c_char]]) -> LLVMTargetLibraryInfoRef: ...
@@ -5415,9 +5415,9 @@ def gallivm_dispose_target_library_info(library_info:LLVMTargetLibraryInfoRef) -
def lp_set_target_options() -> None: ...
@dll.bind
def lp_bld_init_native_targets() -> None: ...
class struct_LLVMOpaqueExecutionEngine(ctypes.Structure): pass
class struct_LLVMOpaqueExecutionEngine(c.Struct): SIZE = 0
LLVMExecutionEngineRef: TypeAlias = c.POINTER[struct_LLVMOpaqueExecutionEngine]
class struct_LLVMOpaqueMCJITMemoryManager(ctypes.Structure): pass
class struct_LLVMOpaqueMCJITMemoryManager(c.Struct): SIZE = 0
LLVMMCJITMemoryManagerRef: TypeAlias = c.POINTER[struct_LLVMOpaqueMCJITMemoryManager]
@dll.bind
def lp_build_create_jit_compiler_for_module(OutJIT:c.POINTER[LLVMExecutionEngineRef], OutCode:c.POINTER[c.POINTER[struct_lp_generated_code]], cache_out:c.POINTER[struct_lp_cached_code], M:LLVMModuleRef, MM:LLVMMCJITMemoryManagerRef, OptLevel:Annotated[int, ctypes.c_uint32], OutError:c.POINTER[c.POINTER[Annotated[bytes, ctypes.c_char]]]) -> Annotated[int, ctypes.c_int32]: ...
@@ -5427,7 +5427,7 @@ def lp_free_generated_code(code:c.POINTER[struct_lp_generated_code]) -> None: ..
def lp_get_default_memory_manager() -> LLVMMCJITMemoryManagerRef: ...
@dll.bind
def lp_free_memory_manager(memorymgr:LLVMMCJITMemoryManagerRef) -> None: ...
class struct_LLVMOpaqueValue(ctypes.Structure): pass
class struct_LLVMOpaqueValue(c.Struct): SIZE = 0
LLVMValueRef: TypeAlias = c.POINTER[struct_LLVMOpaqueValue]
@dll.bind
def lp_get_called_value(call:LLVMValueRef) -> LLVMValueRef: ...
@@ -5489,7 +5489,7 @@ class struct_gallivm_state(c.Struct):
texture_descriptor: Annotated[LLVMValueRef, 168]
texture_dynamic_state: Annotated[c.POINTER[struct_lp_jit_texture], 176]
sampler_descriptor: Annotated[LLVMValueRef, 184]
class struct_LLVMOpaqueType(ctypes.Structure): pass
class struct_LLVMOpaqueType(c.Struct): SIZE = 0
LLVMTypeRef: TypeAlias = c.POINTER[struct_LLVMOpaqueType]
@dll.bind
def lp_build_elem_type(gallivm:c.POINTER[struct_gallivm_state], type:struct_lp_type) -> LLVMTypeRef: ...
@@ -5559,13 +5559,13 @@ class struct_lp_jit_texture(c.Struct):
last_level: Annotated[uint8_t, 145]
mip_offsets: Annotated[c.Array[uint32_t, Literal[16]], 148]
sampler_index: Annotated[uint32_t, 212]
class struct_LLVMOpaqueTargetData(ctypes.Structure): pass
class struct_LLVMOpaqueTargetData(c.Struct): SIZE = 0
LLVMTargetDataRef: TypeAlias = c.POINTER[struct_LLVMOpaqueTargetData]
class struct_LLVMOpaqueBuilder(ctypes.Structure): pass
class struct_LLVMOpaqueBuilder(c.Struct): SIZE = 0
LLVMBuilderRef: TypeAlias = c.POINTER[struct_LLVMOpaqueBuilder]
class struct_LLVMOpaqueDIBuilder(ctypes.Structure): pass
class struct_LLVMOpaqueDIBuilder(c.Struct): SIZE = 0
LLVMDIBuilderRef: TypeAlias = c.POINTER[struct_LLVMOpaqueDIBuilder]
class struct_LLVMOpaqueMetadata(ctypes.Structure): pass
class struct_LLVMOpaqueMetadata(c.Struct): SIZE = 0
LLVMMetadataRef: TypeAlias = c.POINTER[struct_LLVMOpaqueMetadata]
@dll.bind
def lp_build_init_native_width() -> Annotated[int, ctypes.c_uint32]: ...
@@ -5640,7 +5640,7 @@ class struct_lp_build_skip_context(c.Struct):
SIZE = 16
gallivm: Annotated[c.POINTER[struct_gallivm_state], 0]
block: Annotated[LLVMBasicBlockRef, 8]
class struct_LLVMOpaqueBasicBlock(ctypes.Structure): pass
class struct_LLVMOpaqueBasicBlock(c.Struct): SIZE = 0
LLVMBasicBlockRef: TypeAlias = c.POINTER[struct_LLVMOpaqueBasicBlock]
@c.record
class struct_lp_bld_tgsi_system_values(c.Struct):
@@ -5871,7 +5871,7 @@ LLVMAtomicRMWBinOpUDecWrap = LLVMAtomicRMWBinOp.define('LLVMAtomicRMWBinOpUDecWr
LLVMAtomicRMWBinOpUSubCond = LLVMAtomicRMWBinOp.define('LLVMAtomicRMWBinOpUSubCond', 17)
LLVMAtomicRMWBinOpUSubSat = LLVMAtomicRMWBinOp.define('LLVMAtomicRMWBinOpUSubSat', 18)
class struct_lp_build_coro_suspend_info(ctypes.Structure): pass
class struct_lp_build_coro_suspend_info(c.Struct): SIZE = 0
@c.record
class struct_lp_build_fs_iface(c.Struct):
SIZE = 16
@@ -6445,7 +6445,7 @@ def fd_dev_info_raw_by_name(name:c.POINTER[Annotated[bytes, ctypes.c_char]]) ->
def fd_dev_name(id:c.POINTER[struct_fd_dev_id]) -> c.POINTER[Annotated[bytes, ctypes.c_char]]: ...
@dll.bind
def fd_dev_info_apply_dbg_options(info:c.POINTER[struct_fd_dev_info]) -> None: ...
class struct_ir3_ra_reg_set(ctypes.Structure): pass
class struct_ir3_ra_reg_set(c.Struct): SIZE = 0
@c.record
class struct_ir3_shader(c.Struct):
SIZE = 1216
@@ -6549,8 +6549,8 @@ class struct_ir3_compiler(c.Struct):
has_alias_rt: Annotated[Annotated[bool, ctypes.c_bool], 441]
reading_shading_rate_requires_smask_quirk: Annotated[Annotated[bool, ctypes.c_bool], 442]
delay_slots: Annotated[struct_ir3_compiler_delay_slots, 444]
class struct_fd_device(ctypes.Structure): pass
class struct_disk_cache(ctypes.Structure): pass
class struct_fd_device(c.Struct): SIZE = 0
class struct_disk_cache(c.Struct): SIZE = 0
class type_t(Annotated[int, ctypes.c_uint32], c.Enum): pass
TYPE_F16 = type_t.define('TYPE_F16', 0)
TYPE_F32 = type_t.define('TYPE_F32', 1)
@@ -7238,7 +7238,7 @@ class struct_ir3_shader_output(c.Struct):
view: Annotated[uint8_t, 2]
aliased_components: Annotated[uint8_t, 3, 4, 0]
half: Annotated[Annotated[bool, ctypes.c_bool], 3, 1, 4]
class struct_fd_bo(ctypes.Structure): pass
class struct_fd_bo(c.Struct): SIZE = 0
@c.record
class struct_ir3(c.Struct):
SIZE = 152
@@ -8262,7 +8262,7 @@ def gc_sweep_start(ctx:c.POINTER[gc_ctx]) -> None: ...
def gc_mark_live(ctx:c.POINTER[gc_ctx], mem:ctypes.c_void_p) -> None: ...
@dll.bind
def gc_sweep_end(ctx:c.POINTER[gc_ctx]) -> None: ...
class struct_linear_ctx(ctypes.Structure): pass
class struct_linear_ctx(c.Struct): SIZE = 0
linear_ctx: TypeAlias = struct_linear_ctx
@dll.bind
def linear_alloc_child(ctx:c.POINTER[linear_ctx], size:Annotated[int, ctypes.c_uint32]) -> ctypes.c_void_p: ...
@@ -8342,7 +8342,7 @@ class struct_isa_entrypoint(c.Struct):
def ir3_isa_disasm(bin:ctypes.c_void_p, sz:Annotated[int, ctypes.c_int32], out:c.POINTER[FILE], options:c.POINTER[struct_isa_decode_options]) -> None: ...
@dll.bind
def ir3_isa_decode(out:ctypes.c_void_p, bin:ctypes.c_void_p, options:c.POINTER[struct_isa_decode_options]) -> Annotated[bool, ctypes.c_bool]: ...
class struct_decode_scope(ctypes.Structure): pass
class struct_decode_scope(c.Struct): SIZE = 0
@dll.bind
def ir3_isa_get_gpu_id(scope:c.POINTER[struct_decode_scope]) -> uint32_t: ...
try: glsl_type_builtin_error = struct_glsl_type.in_dll(dll, 'glsl_type_builtin_error') # type: ignore
+2 -2
View File
@@ -286,7 +286,7 @@ NSInvocation._methods_ = [
NSInvocation._classmethods_ = [
('invocationWithMethodSignature:', NSInvocation, [NSMethodSignature]),
]
class struct__NSZone(ctypes.Structure): pass
class struct__NSZone(c.Struct): SIZE = 0
class Protocol(objc.Spec): pass
class NSString(objc.Spec): pass
unichar: TypeAlias = Annotated[int, ctypes.c_uint16]
@@ -1494,7 +1494,7 @@ MTLArchitecture._methods_ = [
class MTLHeapDescriptor(objc.Spec): pass
class MTLDepthStencilState(objc.Spec): pass
class MTLDepthStencilDescriptor(objc.Spec): pass
class struct___IOSurface(ctypes.Structure): pass
class struct___IOSurface(c.Struct): SIZE = 0
IOSurfaceRef: TypeAlias = c.POINTER[struct___IOSurface]
class MTLSharedTextureHandle(objc.Spec): pass
MTLSharedTextureHandle._bases_ = [NSObject]
+1 -1
View File
@@ -24,7 +24,7 @@ NVJITLINK_INPUT_FATBIN = nvJitLinkInputType.define('NVJITLINK_INPUT_FATBIN', 4)
NVJITLINK_INPUT_OBJECT = nvJitLinkInputType.define('NVJITLINK_INPUT_OBJECT', 5)
NVJITLINK_INPUT_LIBRARY = nvJitLinkInputType.define('NVJITLINK_INPUT_LIBRARY', 6)
class struct_nvJitLink(ctypes.Structure): pass
class struct_nvJitLink(c.Struct): SIZE = 0
nvJitLinkHandle: TypeAlias = c.POINTER[struct_nvJitLink]
uint32_t: TypeAlias = Annotated[int, ctypes.c_uint32]
@dll.bind
+1 -1
View File
@@ -28,7 +28,7 @@ def nvrtcVersion(major:c.POINTER[Annotated[int, ctypes.c_int32]], minor:c.POINTE
def nvrtcGetNumSupportedArchs(numArchs:c.POINTER[Annotated[int, ctypes.c_int32]]) -> nvrtcResult: ...
@dll.bind
def nvrtcGetSupportedArchs(supportedArchs:c.POINTER[Annotated[int, ctypes.c_int32]]) -> nvrtcResult: ...
class struct__nvrtcProgram(ctypes.Structure): pass
class struct__nvrtcProgram(c.Struct): SIZE = 0
nvrtcProgram: TypeAlias = c.POINTER[struct__nvrtcProgram]
@dll.bind
def nvrtcCreateProgram(prog:c.POINTER[nvrtcProgram], src:c.POINTER[Annotated[bytes, ctypes.c_char]], name:c.POINTER[Annotated[bytes, ctypes.c_char]], numHeaders:Annotated[int, ctypes.c_int32], headers:c.POINTER[c.POINTER[Annotated[bytes, ctypes.c_char]]], includeNames:c.POINTER[c.POINTER[Annotated[bytes, ctypes.c_char]]]) -> nvrtcResult: ...
+9 -9
View File
@@ -5,23 +5,23 @@ from typing import Annotated, Literal, TypeAlias
from tinygrad.runtime.support.c import _IO, _IOW, _IOR, _IOWR
from tinygrad.runtime.support import c
dll = c.DLL('opencl', 'OpenCL')
class struct__cl_platform_id(ctypes.Structure): pass
class struct__cl_platform_id(c.Struct): SIZE = 0
cl_platform_id: TypeAlias = c.POINTER[struct__cl_platform_id]
class struct__cl_device_id(ctypes.Structure): pass
class struct__cl_device_id(c.Struct): SIZE = 0
cl_device_id: TypeAlias = c.POINTER[struct__cl_device_id]
class struct__cl_context(ctypes.Structure): pass
class struct__cl_context(c.Struct): SIZE = 0
cl_context: TypeAlias = c.POINTER[struct__cl_context]
class struct__cl_command_queue(ctypes.Structure): pass
class struct__cl_command_queue(c.Struct): SIZE = 0
cl_command_queue: TypeAlias = c.POINTER[struct__cl_command_queue]
class struct__cl_mem(ctypes.Structure): pass
class struct__cl_mem(c.Struct): SIZE = 0
cl_mem: TypeAlias = c.POINTER[struct__cl_mem]
class struct__cl_program(ctypes.Structure): pass
class struct__cl_program(c.Struct): SIZE = 0
cl_program: TypeAlias = c.POINTER[struct__cl_program]
class struct__cl_kernel(ctypes.Structure): pass
class struct__cl_kernel(c.Struct): SIZE = 0
cl_kernel: TypeAlias = c.POINTER[struct__cl_kernel]
class struct__cl_event(ctypes.Structure): pass
class struct__cl_event(c.Struct): SIZE = 0
cl_event: TypeAlias = c.POINTER[struct__cl_event]
class struct__cl_sampler(ctypes.Structure): pass
class struct__cl_sampler(c.Struct): SIZE = 0
cl_sampler: TypeAlias = c.POINTER[struct__cl_sampler]
cl_bool: TypeAlias = Annotated[int, ctypes.c_uint32]
cl_bitfield: TypeAlias = Annotated[int, ctypes.c_uint64]
+26 -26
View File
@@ -9,57 +9,57 @@ import sysconfig, os
dll = c.DLL('webgpu', os.path.join(sysconfig.get_paths()['purelib'], 'pydawn', 'lib', 'libwebgpu_dawn.dll') if WIN else 'webgpu_dawn')
WGPUFlags: TypeAlias = Annotated[int, ctypes.c_uint64]
WGPUBool: TypeAlias = Annotated[int, ctypes.c_uint32]
class struct_WGPUAdapterImpl(ctypes.Structure): pass
class struct_WGPUAdapterImpl(c.Struct): SIZE = 0
WGPUAdapter: TypeAlias = c.POINTER[struct_WGPUAdapterImpl]
class struct_WGPUBindGroupImpl(ctypes.Structure): pass
class struct_WGPUBindGroupImpl(c.Struct): SIZE = 0
WGPUBindGroup: TypeAlias = c.POINTER[struct_WGPUBindGroupImpl]
class struct_WGPUBindGroupLayoutImpl(ctypes.Structure): pass
class struct_WGPUBindGroupLayoutImpl(c.Struct): SIZE = 0
WGPUBindGroupLayout: TypeAlias = c.POINTER[struct_WGPUBindGroupLayoutImpl]
class struct_WGPUBufferImpl(ctypes.Structure): pass
class struct_WGPUBufferImpl(c.Struct): SIZE = 0
WGPUBuffer: TypeAlias = c.POINTER[struct_WGPUBufferImpl]
class struct_WGPUCommandBufferImpl(ctypes.Structure): pass
class struct_WGPUCommandBufferImpl(c.Struct): SIZE = 0
WGPUCommandBuffer: TypeAlias = c.POINTER[struct_WGPUCommandBufferImpl]
class struct_WGPUCommandEncoderImpl(ctypes.Structure): pass
class struct_WGPUCommandEncoderImpl(c.Struct): SIZE = 0
WGPUCommandEncoder: TypeAlias = c.POINTER[struct_WGPUCommandEncoderImpl]
class struct_WGPUComputePassEncoderImpl(ctypes.Structure): pass
class struct_WGPUComputePassEncoderImpl(c.Struct): SIZE = 0
WGPUComputePassEncoder: TypeAlias = c.POINTER[struct_WGPUComputePassEncoderImpl]
class struct_WGPUComputePipelineImpl(ctypes.Structure): pass
class struct_WGPUComputePipelineImpl(c.Struct): SIZE = 0
WGPUComputePipeline: TypeAlias = c.POINTER[struct_WGPUComputePipelineImpl]
class struct_WGPUDeviceImpl(ctypes.Structure): pass
class struct_WGPUDeviceImpl(c.Struct): SIZE = 0
WGPUDevice: TypeAlias = c.POINTER[struct_WGPUDeviceImpl]
class struct_WGPUExternalTextureImpl(ctypes.Structure): pass
class struct_WGPUExternalTextureImpl(c.Struct): SIZE = 0
WGPUExternalTexture: TypeAlias = c.POINTER[struct_WGPUExternalTextureImpl]
class struct_WGPUInstanceImpl(ctypes.Structure): pass
class struct_WGPUInstanceImpl(c.Struct): SIZE = 0
WGPUInstance: TypeAlias = c.POINTER[struct_WGPUInstanceImpl]
class struct_WGPUPipelineLayoutImpl(ctypes.Structure): pass
class struct_WGPUPipelineLayoutImpl(c.Struct): SIZE = 0
WGPUPipelineLayout: TypeAlias = c.POINTER[struct_WGPUPipelineLayoutImpl]
class struct_WGPUQuerySetImpl(ctypes.Structure): pass
class struct_WGPUQuerySetImpl(c.Struct): SIZE = 0
WGPUQuerySet: TypeAlias = c.POINTER[struct_WGPUQuerySetImpl]
class struct_WGPUQueueImpl(ctypes.Structure): pass
class struct_WGPUQueueImpl(c.Struct): SIZE = 0
WGPUQueue: TypeAlias = c.POINTER[struct_WGPUQueueImpl]
class struct_WGPURenderBundleImpl(ctypes.Structure): pass
class struct_WGPURenderBundleImpl(c.Struct): SIZE = 0
WGPURenderBundle: TypeAlias = c.POINTER[struct_WGPURenderBundleImpl]
class struct_WGPURenderBundleEncoderImpl(ctypes.Structure): pass
class struct_WGPURenderBundleEncoderImpl(c.Struct): SIZE = 0
WGPURenderBundleEncoder: TypeAlias = c.POINTER[struct_WGPURenderBundleEncoderImpl]
class struct_WGPURenderPassEncoderImpl(ctypes.Structure): pass
class struct_WGPURenderPassEncoderImpl(c.Struct): SIZE = 0
WGPURenderPassEncoder: TypeAlias = c.POINTER[struct_WGPURenderPassEncoderImpl]
class struct_WGPURenderPipelineImpl(ctypes.Structure): pass
class struct_WGPURenderPipelineImpl(c.Struct): SIZE = 0
WGPURenderPipeline: TypeAlias = c.POINTER[struct_WGPURenderPipelineImpl]
class struct_WGPUSamplerImpl(ctypes.Structure): pass
class struct_WGPUSamplerImpl(c.Struct): SIZE = 0
WGPUSampler: TypeAlias = c.POINTER[struct_WGPUSamplerImpl]
class struct_WGPUShaderModuleImpl(ctypes.Structure): pass
class struct_WGPUShaderModuleImpl(c.Struct): SIZE = 0
WGPUShaderModule: TypeAlias = c.POINTER[struct_WGPUShaderModuleImpl]
class struct_WGPUSharedBufferMemoryImpl(ctypes.Structure): pass
class struct_WGPUSharedBufferMemoryImpl(c.Struct): SIZE = 0
WGPUSharedBufferMemory: TypeAlias = c.POINTER[struct_WGPUSharedBufferMemoryImpl]
class struct_WGPUSharedFenceImpl(ctypes.Structure): pass
class struct_WGPUSharedFenceImpl(c.Struct): SIZE = 0
WGPUSharedFence: TypeAlias = c.POINTER[struct_WGPUSharedFenceImpl]
class struct_WGPUSharedTextureMemoryImpl(ctypes.Structure): pass
class struct_WGPUSharedTextureMemoryImpl(c.Struct): SIZE = 0
WGPUSharedTextureMemory: TypeAlias = c.POINTER[struct_WGPUSharedTextureMemoryImpl]
class struct_WGPUSurfaceImpl(ctypes.Structure): pass
class struct_WGPUSurfaceImpl(c.Struct): SIZE = 0
WGPUSurface: TypeAlias = c.POINTER[struct_WGPUSurfaceImpl]
class struct_WGPUTextureImpl(ctypes.Structure): pass
class struct_WGPUTextureImpl(c.Struct): SIZE = 0
WGPUTexture: TypeAlias = c.POINTER[struct_WGPUTextureImpl]
class struct_WGPUTextureViewImpl(ctypes.Structure): pass
class struct_WGPUTextureViewImpl(c.Struct): SIZE = 0
WGPUTextureView: TypeAlias = c.POINTER[struct_WGPUTextureViewImpl]
@c.record
class struct_WGPUINTERNAL__HAVE_EMDAWNWEBGPU_HEADER(c.Struct):
+1 -1
View File
@@ -130,7 +130,7 @@ def gen(name, dll, files, args=[], prolog=[], rules=[], epilog=[], recsym=False,
real_nm = ((suggested_name or (f"_anon{'struct' if decl.kind==clang.CXCursor_StructDecl else 'union'}{anoncnt()}"))
if clang.clang_Cursor_isAnonymous(decl) else _nm)
types[_nm] = (tnm:=real_nm.replace(' ', '_').replace('::', '_')), len(fields(t)) != 0, (ln:=len(lines))
lines.append(f"class {tnm}(ctypes.{'Structure' if decl.kind==clang.CXCursor_StructDecl else 'Union'}): pass")
lines.append(f"class {tnm}(c.Struct): SIZE = 0")
if typedef:
lines.append(f"{typedef.replace('::', '_')}: TypeAlias = {tnm}")
types[typedef] = typedef.replace('::', '_'), True