From 975d2e4294e4eac113be996c2e6a8abf4d951c36 Mon Sep 17 00:00:00 2001 From: matze Date: Wed, 14 Sep 2016 18:20:47 +0200 Subject: [PATCH] Enable built in counting trailing zeros function for Intel compiler and clang. --- modules/imgproc/src/contours.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/imgproc/src/contours.cpp b/modules/imgproc/src/contours.cpp index 2bfb7d7..c284927 100644 --- a/modules/imgproc/src/contours.cpp +++ b/modules/imgproc/src/contours.cpp @@ -59,10 +59,10 @@ inline unsigned int trailingZeros(unsigned int value) { #endif #elif defined(__GNUC__) || defined(__GNUG__) return __builtin_ctz(value); -//#elif defined(__ICC) || defined(__INTEL_COMPILER) -// return _bit_scan_forward(value); -//#elif defined(__clang__) -// return llvm.cttz.i32(value, true); +#elif defined(__ICC) || defined(__INTEL_COMPILER) + return _bit_scan_forward(value); +#elif defined(__clang__) + return llvm.cttz.i32(value, true); #else static const int MultiplyDeBruijnBitPosition[32] = { 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, -- 2.7.4