We were either checking for __CUDACC__
or ENABLE_CUDA
macros whenever
including the CUDA runtime library header. Both these macros serve
different purpose and are context specific - the first is for all *.cu
source file being compile by NVCC (there is also the generic __NVCC__
macro for any compilation with NVCC). The latter macro is defined within
config.h
only during the compilation of sac2c - as such it does not
exist otherwise.
Using these macros was leading to various problems when compiling
Stdlib, we have changed this to use the SAC_BACKEND_CUDA
macro instead,
which is always defined when compiling any CUDA-backend related code.