6.3. 初始化
本节介绍底层CUDA驱动应用程序编程接口的初始化函数。
Functions
- CUresult cuInit ( unsigned int Flags )
- Initialize the CUDA driver API Initializes the driver API and must be called before any other function from the driver API in the current process. Currently, the Flags parameter must be 0. If cuInit() has not been called, any function from the driver API will return CUDA_ERROR_NOT_INITIALIZED.
Functions
- CUresult cuInit ( unsigned int Flags )
-
Initialize the CUDA driver API Initializes the driver API and must be called before any other function from the driver API in the current process. Currently, the Flags parameter must be 0. If cuInit() has not been called, any function from the driver API will return CUDA_ERROR_NOT_INITIALIZED.
参数
- Flags
- - Initialization flag for CUDA.
返回
CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_SYSTEM_DRIVER_MISMATCH, CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE
描述
Note:请注意,此函数也可能返回之前异步启动的错误代码。