Skip to main content

cuLinkAddFile_v2

Function cuLinkAddFile_v2 

Source
pub unsafe extern "C" fn cuLinkAddFile_v2(
    state: CUlinkState,
    type_: CUjitInputType,
    path: *const c_char,
    numOptions: c_uint,
    options: *mut CUjit_option,
    optionValues: *mut *mut c_void,
) -> CUresult
Expand description

Add a file input to a pending linker invocation.

No reference is retained to any inputs after this call returns.

This method accepts only compiler options, which are used if the input must be compiled from PTX, and does not accept any of CUjit_option_enum::CU_JIT_WALL_TIME, CUjit_option_enum::CU_JIT_INFO_LOG_BUFFER, CUjit_option_enum::CU_JIT_ERROR_LOG_BUFFER, CUjit_option_enum::CU_JIT_TARGET_FROM_CUCONTEXT, or CUjit_option_enum::CU_JIT_TARGET.

This method is equivalent to invoking cuLinkAddData on the contents of the file.

Note: For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted.

§Parameters

  • state: A pending linker action.
  • type_: The type of the input data.
  • path: Path to the input file.
  • numOptions: Size of options.
  • options: Options to be applied only for this input (overrides options from cuLinkCreate).
  • optionValues: Array of option values, each cast to void *.

§Return value

See also: cuLinkCreate, cuLinkAddData, cuLinkComplete, cuLinkDestroy.