Skip to main content

singe_cuda_sys/
nvjitlink_sys_13040.rs

1/* automatically generated by rust-bindgen 0.72.1 */
2
3impl nvJitLinkResult {
4    /// The operation completed successfully.
5    pub const NVJITLINK_SUCCESS: nvJitLinkResult = nvJitLinkResult(0);
6    /// Unrecognized Option
7    pub const NVJITLINK_ERROR_UNRECOGNIZED_OPTION: nvJitLinkResult = nvJitLinkResult(1);
8    /// Option `-arch=sm_NN` not specified
9    pub const NVJITLINK_ERROR_MISSING_ARCH: nvJitLinkResult = nvJitLinkResult(2);
10    /// Invalid Input
11    pub const NVJITLINK_ERROR_INVALID_INPUT: nvJitLinkResult = nvJitLinkResult(3);
12    /// Issue during PTX Compilation
13    pub const NVJITLINK_ERROR_PTX_COMPILE: nvJitLinkResult = nvJitLinkResult(4);
14    /// Issue during NVVM Compilation
15    pub const NVJITLINK_ERROR_NVVM_COMPILE: nvJitLinkResult = nvJitLinkResult(5);
16    /// Internal Error
17    pub const NVJITLINK_ERROR_INTERNAL: nvJitLinkResult = nvJitLinkResult(6);
18    /// Issue with Thread Pool
19    pub const NVJITLINK_ERROR_THREADPOOL: nvJitLinkResult = nvJitLinkResult(7);
20    /// Unrecognized Input
21    pub const NVJITLINK_ERROR_UNRECOGNIZED_INPUT: nvJitLinkResult = nvJitLinkResult(8);
22    /// Finalizer Error
23    pub const NVJITLINK_ERROR_FINALIZE: nvJitLinkResult = nvJitLinkResult(9);
24    /// Null Input
25    pub const NVJITLINK_ERROR_NULL_INPUT: nvJitLinkResult = nvJitLinkResult(10);
26    /// Incompatible Options
27    pub const NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS: nvJitLinkResult = nvJitLinkResult(
28        11,
29    );
30    /// Incorrect Input Type
31    pub const NVJITLINK_ERROR_INCORRECT_INPUT_TYPE: nvJitLinkResult = nvJitLinkResult(
32        12,
33    );
34    /// Arch Mismatch
35    pub const NVJITLINK_ERROR_ARCH_MISMATCH: nvJitLinkResult = nvJitLinkResult(13);
36    /// Outdated Library
37    pub const NVJITLINK_ERROR_OUTDATED_LIBRARY: nvJitLinkResult = nvJitLinkResult(14);
38    /// Missing Fatbin
39    pub const NVJITLINK_ERROR_MISSING_FATBIN: nvJitLinkResult = nvJitLinkResult(15);
40    /// Unrecognized -arch value
41    pub const NVJITLINK_ERROR_UNRECOGNIZED_ARCH: nvJitLinkResult = nvJitLinkResult(16);
42    /// Unsupported -arch value
43    pub const NVJITLINK_ERROR_UNSUPPORTED_ARCH: nvJitLinkResult = nvJitLinkResult(17);
44    /// Requires -lto
45    pub const NVJITLINK_ERROR_LTO_NOT_ENABLED: nvJitLinkResult = nvJitLinkResult(18);
46}
47/// The enumerated type nvJitLinkResult defines API call result codes. nvJitLink APIs return nvJitLinkResult codes to indicate the result.
48#[repr(transparent)]
49#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
50pub struct nvJitLinkResult(pub ::core::ffi::c_uint);
51impl nvJitLinkInputType {
52    /// Error Type
53    pub const NVJITLINK_INPUT_NONE: nvJitLinkInputType = nvJitLinkInputType(0);
54    /// For CUDA Binaries
55    pub const NVJITLINK_INPUT_CUBIN: nvJitLinkInputType = nvJitLinkInputType(1);
56    /// For PTX
57    pub const NVJITLINK_INPUT_PTX: nvJitLinkInputType = nvJitLinkInputType(2);
58    /// For LTO-IR
59    pub const NVJITLINK_INPUT_LTOIR: nvJitLinkInputType = nvJitLinkInputType(3);
60    /// For Fatbin
61    pub const NVJITLINK_INPUT_FATBIN: nvJitLinkInputType = nvJitLinkInputType(4);
62    /// For Host Object
63    pub const NVJITLINK_INPUT_OBJECT: nvJitLinkInputType = nvJitLinkInputType(5);
64    /// For Host Library
65    pub const NVJITLINK_INPUT_LIBRARY: nvJitLinkInputType = nvJitLinkInputType(6);
66    /// For Index File
67    pub const NVJITLINK_INPUT_INDEX: nvJitLinkInputType = nvJitLinkInputType(7);
68    /// Dynamically chooses from the valid types
69    pub const NVJITLINK_INPUT_ANY: nvJitLinkInputType = nvJitLinkInputType(10);
70}
71/// The enumerated type nvJitLinkInputType defines the kind of inputs that can be passed to nvJitLinkAdd* APIs.
72#[repr(transparent)]
73#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
74pub struct nvJitLinkInputType(pub ::core::ffi::c_uint);
75/// Incomplete native type used by [`nvJitLinkHandle`] handles. The native API owns its layout.
76#[repr(C)]
77#[derive(Debug, Copy, Clone)]
78pub struct nvJitLink {
79    _unused: [u8; 0],
80}
81/// nvJitLinkHandle is the unit of linking, and an opaque handle for a program.
82///
83/// To link inputs, an instance of nvJitLinkHandle must be created first with nvJitLinkCreate().
84pub type nvJitLinkHandle = *mut nvJitLink;
85singe_loader::functions! { crate::NVJITLINK;
86    /// nvJitLinkCreate creates an instance of nvJitLinkHandle with the given input options, and sets the output parameter `handle`.
87    ///
88    /// It supports options listed in `options`.
89    ///
90    /// # Parameters
91    ///
92    /// - `handle`: Address of nvJitLink handle.
93    /// - `numOptions`: Number of options passed.
94    /// - `options`: Array of size `numOptions` of option strings.
95    ///
96    /// # Return value
97    ///
98    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
99    /// - [`nvJitLinkResult::NVJITLINK_ERROR_UNRECOGNIZED_OPTION`]
100    /// - [`nvJitLinkResult::NVJITLINK_ERROR_MISSING_ARCH`]
101    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
102    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
103    ///
104    /// See also: [`nvJitLinkDestroy`].
105    pub fn __nvJitLinkCreate_13_4(
106        handle: *mut nvJitLinkHandle,
107        numOptions: u32,
108        options: *const *const ::core::ffi::c_char,
109    ) -> nvJitLinkResult;
110}
111singe_loader::functions! { crate::NVJITLINK;
112    /// nvJitLinkCreate creates an instance of nvJitLinkHandle with the given input options, and sets the output parameter `handle`.
113    ///
114    /// It supports options listed in `options`.
115    ///
116    /// # Parameters
117    ///
118    /// - `handle`: Address of nvJitLink handle.
119    /// - `numOptions`: Number of options passed.
120    /// - `options`: Array of size `numOptions` of option strings.
121    ///
122    /// # Return value
123    ///
124    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
125    /// - [`nvJitLinkResult::NVJITLINK_ERROR_UNRECOGNIZED_OPTION`]
126    /// - [`nvJitLinkResult::NVJITLINK_ERROR_MISSING_ARCH`]
127    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
128    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
129    ///
130    /// See also: [`nvJitLinkDestroy`].
131    pub fn nvJitLinkCreate(
132        handle: *mut nvJitLinkHandle,
133        numOptions: u32,
134        options: *mut *const ::core::ffi::c_char,
135    ) -> nvJitLinkResult;
136}
137singe_loader::functions! { crate::NVJITLINK;
138    /// nvJitLinkDestroy frees the memory associated with the given handle and sets it to NULL.
139    ///
140    /// # Parameters
141    ///
142    /// - `handle`: Address of nvJitLink handle.
143    ///
144    /// # Return value
145    ///
146    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
147    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
148    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
149    ///
150    /// See also: [`nvJitLinkCreate`].
151    pub fn __nvJitLinkDestroy_13_4(handle: *mut nvJitLinkHandle) -> nvJitLinkResult;
152}
153singe_loader::functions! { crate::NVJITLINK;
154    /// nvJitLinkDestroy frees the memory associated with the given handle and sets it to NULL.
155    ///
156    /// # Parameters
157    ///
158    /// - `handle`: Address of nvJitLink handle.
159    ///
160    /// # Return value
161    ///
162    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
163    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
164    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
165    ///
166    /// See also: [`nvJitLinkCreate`].
167    pub fn nvJitLinkDestroy(handle: *mut nvJitLinkHandle) -> nvJitLinkResult;
168}
169singe_loader::functions! { crate::NVJITLINK;
170    /// nvJitLinkAddData adds data image to the link.
171    ///
172    /// # Parameters
173    ///
174    /// - `handle`: nvJitLink handle.
175    /// - `inputType`: kind of input.
176    /// - `data`: pointer to data image in memory.
177    /// - `size`: size of the data.
178    /// - `name`: name of input object.
179    ///
180    /// # Return value
181    ///
182    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
183    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
184    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
185    pub fn __nvJitLinkAddData_13_4(
186        handle: nvJitLinkHandle,
187        inputType: nvJitLinkInputType,
188        data: *const ::core::ffi::c_void,
189        size: usize,
190        name: *const ::core::ffi::c_char,
191    ) -> nvJitLinkResult;
192}
193singe_loader::functions! { crate::NVJITLINK;
194    /// nvJitLinkAddData adds data image to the link.
195    ///
196    /// # Parameters
197    ///
198    /// - `handle`: nvJitLink handle.
199    /// - `inputType`: kind of input.
200    /// - `data`: pointer to data image in memory.
201    /// - `size`: size of the data.
202    /// - `name`: name of input object.
203    ///
204    /// # Return value
205    ///
206    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
207    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
208    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
209    pub fn nvJitLinkAddData(
210        handle: nvJitLinkHandle,
211        inputType: nvJitLinkInputType,
212        data: *const ::core::ffi::c_void,
213        size: usize,
214        name: *const ::core::ffi::c_char,
215    ) -> nvJitLinkResult;
216}
217singe_loader::functions! { crate::NVJITLINK;
218    /// nvJitLinkAddFile reads data from file and links it in.
219    ///
220    /// # Parameters
221    ///
222    /// - `handle`: nvJitLink handle.
223    /// - `inputType`: kind of input.
224    /// - `fileName`: name of file.
225    ///
226    /// # Return value
227    ///
228    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
229    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
230    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
231    pub fn __nvJitLinkAddFile_13_4(
232        handle: nvJitLinkHandle,
233        inputType: nvJitLinkInputType,
234        fileName: *const ::core::ffi::c_char,
235    ) -> nvJitLinkResult;
236}
237singe_loader::functions! { crate::NVJITLINK;
238    /// nvJitLinkAddFile reads data from file and links it in.
239    ///
240    /// # Parameters
241    ///
242    /// - `handle`: nvJitLink handle.
243    /// - `inputType`: kind of input.
244    /// - `fileName`: name of file.
245    ///
246    /// # Return value
247    ///
248    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
249    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
250    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
251    pub fn nvJitLinkAddFile(
252        handle: nvJitLinkHandle,
253        inputType: nvJitLinkInputType,
254        fileName: *const ::core::ffi::c_char,
255    ) -> nvJitLinkResult;
256}
257singe_loader::functions! { crate::NVJITLINK;
258    /// nvJitLinkComplete does the actual link.
259    ///
260    /// # Parameters
261    ///
262    /// - `handle`: nvJitLink handle.
263    ///
264    /// # Return value
265    ///
266    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
267    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
268    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
269    pub fn __nvJitLinkComplete_13_4(handle: nvJitLinkHandle) -> nvJitLinkResult;
270}
271singe_loader::functions! { crate::NVJITLINK;
272    /// nvJitLinkComplete does the actual link.
273    ///
274    /// # Parameters
275    ///
276    /// - `handle`: nvJitLink handle.
277    ///
278    /// # Return value
279    ///
280    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
281    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
282    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
283    pub fn nvJitLinkComplete(handle: nvJitLinkHandle) -> nvJitLinkResult;
284}
285singe_loader::functions! { crate::NVJITLINK;
286    /// nvJitLinkGetLinkedCubinSize gets the size of the linked cubin.
287    ///
288    /// # Parameters
289    ///
290    /// - `handle`: nvJitLink handle.
291    /// - `size`: Size of the linked cubin.
292    ///
293    /// # Return value
294    ///
295    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
296    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
297    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
298    ///
299    /// See also: [`nvJitLinkGetLinkedCubin`].
300    pub fn __nvJitLinkGetLinkedCubinSize_13_4(
301        handle: nvJitLinkHandle,
302        size: *mut usize,
303    ) -> nvJitLinkResult;
304}
305singe_loader::functions! { crate::NVJITLINK;
306    /// nvJitLinkGetLinkedCubinSize gets the size of the linked cubin.
307    ///
308    /// # Parameters
309    ///
310    /// - `handle`: nvJitLink handle.
311    /// - `size`: Size of the linked cubin.
312    ///
313    /// # Return value
314    ///
315    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
316    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
317    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
318    ///
319    /// See also: [`nvJitLinkGetLinkedCubin`].
320    pub fn nvJitLinkGetLinkedCubinSize(
321        handle: nvJitLinkHandle,
322        size: *mut usize,
323    ) -> nvJitLinkResult;
324}
325singe_loader::functions! { crate::NVJITLINK;
326    /// nvJitLinkGetLinkedCubin gets the linked cubin.
327    ///
328    /// User is responsible for allocating enough space to hold the `cubin`.
329    ///
330    /// # Parameters
331    ///
332    /// - `handle`: nvJitLink handle.
333    /// - `cubin`: The linked cubin.
334    ///
335    /// # Return value
336    ///
337    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
338    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
339    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
340    ///
341    /// See also: [`nvJitLinkGetLinkedCubinSize`].
342    pub fn __nvJitLinkGetLinkedCubin_13_4(
343        handle: nvJitLinkHandle,
344        cubin: *mut ::core::ffi::c_void,
345    ) -> nvJitLinkResult;
346}
347singe_loader::functions! { crate::NVJITLINK;
348    /// nvJitLinkGetLinkedCubin gets the linked cubin.
349    ///
350    /// User is responsible for allocating enough space to hold the `cubin`.
351    ///
352    /// # Parameters
353    ///
354    /// - `handle`: nvJitLink handle.
355    /// - `cubin`: The linked cubin.
356    ///
357    /// # Return value
358    ///
359    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
360    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
361    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
362    ///
363    /// See also: [`nvJitLinkGetLinkedCubinSize`].
364    pub fn nvJitLinkGetLinkedCubin(
365        handle: nvJitLinkHandle,
366        cubin: *mut ::core::ffi::c_void,
367    ) -> nvJitLinkResult;
368}
369singe_loader::functions! { crate::NVJITLINK;
370    /// nvJitLinkGetLinkedPtxSize gets the size of the linked ptx.
371    ///
372    /// Linked PTX is only available when using the `-lto` option.
373    ///
374    /// # Parameters
375    ///
376    /// - `handle`: nvJitLink handle.
377    /// - `size`: Size of the linked PTX.
378    ///
379    /// # Return value
380    ///
381    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
382    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
383    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
384    ///
385    /// See also: [`nvJitLinkGetLinkedPtx`].
386    pub fn __nvJitLinkGetLinkedPtxSize_13_4(
387        handle: nvJitLinkHandle,
388        size: *mut usize,
389    ) -> nvJitLinkResult;
390}
391singe_loader::functions! { crate::NVJITLINK;
392    /// nvJitLinkGetLinkedPtxSize gets the size of the linked ptx.
393    ///
394    /// Linked PTX is only available when using the `-lto` option.
395    ///
396    /// # Parameters
397    ///
398    /// - `handle`: nvJitLink handle.
399    /// - `size`: Size of the linked PTX.
400    ///
401    /// # Return value
402    ///
403    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
404    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
405    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
406    ///
407    /// See also: [`nvJitLinkGetLinkedPtx`].
408    pub fn nvJitLinkGetLinkedPtxSize(
409        handle: nvJitLinkHandle,
410        size: *mut usize,
411    ) -> nvJitLinkResult;
412}
413singe_loader::functions! { crate::NVJITLINK;
414    /// nvJitLinkGetLinkedPtx gets the linked ptx.
415    ///
416    /// Linked PTX is only available when using the `-lto` option. User is responsible for allocating enough space to hold the `ptx`.
417    ///
418    /// # Parameters
419    ///
420    /// - `handle`: nvJitLink handle.
421    /// - `ptx`: The linked PTX.
422    ///
423    /// # Return value
424    ///
425    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
426    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
427    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
428    ///
429    /// See also: [`nvJitLinkGetLinkedPtxSize`].
430    pub fn __nvJitLinkGetLinkedPtx_13_4(
431        handle: nvJitLinkHandle,
432        ptx: *mut ::core::ffi::c_char,
433    ) -> nvJitLinkResult;
434}
435singe_loader::functions! { crate::NVJITLINK;
436    /// nvJitLinkGetLinkedPtx gets the linked ptx.
437    ///
438    /// Linked PTX is only available when using the `-lto` option. User is responsible for allocating enough space to hold the `ptx`.
439    ///
440    /// # Parameters
441    ///
442    /// - `handle`: nvJitLink handle.
443    /// - `ptx`: The linked PTX.
444    ///
445    /// # Return value
446    ///
447    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
448    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
449    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
450    ///
451    /// See also: [`nvJitLinkGetLinkedPtxSize`].
452    pub fn nvJitLinkGetLinkedPtx(
453        handle: nvJitLinkHandle,
454        ptx: *mut ::core::ffi::c_char,
455    ) -> nvJitLinkResult;
456}
457singe_loader::functions! { crate::NVJITLINK;
458    /// nvJitLinkGetLinkedLTOIRSize gets the size of the linked LTOIR.
459    ///
460    /// Linked LTOIR is only available when using the `-lto` option. The returned data is in LTOIR Container format (not raw bitcode).
461    ///
462    /// # Parameters
463    ///
464    /// - `handle`: nvJitLink handle.
465    /// - `size`: Size of the linked LTOIR.
466    ///
467    /// # Return value
468    ///
469    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
470    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
471    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
472    ///
473    /// See also: [`nvJitLinkGetLinkedLTOIR`].
474    pub fn __nvJitLinkGetLinkedLTOIRSize_13_4(
475        handle: nvJitLinkHandle,
476        size: *mut usize,
477    ) -> nvJitLinkResult;
478}
479singe_loader::functions! { crate::NVJITLINK;
480    /// nvJitLinkGetLinkedLTOIRSize gets the size of the linked LTOIR.
481    ///
482    /// Linked LTOIR is only available when using the `-lto` option. The returned data is in LTOIR Container format (not raw bitcode).
483    ///
484    /// # Parameters
485    ///
486    /// - `handle`: nvJitLink handle.
487    /// - `size`: Size of the linked LTOIR.
488    ///
489    /// # Return value
490    ///
491    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
492    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
493    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
494    ///
495    /// See also: [`nvJitLinkGetLinkedLTOIR`].
496    pub fn nvJitLinkGetLinkedLTOIRSize(
497        handle: nvJitLinkHandle,
498        size: *mut usize,
499    ) -> nvJitLinkResult;
500}
501singe_loader::functions! { crate::NVJITLINK;
502    /// nvJitLinkGetLinkedLTOIR gets the linked LTOIR.
503    ///
504    /// Linked LTOIR is only available when using the `-lto` option. User is responsible for allocating enough space to hold the `ltoir`. The returned data is in LTOIR Container format (not raw bitcode).
505    ///
506    /// # Parameters
507    ///
508    /// - `handle`: nvJitLink handle.
509    /// - `ltoir`: The linked LTOIR in Container format.
510    ///
511    /// # Return value
512    ///
513    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
514    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
515    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
516    ///
517    /// See also: [`nvJitLinkGetLinkedLTOIRSize`].
518    pub fn __nvJitLinkGetLinkedLTOIR_13_4(
519        handle: nvJitLinkHandle,
520        ltoir: *mut ::core::ffi::c_void,
521    ) -> nvJitLinkResult;
522}
523singe_loader::functions! { crate::NVJITLINK;
524    /// nvJitLinkGetLinkedLTOIR gets the linked LTOIR.
525    ///
526    /// Linked LTOIR is only available when using the `-lto` option. User is responsible for allocating enough space to hold the `ltoir`. The returned data is in LTOIR Container format (not raw bitcode).
527    ///
528    /// # Parameters
529    ///
530    /// - `handle`: nvJitLink handle.
531    /// - `ltoir`: The linked LTOIR in Container format.
532    ///
533    /// # Return value
534    ///
535    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
536    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
537    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
538    ///
539    /// See also: [`nvJitLinkGetLinkedLTOIRSize`].
540    pub fn nvJitLinkGetLinkedLTOIR(
541        handle: nvJitLinkHandle,
542        ltoir: *mut ::core::ffi::c_void,
543    ) -> nvJitLinkResult;
544}
545singe_loader::functions! { crate::NVJITLINK;
546    /// nvJitLinkGetErrorLogSize gets the size of the error log.
547    ///
548    /// # Parameters
549    ///
550    /// - `handle`: nvJitLink handle.
551    /// - `size`: Size of the error log.
552    ///
553    /// # Return value
554    ///
555    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
556    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
557    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
558    ///
559    /// See also: [`nvJitLinkGetErrorLog`].
560    pub fn __nvJitLinkGetErrorLogSize_13_4(
561        handle: nvJitLinkHandle,
562        size: *mut usize,
563    ) -> nvJitLinkResult;
564}
565singe_loader::functions! { crate::NVJITLINK;
566    /// nvJitLinkGetErrorLogSize gets the size of the error log.
567    ///
568    /// # Parameters
569    ///
570    /// - `handle`: nvJitLink handle.
571    /// - `size`: Size of the error log.
572    ///
573    /// # Return value
574    ///
575    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
576    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
577    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
578    ///
579    /// See also: [`nvJitLinkGetErrorLog`].
580    pub fn nvJitLinkGetErrorLogSize(
581        handle: nvJitLinkHandle,
582        size: *mut usize,
583    ) -> nvJitLinkResult;
584}
585singe_loader::functions! { crate::NVJITLINK;
586    /// nvJitLinkGetErrorLog puts any error messages in the log.
587    ///
588    /// User is responsible for allocating enough space to hold the `log`.
589    ///
590    /// # Parameters
591    ///
592    /// - `handle`: nvJitLink handle.
593    /// - `log`: The error log.
594    ///
595    /// # Return value
596    ///
597    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
598    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
599    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
600    ///
601    /// See also: [`nvJitLinkGetErrorLogSize`].
602    pub fn __nvJitLinkGetErrorLog_13_4(
603        handle: nvJitLinkHandle,
604        log: *mut ::core::ffi::c_char,
605    ) -> nvJitLinkResult;
606}
607singe_loader::functions! { crate::NVJITLINK;
608    /// nvJitLinkGetErrorLog puts any error messages in the log.
609    ///
610    /// User is responsible for allocating enough space to hold the `log`.
611    ///
612    /// # Parameters
613    ///
614    /// - `handle`: nvJitLink handle.
615    /// - `log`: The error log.
616    ///
617    /// # Return value
618    ///
619    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
620    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
621    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
622    ///
623    /// See also: [`nvJitLinkGetErrorLogSize`].
624    pub fn nvJitLinkGetErrorLog(
625        handle: nvJitLinkHandle,
626        log: *mut ::core::ffi::c_char,
627    ) -> nvJitLinkResult;
628}
629singe_loader::functions! { crate::NVJITLINK;
630    /// nvJitLinkGetInfoLogSize gets the size of the info log.
631    ///
632    /// # Parameters
633    ///
634    /// - `handle`: nvJitLink handle.
635    /// - `size`: Size of the info log.
636    ///
637    /// # Return value
638    ///
639    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
640    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
641    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
642    ///
643    /// See also: [`nvJitLinkGetInfoLog`].
644    pub fn __nvJitLinkGetInfoLogSize_13_4(
645        handle: nvJitLinkHandle,
646        size: *mut usize,
647    ) -> nvJitLinkResult;
648}
649singe_loader::functions! { crate::NVJITLINK;
650    /// nvJitLinkGetInfoLogSize gets the size of the info log.
651    ///
652    /// # Parameters
653    ///
654    /// - `handle`: nvJitLink handle.
655    /// - `size`: Size of the info log.
656    ///
657    /// # Return value
658    ///
659    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
660    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
661    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
662    ///
663    /// See also: [`nvJitLinkGetInfoLog`].
664    pub fn nvJitLinkGetInfoLogSize(
665        handle: nvJitLinkHandle,
666        size: *mut usize,
667    ) -> nvJitLinkResult;
668}
669singe_loader::functions! { crate::NVJITLINK;
670    /// nvJitLinkGetInfoLog puts any info messages in the log.
671    ///
672    /// User is responsible for allocating enough space to hold the `log`.
673    ///
674    /// # Parameters
675    ///
676    /// - `handle`: nvJitLink handle.
677    /// - `log`: The info log.
678    ///
679    /// # Return value
680    ///
681    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
682    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
683    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
684    ///
685    /// See also: [`nvJitLinkGetInfoLogSize`].
686    pub fn __nvJitLinkGetInfoLog_13_4(
687        handle: nvJitLinkHandle,
688        log: *mut ::core::ffi::c_char,
689    ) -> nvJitLinkResult;
690}
691singe_loader::functions! { crate::NVJITLINK;
692    /// nvJitLinkGetInfoLog puts any info messages in the log.
693    ///
694    /// User is responsible for allocating enough space to hold the `log`.
695    ///
696    /// # Parameters
697    ///
698    /// - `handle`: nvJitLink handle.
699    /// - `log`: The info log.
700    ///
701    /// # Return value
702    ///
703    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
704    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
705    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
706    ///
707    /// See also: [`nvJitLinkGetInfoLogSize`].
708    pub fn nvJitLinkGetInfoLog(
709        handle: nvJitLinkHandle,
710        log: *mut ::core::ffi::c_char,
711    ) -> nvJitLinkResult;
712}
713singe_loader::functions! { crate::NVJITLINK;
714    /// nvJitLinkVersion returns the current version of nvJitLink.
715    ///
716    /// # Parameters
717    ///
718    /// - `major`: The major version.
719    /// - `minor`: The minor version.
720    ///
721    /// # Return value
722    ///
723    /// - [`nvJitLinkResult::NVJITLINK_SUCCESS`]
724    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INVALID_INPUT`]
725    /// - [`nvJitLinkResult::NVJITLINK_ERROR_INTERNAL`]
726    pub fn nvJitLinkVersion(
727        major: *mut ::core::ffi::c_uint,
728        minor: *mut ::core::ffi::c_uint,
729    ) -> nvJitLinkResult;
730}