Skip to main content

cudaGetDriverEntryPoint

Function cudaGetDriverEntryPoint 

Source
pub unsafe extern "C" fn cudaGetDriverEntryPoint(
    symbol: *const c_char,
    funcPtr: *mut *mut c_void,
    flags: c_ulonglong,
    driverStatus: *mut cudaDriverEntryPointQueryResult,
) -> cudaError_t
Expand description

Returns the requested driver API function pointer.

Returns in **funcPtr the address of the CUDA driver function for the requested flags.

For a requested driver symbol, if the CUDA version in which the driver symbol was introduced is less than or equal to the CUDA runtime version, the API will return the function pointer to the corresponding versioned driver function.

The pointer returned by the API should be cast to a function pointer matching the requested driver function’s definition in the API header file. The function pointer typedef can be picked up from the corresponding typedefs header file. For example, cudaTypedefs.h consists of function pointer typedefs for driver APIs defined in cuda.h.

The API will return cudaSuccess and set the returned funcPtr if the requested driver function is valid and supported on the platform.

The API will return cudaSuccess and set the returned funcPtr to NULL if the requested driver function is not supported on the platform, no ABI compatible driver function exists for the CUDA runtime version or if the driver symbol is invalid.

It will also set the optional driverStatus to one of the values in cudaDriverEntryPointQueryResult with the following meanings:

The requested flags can be.

§Parameters

  • symbol: The base name of the driver API function to look for. As an example, for the driver API ::cuMemAlloc_v2, symbol would be cuMemAlloc. Note that the API will use the CUDA runtime version to return the address to the most recent ABI compatible driver symbol, ::cuMemAlloc or ::cuMemAlloc_v2.
  • funcPtr: Location to return the function pointer to the requested driver function.
  • flags: Flags to specify search options.
  • driverStatus: Optional location to store the status of finding the symbol from the driver. See cudaDriverEntryPointQueryResult for possible values.