[Openmp-commits] [openmp] 5937434 - [OpenMP] Silence unused symbol warning with proper ifdefs

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Sat Jul 11 09:59:33 PDT 2020


Author: Johannes Doerfert
Date: 2020-07-11T11:57:42-05:00
New Revision: 5937434677afc5be47977f8d340ff499589f2ef3

URL: https://github.com/llvm/llvm-project/commit/5937434677afc5be47977f8d340ff499589f2ef3
DIFF: https://github.com/llvm/llvm-project/commit/5937434677afc5be47977f8d340ff499589f2ef3.diff

LOG: [OpenMP] Silence unused symbol warning with proper ifdefs

Added: 
    

Modified: 
    openmp/libomptarget/deviceRTLs/common/src/reduction.cu

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/deviceRTLs/common/src/reduction.cu b/openmp/libomptarget/deviceRTLs/common/src/reduction.cu
index 0230fa26ac10..7604f024eeb4 100644
--- a/openmp/libomptarget/deviceRTLs/common/src/reduction.cu
+++ b/openmp/libomptarget/deviceRTLs/common/src/reduction.cu
@@ -54,6 +54,7 @@ INLINE static void gpu_irregular_warp_reduce(void *reduce_data,
   }
 }
 
+#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ < 700
 INLINE static uint32_t
 gpu_irregular_simd_reduce(void *reduce_data, kmp_ShuffleReductFctPtr shflFct) {
   uint32_t size, remote_id, physical_lane_id;
@@ -72,6 +73,7 @@ gpu_irregular_simd_reduce(void *reduce_data, kmp_ShuffleReductFctPtr shflFct) {
   } while (logical_lane_id % 2 == 0 && size > 1);
   return (logical_lane_id == 0);
 }
+#endif
 
 INLINE
 static int32_t nvptx_parallel_reduce_nowait(


        


More information about the Openmp-commits mailing list