fix build error on CUDA + Aarch64
authorTomoaki Teshima <tomoaki.teshima@gmail.com>
Thu, 15 Sep 2016 23:06:14 +0000 (08:06 +0900)
committerTomoaki Teshima <tomoaki.teshima@gmail.com>
Thu, 15 Sep 2016 23:06:14 +0000 (08:06 +0900)
  * __fp16 doesn't exist on nvcc, but it slips through ifdef guard

modules/core/include/opencv2/core/cvdef.h

index 8011c36..a26cd1c 100644 (file)
@@ -310,7 +310,7 @@ enum CpuFeatures {
 typedef union Cv16suf
 {
     short i;
-#if ( defined (__arm__) || defined (__aarch64__) ) && ( defined (__GNUC__) && ( ( ( 4 <= __GNUC__ ) && ( 7 <= __GNUC__ ) ) || ( 5 <= __GNUC__ ) ) )
+#if ( defined (__arm__) || defined (__aarch64__) ) && !defined (__CUDACC__) && ( defined (__GNUC__) && ( ( ( 4 <= __GNUC__ ) && ( 7 <= __GNUC__ ) ) || ( 5 <= __GNUC__ ) ) )
     __fp16 h;
 #endif
     struct _fp16Format