fix header guard name and no-cuda build
-#ifndef INCLUDE_GUARD_CUPY_CUDA_COMMON_H
-#define INCLUDE_GUARD_CUPY_CUDA_COMMON_H
+#ifndef INCLUDE_GUARD_CUPY_COMMON_H
+#define INCLUDE_GUARD_CUPY_COMMON_H
#include "cupy_cuComplex.h"
@@ -17,13 +17,13 @@ typedef cuComplex cpy_complex64;
typedef cuDoubleComplex cpy_complex128;
typedef bool cpy_bool;
+#ifndef CUPY_NO_CUDA
#if (__CUDACC_VER_MAJOR__ > 9 || (__CUDACC_VER_MAJOR__ == 9 && __CUDACC_VER_MINOR__ == 2)) \
&& (__CUDA_ARCH__ >= 530 || !defined(__CUDA_ARCH__))
#include <cuda_fp16.h>
-#else
-// still declare it to avoid build time errors, but it won't be usable
-struct __half;
#endif
-typedef __half cpy_half;
+#endif // CUPY_NO_CUDA
-#endif // INCLUDE_GUARD_CUPY_CUDA_COMMON_H
+typedef struct __half cpy_half;
+
+#endif // INCLUDE_GUARD_CUPY_COMMON_H
