Align GCC's cuda.h with CUDA 8.0 for enums and opaque types
GCC's cuda.h now better matches CUDA 8.0 by naming enums and aliased types.
GCC’s cuda.h header has been updated to align more closely with the CUDA 8.0 version. This change involves naming enumerations and defining aliased types as opaque pointers using typedef. This alignment is important for C++ code using GCC’s header, especially when compiled with specific system include paths.
In Details
This commit aligns GCC's include/cuda/cuda.h with the CUDA 8.0 specification by correctly naming enumerated types and using typedef for opaque pointer types (e.g., void *). Previously, enums were unnamed, and opaque types were represented directly as void *, causing potential inconsistencies with CUDA's own headers, particularly in C++ contexts and when using -DPLUGIN_NVPTX_INCLUDE_SYSTEM_CUDA_H.
- cuda.h
- The primary header file for the CUDA (Compute Unified Device Architecture) toolkit, providing declarations for CUDA runtime API functions and types.
- enum
- An integral type whose name denotes a set of named integer constants. Naming enums improves code readability and maintainability.
- opaque type
- A type whose internal structure is hidden from the user. Users interact with opaque types through a defined interface, often pointers to incomplete types, preventing direct manipulation of internal data.
- typedef
- A keyword in C and C++ that creates an alias for an existing type, allowing for more readable or convenient type names. It's commonly used to define opaque types.
- CUDA 8.0
- A specific version of NVIDIA's parallel computing platform and programming model. GCC's headers aim to be compatible with this version.