Function kn_cuda_sys::bindings::cuLibraryLoadFromFile
source · pub unsafe extern "C" fn cuLibraryLoadFromFile(
library: *mut CUlibrary,
fileName: *const c_char,
jitOptions: *mut CUjit_option,
jitOptionsValues: *mut *mut c_void,
numJitOptions: c_uint,
libraryOptions: *mut CUlibraryOption,
libraryOptionValues: *mut *mut c_void,
numLibraryOptions: c_uint
) -> CUresultExpand description
\brief Load a library with specified file and options
Takes a filename \p fileName and loads the corresponding library \p library into all contexts existent at the time of the call and future contexts at the time of creation until the library is unloaded with ::cuLibraryUnload().
The file should be a \e cubin file as output by \b nvcc, or a \e PTX file either as output by \b nvcc or handwritten, or a \e fatbin file as output by \b nvcc from toolchain 4.0 or later.
Options are passed as an array via \p jitOptions and any corresponding parameters are passed in \p jitOptionsValues. The number of total options is supplied via \p numJitOptions. Any outputs will be returned via \p jitOptionsValues.
Library load options are passed as an array via \p libraryOptions and any corresponding parameters are passed in \p libraryOptionValues. The number of total library load options is supplied via \p numLibraryOptions.
\param library - Returned library \param fileName - File to load from \param jitOptions - Options for JIT \param jitOptionsValues - Option values for JIT \param numJitOptions - Number of options \param libraryOptions - Options for loading \param libraryOptionValues - Option values for loading \param numLibraryOptions - Number of options for loading
\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_PTX, ::CUDA_ERROR_UNSUPPORTED_PTX_VERSION, ::CUDA_ERROR_OUT_OF_MEMORY, ::CUDA_ERROR_NO_BINARY_FOR_GPU, ::CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND, ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED, ::CUDA_ERROR_JIT_COMPILER_NOT_FOUND
\sa ::cuLibraryLoadData, ::cuLibraryUnload, ::cuModuleLoad, ::cuModuleLoadData, ::cuModuleLoadDataEx