Remove _CCCL_HAS_CUDA_COMPILER()
#6984
Merged
+40
−48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've removed almost all uses of
_CCCL_HAS_CUDA_COMPILER()and now it's the time to remove the macro completely. Basically it's just almost always not the right tool for the job.Most of the uses were/are replaced by
_CCCL_CUDA_COMPILATION()and the rest was/is almost always replacement for_CCCL_CUDA_COMPILER(NVCC)or_CCCL_HAS_CTK().The compiler detection is now wrapped by
_CCCL_CUDA_COMPILATION(), so if we are not compiling CUDA code, there is not CUDA compiler. This was not always the case, because if the user does:we would still set the
_CCCL_CUDA_COMPILER_NVCC()even though we are compiling a c++ file. In my opinion this is not correct, because nvcc just controls the compilation trajectory and doesn't compile any source code.This means that many of the builtins that
cudafe++doesn't support are not used even though the c++ compiler could use them without any problem.So, this PR removes
_CCCL_HAS_CUDA_COMPILER()completely and puts all compiler/compilation macros to a consistent state.