Skip to main content

rocm_sys/hiprtc/
types.rs

1/* automatically generated by rust-bindgen 0.73.2 */
2
3#[repr(u32)]
4#[doc = " hipJitOption"]
5#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6pub enum hipJitOption {
7    #[doc = "< CUDA Only Maximum registers may be used in a thread,\n< passed to compiler"]
8    hipJitOptionMaxRegisters = 0,
9    #[doc = "< CUDA Only Number of thread per block"]
10    hipJitOptionThreadsPerBlock = 1,
11    #[doc = "< CUDA Only Value for total wall clock time"]
12    hipJitOptionWallTime = 2,
13    #[doc = "< CUDA Only Pointer to the buffer with logged information"]
14    hipJitOptionInfoLogBuffer = 3,
15    #[doc = "< CUDA Only Size of the buffer in bytes for logged info"]
16    hipJitOptionInfoLogBufferSizeBytes = 4,
17    #[doc = "< CUDA Only Pointer to the buffer with logged error(s)"]
18    hipJitOptionErrorLogBuffer = 5,
19    #[doc = "< CUDA Only Size of the buffer in bytes for logged\n< error(s)"]
20    hipJitOptionErrorLogBufferSizeBytes = 6,
21    #[doc = "< Value of optimization level for generated codes, acceptable\n< options -O0, -O1, -O2, -O3"]
22    hipJitOptionOptimizationLevel = 7,
23    #[doc = "< CUDA Only The target context, which is the default"]
24    hipJitOptionTargetFromContext = 8,
25    #[doc = "< CUDA Only JIT target"]
26    hipJitOptionTarget = 9,
27    #[doc = "< CUDA Only Fallback strategy"]
28    hipJitOptionFallbackStrategy = 10,
29    #[doc = "< CUDA Only Generate debug information"]
30    hipJitOptionGenerateDebugInfo = 11,
31    #[doc = "< CUDA Only Generate log verbose"]
32    hipJitOptionLogVerbose = 12,
33    #[doc = "< CUDA Only Generate line number information"]
34    hipJitOptionGenerateLineInfo = 13,
35    #[doc = "< CUDA Only Set cache mode"]
36    hipJitOptionCacheMode = 14,
37    #[doc = "< @deprecated CUDA Only New SM3X option."]
38    hipJitOptionSm3xOpt = 15,
39    #[doc = "< CUDA Only Set fast compile"]
40    hipJitOptionFastCompile = 16,
41    #[doc = "< CUDA Only Array of device symbol names to be relocated to the\n< host"]
42    hipJitOptionGlobalSymbolNames = 17,
43    #[doc = "< CUDA Only Array of host addresses to be relocated to the\n< device"]
44    hipJitOptionGlobalSymbolAddresses = 18,
45    #[doc = "< CUDA Only Number of symbol count."]
46    hipJitOptionGlobalSymbolCount = 19,
47    #[doc = "< @deprecated CUDA Only Enable link-time optimization for device code"]
48    hipJitOptionLto = 20,
49    #[doc = "< @deprecated CUDA Only Set single-precision denormals."]
50    hipJitOptionFtz = 21,
51    #[doc = "< @deprecated CUDA Only Set single-precision floating-point division\n< and reciprocals"]
52    hipJitOptionPrecDiv = 22,
53    #[doc = "< @deprecated CUDA Only Set single-precision floating-point square root"]
54    hipJitOptionPrecSqrt = 23,
55    #[doc = "< @deprecated CUDA Only Enable floating-point multiplies and\n< adds/subtracts operations"]
56    hipJitOptionFma = 24,
57    #[doc = "< CUDA Only Generates Position Independent code"]
58    hipJitOptionPositionIndependentCode = 25,
59    #[doc = "< CUDA Only Hints to JIT compiler the minimum number of CTAs frin\n< kernel's grid to be mapped to SM"]
60    hipJitOptionMinCTAPerSM = 26,
61    #[doc = "< CUDA only Maximum number of threads in a thread block"]
62    hipJitOptionMaxThreadsPerBlock = 27,
63    #[doc = "< Cuda only Override Directive values"]
64    hipJitOptionOverrideDirectiveValues = 28,
65    #[doc = "< Number of options"]
66    hipJitOptionNumOptions = 29,
67    #[doc = "< Hip Only Linker options to be passed on to compiler"]
68    hipJitOptionIRtoISAOptExt = 10000,
69    #[doc = "< Hip Only Count of linker options to be passed on to compiler"]
70    hipJitOptionIRtoISAOptCountExt = 10001,
71}
72#[repr(u32)]
73#[doc = " hipJitInputType"]
74#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
75pub enum hipJitInputType {
76    #[doc = "< Cuda only Input cubin"]
77    hipJitInputCubin = 0,
78    #[doc = "< Cuda only Input PTX"]
79    hipJitInputPtx = 1,
80    #[doc = "< Cuda Only Input FAT Binary"]
81    hipJitInputFatBinary = 2,
82    #[doc = "< Cuda Only Host Object with embedded device code"]
83    hipJitInputObject = 3,
84    #[doc = "< Cuda Only Archive of Host Objects with embedded\n< device code"]
85    hipJitInputLibrary = 4,
86    #[doc = "< @deprecated Cuda only High Level intermediate\n< code for LTO"]
87    hipJitInputNvvm = 5,
88    #[doc = "< Count of Legacy Input Types"]
89    hipJitNumLegacyInputTypes = 6,
90    #[doc = "< HIP Only LLVM Bitcode or IR assembly"]
91    hipJitInputLLVMBitcode = 100,
92    #[doc = "< HIP Only LLVM Clang Bundled Code"]
93    hipJitInputLLVMBundledBitcode = 101,
94    #[doc = "< HIP Only LLVM Archive of Bundled Bitcode"]
95    hipJitInputLLVMArchivesOfBundledBitcode = 102,
96    #[doc = "< HIP Only SPIRV Code Object"]
97    hipJitInputSpirv = 103,
98    #[doc = "< Count of Input Types"]
99    hipJitNumInputTypes = 10,
100}
101#[repr(u32)]
102#[doc = " hipJitCacheMode"]
103#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
104pub enum hipJitCacheMode {
105    hipJitCacheOptionNone = 0,
106    hipJitCacheOptionCG = 1,
107    hipJitCacheOptionCA = 2,
108}
109#[repr(u32)]
110#[doc = " hipJitFallback"]
111#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
112pub enum hipJitFallback {
113    hipJitPreferPTX = 0,
114    hipJitPreferBinary = 1,
115}
116#[repr(u32)]
117#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
118pub enum hipLibraryOption_e {
119    hipLibraryHostUniversalFunctionAndDataTable = 0,
120    hipLibraryBinaryIsPreserved = 1,
121}
122pub use self::hipLibraryOption_e as hipLibraryOption;
123#[repr(u32)]
124#[doc = " @addtogroup GlobalDefs\n @{\n\n/\n/**\n hiprtc error code"]
125#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
126pub enum hiprtcResult {
127    #[doc = "< Success"]
128    HIPRTC_SUCCESS = 0,
129    #[doc = "< Out of memory"]
130    HIPRTC_ERROR_OUT_OF_MEMORY = 1,
131    #[doc = "< Failed to create program"]
132    HIPRTC_ERROR_PROGRAM_CREATION_FAILURE = 2,
133    #[doc = "< Invalid input"]
134    HIPRTC_ERROR_INVALID_INPUT = 3,
135    #[doc = "< Invalid program"]
136    HIPRTC_ERROR_INVALID_PROGRAM = 4,
137    #[doc = "< Invalid option"]
138    HIPRTC_ERROR_INVALID_OPTION = 5,
139    #[doc = "< Compilation error"]
140    HIPRTC_ERROR_COMPILATION = 6,
141    #[doc = "< Failed in builtin operation"]
142    HIPRTC_ERROR_BUILTIN_OPERATION_FAILURE = 7,
143    #[doc = "< No name expression after compilation"]
144    HIPRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = 8,
145    #[doc = "< No lowered names before compilation"]
146    HIPRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = 9,
147    #[doc = "< Invalid name expression"]
148    HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10,
149    #[doc = "< Internal error"]
150    HIPRTC_ERROR_INTERNAL_ERROR = 11,
151    #[doc = "< Error in linking"]
152    HIPRTC_ERROR_LINKING = 100,
153}
154#[repr(C)]
155#[derive(Debug)]
156pub struct ihiprtcLinkState {
157    _unused: [u8; 0],
158}
159#[doc = "  hiprtc link state\n"]
160pub type hiprtcLinkState = *mut ihiprtcLinkState;
161#[repr(C)]
162#[derive(Debug)]
163pub struct _hiprtcProgram {
164    _unused: [u8; 0],
165}
166#[doc = "  hiprtc program\n"]
167pub type hiprtcProgram = *mut _hiprtcProgram;