Function cuLinkCreate_v2

Source
pub unsafe extern "C" fn cuLinkCreate_v2(
    numOptions: c_uint,
    options: *mut CUjit_option,
    optionValues: *mut *mut c_void,
    stateOut: *mut CUlinkState,
) -> CUresult
Expand description

\brief Creates a pending JIT linker invocation.

If the call is successful, the caller owns the returned CUlinkState, which should eventually be destroyed with ::cuLinkDestroy. The device code machine size (32 or 64 bit) will match the calling application.

Both linker and compiler options may be specified. Compiler options will be applied to inputs to this linker action which must be compiled from PTX. The options ::CU_JIT_WALL_TIME, ::CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, and ::CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES will accumulate data until the CUlinkState is destroyed.

The data passed in via ::cuLinkAddData and ::cuLinkAddFile will be treated as relocatable (-rdc=true to nvcc) when linking the final cubin during ::cuLinkComplete and will have similar consequences as offline relocatable device code linking.

\p optionValues must remain valid for the life of the CUlinkState if output options are used. No other references to inputs are maintained after this call returns.

\note For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted

\param numOptions Size of options arrays \param options Array of linker and compiler options \param optionValues Array of option values, each cast to void * \param stateOut On success, this will contain a CUlinkState to specify and complete this action

\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_OUT_OF_MEMORY, ::CUDA_ERROR_JIT_COMPILER_NOT_FOUND \notefnerr

\sa ::cuLinkAddData, ::cuLinkAddFile, ::cuLinkComplete, ::cuLinkDestroy