This section describes new or enhanced diagnostics that apply to all C++ family code.
template <char... Cs> as a string rather
than individual characters. This makes the diagnostic more
readable.This section describes new or enhanced diagnostics that apply to CUDA code and SCALE code.
-fcuda-remarksEnables a set of diagnostics that are useful for optimizing GPU programs. It turns on remarks to tell the user about:
-Wcuda-attribute-ignoredWarns when attributes that apply to CUDA code, such as kernels, are
ignored. For example where __host__ or
__device__ is applied to a defaulted method (since this is
automatically the case).
-Wcuda-external-static-member-variableC++17 static
inline member variables. This allows a static
member variable to be defined (not just declared) in a class body. This
avoids the need for a separate definition outside the class. For GPU
code, this allows, for example:
class C
{
static inline __shared__ int sharedCount;
};In GPU code, it is rare to reference a variable from another
translation unit. This means that a device-side static
member variable that is neither defined in the same translation unit as
the class, nor marked inline is probably a mistake. This
warning alerts the programmer to such a mistake.
-Wcuda-function-argumentsThis diagnostic prints warnings about bad arguments to certain CUDA language functions and intrinsics. This section documents the functions for which warnings can be generated.
__shfl and friendsThe diagnostic checks that the warp size is in range and is a power of two. It supports the following functions:
__shfl__shfl_down__shfl_up__shfl_xor__shfl_sync__shfl_down_sync__shfl_up_sync__shfl_xor_sync__nvvm_shfl_down_i32__nvvm_shfl_up_i32__nvvm_shfl_bfly_i32__nvvm_shfl_idx_i32__nvvm_shfl_down_f32__nvvm_shfl_up_f32__nvvm_shfl_bfly_f32__nvvm_shfl_idx_f32__nvvm_shfl_sync_down_i32__nvvm_shfl_sync_up_i32__nvvm_shfl_sync_bfly_i32__nvvm_shfl_sync_idx_i32__nvvm_shfl_sync_down_f32__nvvm_shfl_sync_up_f32__nvvm_shfl_sync_bfly_f32__nvvm_shfl_sync_idx_f32__nvvm_shfl_sync_down_pred_i32__nvvm_shfl_sync_up_pred_i32__nvvm_shfl_sync_bfly_pred_i32__nvvm_shfl_sync_idx_pred_i32