@cenum ELFSegment::UInt32 begin
   SEGMENT_GLOBAL_PROGRAM = 0
   SEGMENT_GLOBAL_AGENT = 1
   SEGMENT_READONLY_AGENT = 2
   SEGMENT_CODE_AGENT = 3
   SEGMENT_LAST = 4
end

@cenum SymbolAllocation::UInt32 begin
   SYMBOL_ALLOCATION_DEFAULT = 0
   SYMBOL_ALLOCATION_GLOBAL_PROGRAM = 1
   SYMBOL_ALLOCATION_GLOBAL_AGENT = 2
   SYMBOL_ALLOCATION_READONLY_AGENT = 3
   SYMBOL_ALLOCATION_LAST = 4
end

@cenum SymbolFlag::UInt32 begin
   SYMBOL_FLAG_DEFAULT = 0
   SYMBOL_FLAG_CONST = 1
   SYMBOL_FLAG_LAST = 2
end

@cenum MetadataKind::UInt16 begin
   METADATA_KIND_NONE = 0
   METADATA_KIND_INIT_SAMP = 1
   METADATA_KIND_INIT_ROIMG = 2
   METADATA_KIND_INIT_WOIMG = 3
   METADATA_KIND_INIT_RWIMG = 4
end

@cenum SamplerCoord::UInt8 begin
   SAMPLER_COORD_UNNORMALIZED = 0
   SAMPLER_COORD_NORMALIZED = 1
end

@cenum SamplerFilter::UInt8 begin
   SAMPLER_FILTER_NEAREST = 0
   SAMPLER_FILTER_LINEAR = 1
end

@cenum SamplerAddressing::UInt8 begin
   SAMPLER_ADDRESSING_UNDEFINED = 0
   SAMPLER_ADDRESSING_CLAMP_TO_EDGE = 1
   SAMPLER_ADDRESSING_CLAMP_TO_BORDER = 2
   SAMPLER_ADDRESSING_REPEAT = 3
   SAMPLER_ADDRESSING_MIRRORED_REPEAT = 4
end

@cenum ImageGeometry::UInt8 begin
   IMAGE_GEOMETRY_1D = 0
   IMAGE_GEOMETRY_2D = 1
   IMAGE_GEOMETRY_3D = 2
   IMAGE_GEOMETRY_1DA = 3
   IMAGE_GEOMETRY_2DA = 4
   IMAGE_GEOMETRY_1DB = 5
   IMAGE_GEOMETRY_2DDEPTH = 6
   IMAGE_GEOMETRY_2DADEPTH = 7
end

@cenum ImageChannelOrder::UInt8 begin
   IMAGE_CHANNEL_ORDER_A = 0
   IMAGE_CHANNEL_ORDER_R = 1
   IMAGE_CHANNEL_ORDER_RX = 2
   IMAGE_CHANNEL_ORDER_RG = 3
   IMAGE_CHANNEL_ORDER_RGX = 4
   IMAGE_CHANNEL_ORDER_RA = 5
   IMAGE_CHANNEL_ORDER_RGB = 6
   IMAGE_CHANNEL_ORDER_RGBX = 7
   IMAGE_CHANNEL_ORDER_RGBA = 8
   IMAGE_CHANNEL_ORDER_BGRA = 9
   IMAGE_CHANNEL_ORDER_ARGB = 10
   IMAGE_CHANNEL_ORDER_ABGR = 11
   IMAGE_CHANNEL_ORDER_SRGB = 12
   IMAGE_CHANNEL_ORDER_SRGBX = 13
   IMAGE_CHANNEL_ORDER_SRGBA = 14
   IMAGE_CHANNEL_ORDER_SBGRA = 15
   IMAGE_CHANNEL_ORDER_INTENSITY = 16
   IMAGE_CHANNEL_ORDER_LUMINANCE = 17
   IMAGE_CHANNEL_ORDER_DEPTH = 18
   IMAGE_CHANNEL_ORDER_DEPTH_STENCIL = 19
end

@cenum ELFSection::UInt32 begin
   RODATA_GLOBAL_PROGRAM = 0
   RODATA_GLOBAL_AGENT = 1
   RODATA_READONLY_AGENT = 2
   DATA_GLOBAL_PROGRAM = 3
   DATA_GLOBAL_AGENT = 4
   DATA_READONLY_AGENT = 5
   BSS_GLOBAL_PROGRAM = 6
   BSS_GLOBAL_AGENT = 7
   BSS_READONLY_AGENT = 8
   SECTION_LAST = 9
end

@cenum Status::UInt32 begin
    STATUS_SUCCESS = 0
    STATUS_INFO_BREAK = 1
    STATUS_ERROR = 4096
    STATUS_ERROR_INVALID_ARGUMENT = 4097
    STATUS_ERROR_INVALID_QUEUE_CREATION = 4098
    STATUS_ERROR_INVALID_ALLOCATION = 4099
    STATUS_ERROR_INVALID_AGENT = 4100
    STATUS_ERROR_INVALID_REGION = 4101
    STATUS_ERROR_INVALID_SIGNAL = 4102
    STATUS_ERROR_INVALID_QUEUE = 4103
    STATUS_ERROR_OUT_OF_RESOURCES = 4104
    STATUS_ERROR_INVALID_PACKET_FORMAT = 4105
    STATUS_ERROR_RESOURCE_FREE = 4106
    STATUS_ERROR_NOT_INITIALIZED = 4107
    STATUS_ERROR_REFCOUNT_OVERFLOW = 4108
    STATUS_ERROR_INCOMPATIBLE_ARGUMENTS = 4109
    STATUS_ERROR_INVALID_INDEX = 4110
    STATUS_ERROR_INVALID_ISA = 4111
    STATUS_ERROR_INVALID_ISA_NAME = 4119
    STATUS_ERROR_INVALID_CODE_OBJECT = 4112
    STATUS_ERROR_INVALID_EXECUTABLE = 4113
    STATUS_ERROR_FROZEN_EXECUTABLE = 4114
    STATUS_ERROR_INVALID_SYMBOL_NAME = 4115
    STATUS_ERROR_VARIABLE_ALREADY_DEFINED = 4116
    STATUS_ERROR_VARIABLE_UNDEFINED = 4117
    STATUS_ERROR_EXCEPTION = 4118
    STATUS_ERROR_INVALID_CODE_SYMBOL = 4120
    STATUS_ERROR_INVALID_EXECUTABLE_SYMBOL = 4121
    STATUS_ERROR_INVALID_FILE = 4128
    STATUS_ERROR_INVALID_CODE_OBJECT_READER = 4129
    STATUS_ERROR_INVALID_CACHE = 4130
    STATUS_ERROR_INVALID_WAVEFRONT = 4131
    STATUS_ERROR_INVALID_SIGNAL_GROUP = 4132
    STATUS_ERROR_INVALID_RUNTIME_STATE = 4133
    STATUS_ERROR_FATAL = 4134
end

@cenum AccessPermission::UInt32 begin
    ACCESS_PERMISSION_RO = 1
    ACCESS_PERMISSION_WO = 2
    ACCESS_PERMISSION_RW = 3
end

@cenum Endianness::UInt32 begin
    ENDIANNESS_LITTLE = 0
    ENDIANNESS_BIG = 1
end

@cenum MachineModel::UInt32 begin
    MACHINE_MODEL_SMALL = 0
    MACHINE_MODEL_LARGE = 1
end

@cenum Profile::UInt32 begin
    PROFILE_BASE = 0
    PROFILE_FULL = 1
end

@cenum SystemInfo::UInt32 begin
    SYSTEM_INFO_VERSION_MAJOR = 0
    SYSTEM_INFO_VERSION_MINOR = 1
    SYSTEM_INFO_TIMESTAMP = 2
    SYSTEM_INFO_TIMESTAMP_FREQUENCY = 3
    SYSTEM_INFO_SIGNAL_MAX_WAIT = 4
    SYSTEM_INFO_ENDIANNESS = 5
    SYSTEM_INFO_MACHINE_MODEL = 6
    SYSTEM_INFO_EXTENSIONS = 7
    AMD_SYSTEM_INFO_BUILD_VERSION = 512
end

@cenum Extension::UInt32 begin
    EXTENSION_FINALIZER = 0
    EXTENSION_IMAGES = 1
    EXTENSION_PERFORMANCE_COUNTERS = 2
    EXTENSION_PROFILING_EVENTS = 3
    EXTENSION_STD_LAST = 3
    AMD_FIRST_EXTENSION = 512
    EXTENSION_AMD_PROFILER = 512
    EXTENSION_AMD_LOADER = 513
    EXTENSION_AMD_AQLPROFILE = 514
    AMD_LAST_EXTENSION = 514
end

@cenum AgentFeature::UInt32 begin
    AGENT_FEATURE_KERNEL_DISPATCH = 1
    AGENT_FEATURE_AGENT_DISPATCH = 2
end

@cenum DeviceType::UInt32 begin
    DEVICE_TYPE_CPU = 0
    DEVICE_TYPE_GPU = 1
    DEVICE_TYPE_DSP = 2
end

@cenum DefaultFloatRoundingMode::UInt32 begin
    DEFAULT_FLOAT_ROUNDING_MODE_DEFAULT = 0
    DEFAULT_FLOAT_ROUNDING_MODE_ZERO = 1
    DEFAULT_FLOAT_ROUNDING_MODE_NEAR = 2
end

@cenum AgentInfo::UInt32 begin
    AGENT_INFO_NAME = 0
    AGENT_INFO_VENDOR_NAME = 1
    AGENT_INFO_FEATURE = 2
    AGENT_INFO_MACHINE_MODEL = 3
    AGENT_INFO_PROFILE = 4
    AGENT_INFO_DEFAULT_FLOAT_ROUNDING_MODE = 5
    AGENT_INFO_BASE_PROFILE_DEFAULT_FLOAT_ROUNDING_MODES = 23
    AGENT_INFO_FAST_F16_OPERATION = 24
    AGENT_INFO_WAVEFRONT_SIZE = 6
    AGENT_INFO_WORKGROUP_MAX_DIM = 7
    AGENT_INFO_WORKGROUP_MAX_SIZE = 8
    AGENT_INFO_GRID_MAX_DIM = 9
    AGENT_INFO_GRID_MAX_SIZE = 10
    AGENT_INFO_FBARRIER_MAX_SIZE = 11
    AGENT_INFO_QUEUES_MAX = 12
    AGENT_INFO_QUEUE_MIN_SIZE = 13
    AGENT_INFO_QUEUE_MAX_SIZE = 14
    AGENT_INFO_QUEUE_TYPE = 15
    AGENT_INFO_NODE = 16
    AGENT_INFO_DEVICE = 17
    AGENT_INFO_CACHE_SIZE = 18
    AGENT_INFO_ISA = 19
    AGENT_INFO_EXTENSIONS = 20
    AGENT_INFO_VERSION_MAJOR = 21
    AGENT_INFO_VERSION_MINOR = 22
end

@cenum ExceptionPolicy::UInt32 begin
    EXCEPTION_POLICY_BREAK = 1
    EXCEPTION_POLICY_DETECT = 2
end

@cenum CacheInfo::UInt32 begin
    CACHE_INFO_NAME_LENGTH = 0
    CACHE_INFO_NAME = 1
    CACHE_INFO_LEVEL = 2
    CACHE_INFO_SIZE = 3
end

@cenum SignalCondition::UInt32 begin
    SIGNAL_CONDITION_EQ = 0
    SIGNAL_CONDITION_NE = 1
    SIGNAL_CONDITION_LT = 2
    SIGNAL_CONDITION_GTE = 3
end

@cenum WaitState::UInt32 begin
    WAIT_STATE_BLOCKED = 0
    WAIT_STATE_ACTIVE = 1
end

@cenum QueueType::UInt32 begin
    QUEUE_TYPE_MULTI = 0
    QUEUE_TYPE_SINGLE = 1
end

@cenum QueueFeature::UInt32 begin
    QUEUE_FEATURE_KERNEL_DISPATCH = 1
    QUEUE_FEATURE_AGENT_DISPATCH = 2
end

@cenum PacketType::UInt32 begin
    PACKET_TYPE_VENDOR_SPECIFIC = 0
    PACKET_TYPE_INVALID = 1
    PACKET_TYPE_KERNEL_DISPATCH = 2
    PACKET_TYPE_BARRIER_AND = 3
    PACKET_TYPE_AGENT_DISPATCH = 4
    PACKET_TYPE_BARRIER_OR = 5
end

@cenum FenceScope::UInt32 begin
    FENCE_SCOPE_NONE = 0
    FENCE_SCOPE_AGENT = 1
    FENCE_SCOPE_SYSTEM = 2
end

@cenum PacketHeader::UInt32 begin
    PACKET_HEADER_TYPE = 0
    PACKET_HEADER_BARRIER = 8
    PACKET_HEADER_SCACQUIRE_FENCE_SCOPE = 9
    PACKET_HEADER_ACQUIRE_FENCE_SCOPE = 9
    PACKET_HEADER_SCRELEASE_FENCE_SCOPE = 11
    PACKET_HEADER_RELEASE_FENCE_SCOPE = 11
end

@cenum PacketHeaderWidth::UInt32 begin
    PACKET_HEADER_WIDTH_TYPE = 8
    PACKET_HEADER_WIDTH_BARRIER = 1
    PACKET_HEADER_WIDTH_SCACQUIRE_FENCE_SCOPE = 2
    PACKET_HEADER_WIDTH_ACQUIRE_FENCE_SCOPE = 2
    PACKET_HEADER_WIDTH_SCRELEASE_FENCE_SCOPE = 2
    PACKET_HEADER_WIDTH_RELEASE_FENCE_SCOPE = 2
end

@cenum KernelDispatchPacketSetup::UInt32 begin
    KERNEL_DISPATCH_PACKET_SETUP_DIMENSIONS = 0
end

@cenum KernelDispatchPacketSetupWidth::UInt32 begin
    KERNEL_DISPATCH_PACKET_SETUP_WIDTH_DIMENSIONS = 2
end

@cenum RegionSegment::UInt32 begin
    REGION_SEGMENT_GLOBAL = 0
    REGION_SEGMENT_READONLY = 1
    REGION_SEGMENT_PRIVATE = 2
    REGION_SEGMENT_GROUP = 3
    REGION_SEGMENT_KERNARG = 4
end

@cenum RegionGlobalFlag::UInt32 begin
    REGION_GLOBAL_FLAG_KERNARG = 1
    REGION_GLOBAL_FLAG_FINE_GRAINED = 2
    REGION_GLOBAL_FLAG_COARSE_GRAINED = 4
end

@cenum RegionInfo::UInt32 begin
    REGION_INFO_SEGMENT = 0
    REGION_INFO_GLOBAL_FLAGS = 1
    REGION_INFO_SIZE = 2
    REGION_INFO_ALLOC_MAX_SIZE = 4
    REGION_INFO_ALLOC_MAX_PRIVATE_WORKGROUP_SIZE = 8
    REGION_INFO_RUNTIME_ALLOC_ALLOWED = 5
    REGION_INFO_RUNTIME_ALLOC_GRANULE = 6
    REGION_INFO_RUNTIME_ALLOC_ALIGNMENT = 7
end

@cenum ISAInfo::UInt32 begin
    ISA_INFO_NAME_LENGTH = 0
    ISA_INFO_NAME = 1
    ISA_INFO_CALL_CONVENTION_COUNT = 2
    ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONT_SIZE = 3
    ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONTS_PER_COMPUTE_UNIT = 4
    ISA_INFO_MACHINE_MODELS = 5
    ISA_INFO_PROFILES = 6
    ISA_INFO_DEFAULT_FLOAT_ROUNDING_MODES = 7
    ISA_INFO_BASE_PROFILE_DEFAULT_FLOAT_ROUNDING_MODES = 8
    ISA_INFO_FAST_F16_OPERATION = 9
    ISA_INFO_WORKGROUP_MAX_DIM = 12
    ISA_INFO_WORKGROUP_MAX_SIZE = 13
    ISA_INFO_GRID_MAX_DIM = 14
    ISA_INFO_GRID_MAX_SIZE = 16
    ISA_INFO_FBARRIER_MAX_SIZE = 17
end

@cenum FPType::UInt32 begin
    FP_TYPE_16 = 1
    FP_TYPE_32 = 2
    FP_TYPE_64 = 4
end

@cenum FlushMode::UInt32 begin
    FLUSH_MODE_FTZ = 1
    FLUSH_MODE_NON_FTZ = 2
end

@cenum RoundMethod::UInt32 begin
    ROUND_METHOD_SINGLE = 1
    ROUND_METHOD_DOUBLE = 2
end

@cenum WavefrontInfo::UInt32 begin
    WAVEFRONT_INFO_SIZE = 0
end

@cenum ExecutableState::UInt32 begin
    EXECUTABLE_STATE_UNFROZEN = 0
    EXECUTABLE_STATE_FROZEN = 1
end

@cenum ExecutableInfo::UInt32 begin
    EXECUTABLE_INFO_PROFILE = 1
    EXECUTABLE_INFO_STATE = 2
    EXECUTABLE_INFO_DEFAULT_FLOAT_ROUNDING_MODE = 3
end

@cenum SymbolKind::UInt32 begin
    SYMBOL_KIND_VARIABLE = 0
    SYMBOL_KIND_KERNEL = 1
    SYMBOL_KIND_INDIRECT_FUNCTION = 2
end

@cenum SymbolLinkage::UInt32 begin
    SYMBOL_LINKAGE_MODULE = 0
    SYMBOL_LINKAGE_PROGRAM = 1
end

@cenum VariableAllocation::UInt32 begin
    VARIABLE_ALLOCATION_AGENT = 0
    VARIABLE_ALLOCATION_PROGRAM = 1
end

@cenum VariableSegment::UInt32 begin
    VARIABLE_SEGMENT_GLOBAL = 0
    VARIABLE_SEGMENT_READONLY = 1
end

@cenum ExecutableSymbolInfo::UInt32 begin
    EXECUTABLE_SYMBOL_INFO_TYPE = 0
    EXECUTABLE_SYMBOL_INFO_NAME_LENGTH = 1
    EXECUTABLE_SYMBOL_INFO_NAME = 2
    EXECUTABLE_SYMBOL_INFO_MODULE_NAME_LENGTH = 3
    EXECUTABLE_SYMBOL_INFO_MODULE_NAME = 4
    EXECUTABLE_SYMBOL_INFO_AGENT = 20
    EXECUTABLE_SYMBOL_INFO_VARIABLE_ADDRESS = 21
    EXECUTABLE_SYMBOL_INFO_LINKAGE = 5
    EXECUTABLE_SYMBOL_INFO_IS_DEFINITION = 17
    EXECUTABLE_SYMBOL_INFO_VARIABLE_ALLOCATION = 6
    EXECUTABLE_SYMBOL_INFO_VARIABLE_SEGMENT = 7
    EXECUTABLE_SYMBOL_INFO_VARIABLE_ALIGNMENT = 8
    EXECUTABLE_SYMBOL_INFO_VARIABLE_SIZE = 9
    EXECUTABLE_SYMBOL_INFO_VARIABLE_IS_CONST = 10
    EXECUTABLE_SYMBOL_INFO_KERNEL_OBJECT = 22
    EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE = 11
    EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT = 12
    EXECUTABLE_SYMBOL_INFO_KERNEL_GROUP_SEGMENT_SIZE = 13
    EXECUTABLE_SYMBOL_INFO_KERNEL_PRIVATE_SEGMENT_SIZE = 14
    EXECUTABLE_SYMBOL_INFO_KERNEL_DYNAMIC_CALLSTACK = 15
    EXECUTABLE_SYMBOL_INFO_KERNEL_CALL_CONVENTION = 18
    EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_OBJECT = 23
    EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION = 16
end

@cenum CodeObjectType::UInt32 begin
    CODE_OBJECT_TYPE_PROGRAM = 0
end

@cenum CodeObjectInfo::UInt32 begin
    CODE_OBJECT_INFO_VERSION = 0
    CODE_OBJECT_INFO_TYPE = 1
    CODE_OBJECT_INFO_ISA = 2
    CODE_OBJECT_INFO_MACHINE_MODEL = 3
    CODE_OBJECT_INFO_PROFILE = 4
    CODE_OBJECT_INFO_DEFAULT_FLOAT_ROUNDING_MODE = 5
end

@cenum CodeSymbolInfo::UInt32 begin
    CODE_SYMBOL_INFO_TYPE = 0
    CODE_SYMBOL_INFO_NAME_LENGTH = 1
    CODE_SYMBOL_INFO_NAME = 2
    CODE_SYMBOL_INFO_MODULE_NAME_LENGTH = 3
    CODE_SYMBOL_INFO_MODULE_NAME = 4
    CODE_SYMBOL_INFO_LINKAGE = 5
    CODE_SYMBOL_INFO_IS_DEFINITION = 17
    CODE_SYMBOL_INFO_VARIABLE_ALLOCATION = 6
    CODE_SYMBOL_INFO_VARIABLE_SEGMENT = 7
    CODE_SYMBOL_INFO_VARIABLE_ALIGNMENT = 8
    CODE_SYMBOL_INFO_VARIABLE_SIZE = 9
    CODE_SYMBOL_INFO_VARIABLE_IS_CONST = 10
    CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE = 11
    CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT = 12
    CODE_SYMBOL_INFO_KERNEL_GROUP_SEGMENT_SIZE = 13
    CODE_SYMBOL_INFO_KERNEL_PRIVATE_SEGMENT_SIZE = 14
    CODE_SYMBOL_INFO_KERNEL_DYNAMIC_CALLSTACK = 15
    CODE_SYMBOL_INFO_KERNEL_CALL_CONVENTION = 18
    CODE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION = 16
end

@cenum KernelCodeVersion::UInt32 begin
    KERNEL_CODE_VERSION_MAJOR = 1
    KERNEL_CODE_VERSION_MINOR = 1
end

@cenum MachineKind::UInt16 begin
    MACHINE_KIND_UNDEFINED = 0
    MACHINE_KIND_AMDGPU = 1
end

@cenum FloatRoundMode::UInt16 begin
    FLOAT_ROUND_MODE_NEAREST_EVEN = 0
    FLOAT_ROUND_MODE_PLUS_INFINITY = 1
    FLOAT_ROUND_MODE_MINUS_INFINITY = 2
    FLOAT_ROUND_MODE_ZERO = 3
end

@cenum FloatDenormMode::UInt32 begin
    FLOAT_DENORM_MODE_FLUSH_SOURCE_OUTPUT = 0
    FLOAT_DENORM_MODE_FLUSH_OUTPUT = 1
    FLOAT_DENORM_MODE_FLUSH_SOURCE = 2
    FLOAT_DENORM_MODE_NO_FLUSH = 3
end

@cenum ComputePgmRsrcOne::UInt32 begin
    COMPUTE_PGM_RSRC_ONE_GRANULATED_WORKITEM_VGPR_COUNT_SHIFT = 0
    COMPUTE_PGM_RSRC_ONE_GRANULATED_WORKITEM_VGPR_COUNT_WIDTH = 6
    COMPUTE_PGM_RSRC_ONE_GRANULATED_WORKITEM_VGPR_COUNT = 63
    COMPUTE_PGM_RSRC_ONE_GRANULATED_WAVEFRONT_SGPR_COUNT_SHIFT = 6
    COMPUTE_PGM_RSRC_ONE_GRANULATED_WAVEFRONT_SGPR_COUNT_WIDTH = 4
    COMPUTE_PGM_RSRC_ONE_GRANULATED_WAVEFRONT_SGPR_COUNT = 960
    COMPUTE_PGM_RSRC_ONE_PRIORITY_SHIFT = 10
    COMPUTE_PGM_RSRC_ONE_PRIORITY_WIDTH = 2
    COMPUTE_PGM_RSRC_ONE_PRIORITY = 3072
    COMPUTE_PGM_RSRC_ONE_FLOAT_ROUND_MODE_32_SHIFT = 12
    COMPUTE_PGM_RSRC_ONE_FLOAT_ROUND_MODE_32_WIDTH = 2
    COMPUTE_PGM_RSRC_ONE_FLOAT_ROUND_MODE_32 = 12288
    COMPUTE_PGM_RSRC_ONE_FLOAT_ROUND_MODE_16_64_SHIFT = 14
    COMPUTE_PGM_RSRC_ONE_FLOAT_ROUND_MODE_16_64_WIDTH = 2
    COMPUTE_PGM_RSRC_ONE_FLOAT_ROUND_MODE_16_64 = 49152
    COMPUTE_PGM_RSRC_ONE_FLOAT_DENORM_MODE_32_SHIFT = 16
    COMPUTE_PGM_RSRC_ONE_FLOAT_DENORM_MODE_32_WIDTH = 2
    COMPUTE_PGM_RSRC_ONE_FLOAT_DENORM_MODE_32 = 196608
    COMPUTE_PGM_RSRC_ONE_FLOAT_DENORM_MODE_16_64_SHIFT = 18
    COMPUTE_PGM_RSRC_ONE_FLOAT_DENORM_MODE_16_64_WIDTH = 2
    COMPUTE_PGM_RSRC_ONE_FLOAT_DENORM_MODE_16_64 = 786432
    COMPUTE_PGM_RSRC_ONE_PRIV_SHIFT = 20
    COMPUTE_PGM_RSRC_ONE_PRIV_WIDTH = 1
    COMPUTE_PGM_RSRC_ONE_PRIV = 1048576
    COMPUTE_PGM_RSRC_ONE_ENABLE_DX10_CLAMP_SHIFT = 21
    COMPUTE_PGM_RSRC_ONE_ENABLE_DX10_CLAMP_WIDTH = 1
    COMPUTE_PGM_RSRC_ONE_ENABLE_DX10_CLAMP = 2097152
    COMPUTE_PGM_RSRC_ONE_DEBUG_MODE_SHIFT = 22
    COMPUTE_PGM_RSRC_ONE_DEBUG_MODE_WIDTH = 1
    COMPUTE_PGM_RSRC_ONE_DEBUG_MODE = 4194304
    COMPUTE_PGM_RSRC_ONE_ENABLE_IEEE_MODE_SHIFT = 23
    COMPUTE_PGM_RSRC_ONE_ENABLE_IEEE_MODE_WIDTH = 1
    COMPUTE_PGM_RSRC_ONE_ENABLE_IEEE_MODE = 8388608
    COMPUTE_PGM_RSRC_ONE_BULKY_SHIFT = 24
    COMPUTE_PGM_RSRC_ONE_BULKY_WIDTH = 1
    COMPUTE_PGM_RSRC_ONE_BULKY = 16777216
    COMPUTE_PGM_RSRC_ONE_CDBG_USER_SHIFT = 25
    COMPUTE_PGM_RSRC_ONE_CDBG_USER_WIDTH = 1
    COMPUTE_PGM_RSRC_ONE_CDBG_USER = 33554432
    COMPUTE_PGM_RSRC_ONE_RESERVED1_SHIFT = 26
    COMPUTE_PGM_RSRC_ONE_RESERVED1_WIDTH = 6
    #AMD_COMPUTE_PGM_RSRC_ONE_RESERVED1 = -67108864
end

@cenum SystemVGPRWorkitemID::UInt32 begin
    SYSTEM_VGPR_WORKITEM_ID_X = 0
    SYSTEM_VGPR_WORKITEM_ID_X_Y = 1
    SYSTEM_VGPR_WORKITEM_ID_X_Y_Z = 2
    SYSTEM_VGPR_WORKITEM_ID_UNDEFINED = 3
end

@cenum ComputePgmRsrcTwo::UInt32 begin
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_PRIVATE_SEGMENT_WAVE_BYTE_OFFSET_SHIFT = 0
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_PRIVATE_SEGMENT_WAVE_BYTE_OFFSET_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_PRIVATE_SEGMENT_WAVE_BYTE_OFFSET = 1
    COMPUTE_PGM_RSRC_TWO_USER_SGPR_COUNT_SHIFT = 1
    COMPUTE_PGM_RSRC_TWO_USER_SGPR_COUNT_WIDTH = 5
    COMPUTE_PGM_RSRC_TWO_USER_SGPR_COUNT = 62
    COMPUTE_PGM_RSRC_TWO_ENABLE_TRAP_HANDLER_SHIFT = 6
    COMPUTE_PGM_RSRC_TWO_ENABLE_TRAP_HANDLER_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_TRAP_HANDLER = 64
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_ID_X_SHIFT = 7
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_ID_X_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_ID_X = 128
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_ID_Y_SHIFT = 8
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_ID_Y_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_ID_Y = 256
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_ID_Z_SHIFT = 9
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_ID_Z_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_ID_Z = 512
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_INFO_SHIFT = 10
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_INFO_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_INFO = 1024
    COMPUTE_PGM_RSRC_TWO_ENABLE_VGPR_WORKITEM_ID_SHIFT = 11
    COMPUTE_PGM_RSRC_TWO_ENABLE_VGPR_WORKITEM_ID_WIDTH = 2
    COMPUTE_PGM_RSRC_TWO_ENABLE_VGPR_WORKITEM_ID = 6144
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_ADDRESS_WATCH_SHIFT = 13
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_ADDRESS_WATCH_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_ADDRESS_WATCH = 8192
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_MEMORY_VIOLATION_SHIFT = 14
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_MEMORY_VIOLATION_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_MEMORY_VIOLATION = 16384
    COMPUTE_PGM_RSRC_TWO_GRANULATED_LDS_SIZE_SHIFT = 15
    COMPUTE_PGM_RSRC_TWO_GRANULATED_LDS_SIZE_WIDTH = 9
    COMPUTE_PGM_RSRC_TWO_GRANULATED_LDS_SIZE = 16744448
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_INVALID_OPERATION_SHIFT = 24
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_INVALID_OPERATION_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_INVALID_OPERATION = 16777216
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_FP_DENORMAL_SOURCE_SHIFT = 25
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_FP_DENORMAL_SOURCE_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_FP_DENORMAL_SOURCE = 33554432
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_DIVISION_BY_ZERO_SHIFT = 26
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_DIVISION_BY_ZERO_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_DIVISION_BY_ZERO = 67108864
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_OVERFLOW_SHIFT = 27
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_OVERFLOW_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_OVERFLOW = 134217728
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_UNDERFLOW_SHIFT = 28
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_UNDERFLOW_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_UNDERFLOW = 268435456
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_INEXACT_SHIFT = 29
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_INEXACT_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_IEEE_754_FP_INEXACT = 536870912
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_INT_DIVISION_BY_ZERO_SHIFT = 30
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_INT_DIVISION_BY_ZERO_WIDTH = 1
    COMPUTE_PGM_RSRC_TWO_ENABLE_EXCEPTION_INT_DIVISION_BY_ZERO = 1073741824
    COMPUTE_PGM_RSRC_TWO_RESERVED1_SHIFT = 31
    COMPUTE_PGM_RSRC_TWO_RESERVED1_WIDTH = 1
    #AMD_COMPUTE_PGM_RSRC_TWO_RESERVED1 = -2147483648
end

@cenum ElementByteSize::UInt32 begin
    ELEMENT_BYTE_SIZE_2 = 0
    ELEMENT_BYTE_SIZE_4 = 1
    ELEMENT_BYTE_SIZE_8 = 2
    ELEMENT_BYTE_SIZE_16 = 3
end

@cenum KernelCodeProperties::UInt32 begin
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_PRIVATE_SEGMENT_BUFFER_SHIFT = 0
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_PRIVATE_SEGMENT_BUFFER_WIDTH = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_PRIVATE_SEGMENT_BUFFER = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_DISPATCH_PTR_SHIFT = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_DISPATCH_PTR_WIDTH = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_DISPATCH_PTR = 2
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_QUEUE_PTR_SHIFT = 2
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_QUEUE_PTR_WIDTH = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_QUEUE_PTR = 4
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_KERNARG_SEGMENT_PTR_SHIFT = 3
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_KERNARG_SEGMENT_PTR_WIDTH = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_KERNARG_SEGMENT_PTR = 8
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_DISPATCH_ID_SHIFT = 4
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_DISPATCH_ID_WIDTH = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_DISPATCH_ID = 16
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_FLAT_SCRATCH_INIT_SHIFT = 5
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_FLAT_SCRATCH_INIT_WIDTH = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_FLAT_SCRATCH_INIT = 32
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_PRIVATE_SEGMENT_SIZE_SHIFT = 6
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_PRIVATE_SEGMENT_SIZE_WIDTH = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_PRIVATE_SEGMENT_SIZE = 64
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_GRID_WORKGROUP_COUNT_X_SHIFT = 7
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_GRID_WORKGROUP_COUNT_X_WIDTH = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_GRID_WORKGROUP_COUNT_X = 128
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_GRID_WORKGROUP_COUNT_Y_SHIFT = 8
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_GRID_WORKGROUP_COUNT_Y_WIDTH = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_GRID_WORKGROUP_COUNT_Y = 256
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_GRID_WORKGROUP_COUNT_Z_SHIFT = 9
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_GRID_WORKGROUP_COUNT_Z_WIDTH = 1
    KERNEL_CODE_PROPERTIES_ENABLE_SGPR_GRID_WORKGROUP_COUNT_Z = 512
    KERNEL_CODE_PROPERTIES_RESERVED1_SHIFT = 10
    KERNEL_CODE_PROPERTIES_RESERVED1_WIDTH = 6
    KERNEL_CODE_PROPERTIES_RESERVED1 = 64512
    KERNEL_CODE_PROPERTIES_ENABLE_ORDERED_APPEND_GDS_SHIFT = 16
    KERNEL_CODE_PROPERTIES_ENABLE_ORDERED_APPEND_GDS_WIDTH = 1
    KERNEL_CODE_PROPERTIES_ENABLE_ORDERED_APPEND_GDS = 65536
    KERNEL_CODE_PROPERTIES_PRIVATE_ELEMENT_SIZE_SHIFT = 17
    KERNEL_CODE_PROPERTIES_PRIVATE_ELEMENT_SIZE_WIDTH = 2
    KERNEL_CODE_PROPERTIES_PRIVATE_ELEMENT_SIZE = 393216
    KERNEL_CODE_PROPERTIES_IS_PTR64_SHIFT = 19
    KERNEL_CODE_PROPERTIES_IS_PTR64_WIDTH = 1
    KERNEL_CODE_PROPERTIES_IS_PTR64 = 524288
    KERNEL_CODE_PROPERTIES_IS_DYNAMIC_CALLSTACK_SHIFT = 20
    KERNEL_CODE_PROPERTIES_IS_DYNAMIC_CALLSTACK_WIDTH = 1
    KERNEL_CODE_PROPERTIES_IS_DYNAMIC_CALLSTACK = 1048576
    KERNEL_CODE_PROPERTIES_IS_DEBUG_ENABLED_SHIFT = 21
    KERNEL_CODE_PROPERTIES_IS_DEBUG_ENABLED_WIDTH = 1
    KERNEL_CODE_PROPERTIES_IS_DEBUG_ENABLED = 2097152
    KERNEL_CODE_PROPERTIES_IS_XNACK_ENABLED_SHIFT = 22
    KERNEL_CODE_PROPERTIES_IS_XNACK_ENABLED_WIDTH = 1
    KERNEL_CODE_PROPERTIES_IS_XNACK_ENABLED = 4194304
    KERNEL_CODE_PROPERTIES_RESERVED2_SHIFT = 23
    KERNEL_CODE_PROPERTIES_RESERVED2_WIDTH = 9
    #KERNEL_CODE_PROPERTIES_RESERVED2 = -8388608
end

@cenum PowerTwo::UInt8 begin
    POWERTWO_1 = 0
    POWERTWO_2 = 1
    POWERTWO_4 = 2
    POWERTWO_8 = 3
    POWERTWO_16 = 4
    POWERTWO_32 = 5
    POWERTWO_64 = 6
    POWERTWO_128 = 7
    POWERTWO_256 = 8
end

@cenum EnabledControlDirective::UInt64 begin
    ENABLE_BREAK_EXCEPTIONS = 1
    ENABLE_DETECT_EXCEPTIONS = 2
    MAX_DYNAMIC_GROUP_SIZE = 4
    MAX_FLAT_GRID_SIZE = 8
    MAX_FLAT_WORKGROUP_SIZE = 16
    REQUIRED_DIM = 32
    REQUIRED_GRID_SIZE = 64
    REQUIRED_WORKGROUP_SIZE = 128
    REQUIRE_NO_PARTIAL_WORKGROUPS = 256
end

@cenum ExceptionKind::UInt16 begin
    EXCEPTION_KIND_INVALID_OPERATION = 1
    EXCEPTION_KIND_DIVISION_BY_ZERO = 2
    EXCEPTION_KIND_OVERFLOW = 4
    EXCEPTION_KIND_UNDERFLOW = 8
    EXCEPTION_KIND_INEXACT = 16
end

@cenum QueueProperties::UInt32 begin
    QUEUE_PROPERTIES_ENABLE_TRAP_HANDLER_SHIFT = 0
    QUEUE_PROPERTIES_ENABLE_TRAP_HANDLER_WIDTH = 1
    QUEUE_PROPERTIES_ENABLE_TRAP_HANDLER = 1
    QUEUE_PROPERTIES_IS_PTR64_SHIFT = 1
    QUEUE_PROPERTIES_IS_PTR64_WIDTH = 1
    QUEUE_PROPERTIES_IS_PTR64 = 2
    QUEUE_PROPERTIES_ENABLE_TRAP_HANDLER_DEBUG_SGPRS_SHIFT = 2
    QUEUE_PROPERTIES_ENABLE_TRAP_HANDLER_DEBUG_SGPRS_WIDTH = 1
    QUEUE_PROPERTIES_ENABLE_TRAP_HANDLER_DEBUG_SGPRS = 4
    QUEUE_PROPERTIES_ENABLE_PROFILING_SHIFT = 3
    QUEUE_PROPERTIES_ENABLE_PROFILING_WIDTH = 1
    QUEUE_PROPERTIES_ENABLE_PROFILING = 8
    QUEUE_PROPERTIES_USE_SCRATCH_ONCE_SHIFT = 4
    QUEUE_PROPERTIES_USE_SCRATCH_ONCE_WIDTH = 1
    QUEUE_PROPERTIES_USE_SCRATCH_ONCE = 16
    QUEUE_PROPERTIES__RESERVED1_SHIFT = 5
    QUEUE_PROPERTIES__RESERVED1_WIDTH = 27
    #_RESERVED1 = -32
end

@cenum SignalKind::Int64 begin
    SIGNAL_KIND_INVALID = 0
    SIGNAL_KIND_USER = 1
    SIGNAL_KIND_DOORBELL = -1
    SIGNAL_KIND_LEGACY_DOORBELL = -2
end

@cenum ImageChannelType::UInt8 begin
   IMAGE_CHANNEL_TYPE_SNORM_INT8 = 0
   IMAGE_CHANNEL_TYPE_SNORM_INT16 = 1
   IMAGE_CHANNEL_TYPE_UNORM_INT8 = 2
   IMAGE_CHANNEL_TYPE_UNORM_INT16 = 3
   IMAGE_CHANNEL_TYPE_UNORM_INT24 = 4
   IMAGE_CHANNEL_TYPE_SHORT_555 = 5
   IMAGE_CHANNEL_TYPE_SHORT_565 = 6
   IMAGE_CHANNEL_TYPE_INT_101010 = 7
   IMAGE_CHANNEL_TYPE_SIGNED_INT8 = 8
   IMAGE_CHANNEL_TYPE_SIGNED_INT16 = 9
   IMAGE_CHANNEL_TYPE_SIGNED_INT32 = 10
   IMAGE_CHANNEL_TYPE_UNSIGNED_INT8 = 11
   IMAGE_CHANNEL_TYPE_UNSIGNED_INT16 = 12
   IMAGE_CHANNEL_TYPE_UNSIGNED_INT32 = 13
   IMAGE_CHANNEL_TYPE_HALF_FLOAT = 14
   IMAGE_CHANNEL_TYPE_FLOAT = 15
end

@cenum ImageCapability::UInt32 begin
    IMAGE_CAPABILITY_NOT_SUPPORTED = 0
    IMAGE_CAPABILITY_READ_ONLY = 1
    IMAGE_CAPABILITY_WRITE_ONLY = 2
    IMAGE_CAPABILITY_READ_WRITE = 4
    IMAGE_CAPABILITY_READ_MODIFY_WRITE = 8
    IMAGE_CAPABILITY_ACCESS_INVARIANT_DATA_LAYOUT = 16
end

@cenum ImageDataLayout::UInt32 begin
    IMAGE_DATA_LAYOUT_OPAQUE = 0
    IMAGE_DATA_LAYOUT_LINEAR = 1
end

@cenum SamplerAddressingMode::UInt32 begin
    SAMPLER_ADDRESSING_MODE_UNDEFINED = 0
    SAMPLER_ADDRESSING_MODE_CLAMP_TO_EDGE = 1
    SAMPLER_ADDRESSING_MODE_CLAMP_TO_BORDER = 2
    SAMPLER_ADDRESSING_MODE_REPEAT = 3
    SAMPLER_ADDRESSING_MODE_MIRRORED_REPEAT = 4
end

@cenum SamplerCoordinateMode::UInt32 begin
    SAMPLER_COORDINATE_MODE_UNNORMALIZED = 0
    SAMPLER_COORDINATE_MODE_NORMALIZED = 1
end

@cenum SamplerFilterMode::UInt32 begin
    SAMPLER_FILTER_MODE_NEAREST = 0
    SAMPLER_FILTER_MODE_LINEAR = 1
end

@cenum AMDAgentInfo::UInt32 begin
    AMD_AGENT_INFO_CHIP_ID = 40960
    AMD_AGENT_INFO_CACHELINE_SIZE = 40961
    AMD_AGENT_INFO_COMPUTE_UNIT_COUNT = 40962
    AMD_AGENT_INFO_MAX_CLOCK_FREQUENCY = 40963
    AMD_AGENT_INFO_DRIVER_NODE_ID = 40964
    AMD_AGENT_INFO_MAX_ADDRESS_WATCH_POINTS = 40965
    AMD_AGENT_INFO_BDFID = 40966
    AMD_AGENT_INFO_MEMORY_WIDTH = 40967
    AMD_AGENT_INFO_MEMORY_MAX_FREQUENCY = 40968
    AMD_AGENT_INFO_PRODUCT_NAME = 40969
    AMD_AGENT_INFO_MAX_WAVES_PER_CU = 40970
    AMD_AGENT_INFO_NUM_SIMDS_PER_CU = 40971
    AMD_AGENT_INFO_NUM_SHADER_ENGINES = 40972
    AMD_AGENT_INFO_NUM_SHADER_ARRAYS_PER_SE = 40973
    AMD_AGENT_INFO_HDP_FLUSH = 40974
    AMD_AGENT_INFO_DOMAIN = 40975
end

@cenum AMDRegionInfo::UInt32 begin
    AMD_REGION_INFO_HOST_ACCESSIBLE = 40960
    AMD_REGION_INFO_BASE = 40961
    AMD_REGION_INFO_BUS_WIDTH = 40962
    AMD_REGION_INFO_MAX_CLOCK_FREQUENCY = 40963
end

@cenum CoherencyType::UInt32 begin
    COHERENCY_TYPE_COHERENT = 0
    COHERENCY_TYPE_NONCOHERENT = 1
end

@cenum AMDSignalAttribute::UInt32 begin
    AMD_SIGNAL_AMD_GPU_ONLY = 1
    AMD_SIGNAL_IPC = 2
end

@cenum Segment::UInt32 begin
    SEGMENT_GLOBAL = 0
    SEGMENT_READONLY = 1
    SEGMENT_PRIVATE = 2
    SEGMENT_GROUP = 3
end

@cenum MemoryPoolGlobalFlag::UInt32 begin
    MEMORY_POOL_GLOBAL_FLAG_KERNARG_INIT = 1
    MEMORY_POOL_GLOBAL_FLAG_FINE_GRAINED = 2
    MEMORY_POOL_GLOBAL_FLAG_COARSE_GRAINED = 4
end

@cenum MemoryPoolInfo::UInt32 begin
    MEMORY_POOL_INFO_SEGMENT = 0
    MEMORY_POOL_INFO_GLOBAL_FLAGS = 1
    MEMORY_POOL_INFO_SIZE = 2
    MEMORY_POOL_INFO_RUNTIME_ALLOC_ALLOWED = 5
    MEMORY_POOL_INFO_RUNTIME_ALLOC_GRANULE = 6
    MEMORY_POOL_INFO_RUNTIME_ALLOC_ALIGNMENT = 7
    MEMORY_POOL_INFO_ACCESSIBLE_BY_ALL = 15
    MEMORY_POOL_INFO_ALLOC_MAX_SIZE = 16
end

@cenum CopyDirection::UInt32 begin
    HostToHost = 0
    HostToDevice = 1
    DeviceToHost = 2
    DeviceToDevice = 3
end

@cenum MemoryPoolAccess::UInt32 begin
    MEMORY_POOL_ACCESS_NEVER_ALLOWED = 0
    MEMORY_POOL_ACCESS_ALLOWED_BY_DEFAULT = 1
    MEMORY_POOL_ACCESS_DISALLOWED_BY_DEFAULT = 2
end

@cenum LinkInfoType::UInt32 begin
    LINK_INFO_TYPE_HYPERTRANSPORT = 0
    LINK_INFO_TYPE_QPI = 1
    LINK_INFO_TYPE_PCIE = 2
    LINK_INFO_TYPE_INFINBAND = 3
    LINK_INFO_TYPE_XGMI = 4
end

@cenum AgentMemoryPoolInfo::UInt32 begin
    AGENT_MEMORY_POOL_INFO_ACCESS = 0
    AGENT_MEMORY_POOL_INFO_NUM_LINK_HOPS = 1
    AGENT_MEMORY_POOL_INFO_LINK_INFO = 2
end

@cenum PointerType::UInt32 begin
    POINTER_TYPE_UNKNOWN = 0
    POINTER_TYPE_HSA = 1
    POINTER_TYPE_LOCKED = 2
    POINTER_TYPE_GRAPHICS = 3
    POINTER_TYPE_IPC = 4
end

@cenum AMDEventType::UInt32 begin
    AMD_GPU_MEMORY_FAULT_EVENT = 0
end

@cenum MemoryFaultReason::Int32 begin
    MEMORY_FAULT_PAGE_NOT_PRESENT = 1
    MEMORY_FAULT_READ_ONLY = 2
    MEMORY_FAULT_NX = 4
    MEMORY_FAULT_HOST_ONLY = 8
    MEMORY_FAULT_DRAM_ECC = 16
    MEMORY_FAULT_IMPRECISE = 32
    MEMORY_FAULT_SRAM_ECC = 64
    MEMORY_FAULT_HANG = -2147483648
end

@cenum QueuePriority::UInt32 begin
    QUEUE_PRIORITY_LOW = 0
    QUEUE_PRIORITY_NORMAL = 1
    QUEUE_PRIORITY_HIGH = 2
end

@cenum WaveAction::UInt32 begin
    WAVE_ACTION_HALT = 1
    WAVE_ACTION_RESUME = 2
    WAVE_ACTION_KILL = 3
    WAVE_ACTION_DEBUG = 4
    WAVE_ACTION_TRAP = 5
    WAVE_ACTION_MAX = 6
end

@cenum HostAction::UInt32 begin
    HOST_ACTION_IGNORE = 1
    HOST_ACTION_EXIT = 2
    HOST_ACTION_NOTIFY = 4
end

@cenum WaveMode::UInt32 begin
    WAVE_MODE_SINGLE = 0
    WAVE_MODE_BROADCAST_PROCESS = 2
    WAVE_MODE_BROADCAST_PROCESS_CU = 3
    WAVE_MODE_MAX = 4
end

@cenum TrapType::UInt32 begin
    DEBUG_TRAP = 1
    MAX_TRAP = 2
end

@cenum AddressWatchMode::UInt32 begin
    ADDRESS_WATCH_READ = 0
    ADDRESS_WATCH_NON_READ = 1
    ADDRESS_WATCH_ATOMIC = 2
    ADDRESS_WATCH_ALL = 3
    ADDRESS_WATCH_NUM = 4
end

@cenum EventWaitStatus::UInt32 begin
    EVENT_WAIT_SUCCESS = 0
    EVENT_WAIT_ERROR = 4096
    EVENT_WAIT_TIMEOUT = 81923
end

@cenum ProgramInfo::UInt32 begin
    PROGRAM_INFO_MACHINE_MODEL = 0
    PROGRAM_INFO_PROFILE = 1
    PROGRAM_INFO_DEFAULT_FLOAT_ROUNDING_MODE = 2
end

@cenum FinalizerCallConvention::Int32 begin
    FINALIZER_CALL_CONVENTION_AUTO = -1
end

@cenum AQLProfileEventType::UInt32 begin
    AQLPROFILE_EVENT_TYPE_PMC = 0
    AQLPROFILE_EVENT_TYPE_SQTT = 1
end

@cenum AQLProfileBlockName::UInt32 begin
    AQLPROFILE_BLOCK_NAME_CPC = 0
    AQLPROFILE_BLOCK_NAME_CPF = 1
    AQLPROFILE_BLOCK_NAME_GDS = 2
    AQLPROFILE_BLOCK_NAME_GRBM = 3
    AQLPROFILE_BLOCK_NAME_GRBMSE = 4
    AQLPROFILE_BLOCK_NAME_SPI = 5
    AQLPROFILE_BLOCK_NAME_SQ = 6
    AQLPROFILE_BLOCK_NAME_SQCS = 7
    AQLPROFILE_BLOCK_NAME_SRBM = 8
    AQLPROFILE_BLOCK_NAME_SX = 9
    AQLPROFILE_BLOCK_NAME_TA = 10
    AQLPROFILE_BLOCK_NAME_TCA = 11
    AQLPROFILE_BLOCK_NAME_TCC = 12
    AQLPROFILE_BLOCK_NAME_TCP = 13
    AQLPROFILE_BLOCK_NAME_TD = 14
    AQLPROFILE_BLOCK_NAME_MCARB = 15
    AQLPROFILE_BLOCK_NAME_MCHUB = 16
    AQLPROFILE_BLOCK_NAME_MCMCBVM = 17
    AQLPROFILE_BLOCK_NAME_MCSEQ = 18
    AQLPROFILE_BLOCK_NAME_MCVML2 = 19
    AQLPROFILE_BLOCK_NAME_MCXBAR = 20
    AQLPROFILE_BLOCK_NAME_ATC = 21
    AQLPROFILE_BLOCK_NAME_ATCL2 = 22
    AQLPROFILE_BLOCK_NAME_GCEA = 23
    AQLPROFILE_BLOCK_NAME_RPB = 24
    AQLPROFILE_BLOCK_NAME_SDMA = 25
    AQLPROFILE_BLOCKS_NUMBER = 26
end

@cenum AQLProfileParameterName::UInt32 begin
    AQLPROFILE_PARAMETER_NAME_COMPUTE_UNIT_TARGET = 0
    AQLPROFILE_PARAMETER_NAME_VM_ID_MASK = 1
    AQLPROFILE_PARAMETER_NAME_MASK = 2
    AQLPROFILE_PARAMETER_NAME_TOKEN_MASK = 3
    AQLPROFILE_PARAMETER_NAME_TOKEN_MASK2 = 4
    AQLPROFILE_PARAMETER_NAME_SE_MASK = 5
    AQLPROFILE_PARAMETER_NAME_SAMPLE_RATE = 6
end

@cenum AQLProfileInfoType::UInt32 begin
    AQLPROFILE_INFO_COMMAND_BUFFER_SIZE = 0
    AQLPROFILE_INFO_PMC_DATA_SIZE = 1
    AQLPROFILE_INFO_PMC_DATA = 2
    AQLPROFILE_INFO_SQTT_DATA = 3
    AQLPROFILE_INFO_BLOCK_COUNTERS = 4
    AQLPROFILE_INFO_BLOCK_ID = 5
    AQLPROFILE_INFO_ENABLE_CMD = 6
end

@cenum CodeObjectStorageType::UInt32 begin
    CODE_OBJECT_STORAGE_TYPE_NONE = 0
    CODE_OBJECT_STORAGE_TYPE_FILE = 1
    CODE_OBJECT_STORAGE_TYPE_MEMORY = 2
end

@cenum LoadedCodeObjectKind::UInt32 begin
    LOADED_CODE_OBJECT_KIND_PROGRAM = 1
    LOADED_CODE_OBJECT_KIND_AGENT = 2
end

@cenum LoadedCodeObjectInfo::UInt32 begin
    LOADED_CODE_OBJECT_INFO_EXECUTABLE = 1
    LOADED_CODE_OBJECT_INFO_KIND = 2
    LOADED_CODE_OBJECT_INFO_AGENT = 3
    LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_TYPE = 4
    LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_MEMORY_BASE = 5
    LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_MEMORY_SIZE = 6
    LOADED_CODE_OBJECT_INFO_CODE_OBJECT_STORAGE_FILE = 7
    LOADED_CODE_OBJECT_INFO_LOAD_DELTA = 8
    LOADED_CODE_OBJECT_INFO_LOAD_BASE = 9
    LOADED_CODE_OBJECT_INFO_LOAD_SIZE = 10
end

