Skip to content

Add support for some NVCC compilation switches as CUDA features

C and C++ have multiple features supported in CMake below the level of the standard version. The same should be the case for CUDA. NVCC has offered, for nearly a decade now, the options:

--no-host-device-initializer-list               (-nohdinitlist)                 
        Do not implicitly consider member functions of std::initializer_list as __host__
        __device__ functions.

--no-host-device-move-forward                   (-nohdmoveforward)              
        Do not implicitly consider std::move and std::forward as __host__ __device__
        function templates.

--expt-relaxed-constexpr                        (-expt-relaxed-constexpr)       
        Experimental flag: Allow host code to invoke __device__ constexpr functions,
        and device code to invoke __host__ constexpr functions.Note that the behavior
        of this flag may change in future compiler releases.

--extended-lambda                               (-extended-lambda)              
        Allow __host__, __device__ annotations in lambda declaration. 

These should correspond to CMake CUDA features:

cuda_host_device_initializer_list
cuda_host_device_move_forward
cuda_relaxed_constexpr
cuda_extended_lambda

which control whether or not the relevant switch is passed to NVCC.

(I don't know what clang supports w.r.t. CUDA compilation, that might have some bearing on this issue.)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information