vendor/allscale/utils/bitmanipulation.h
inline int countLeadingZeros(unsigned value) {
		#ifdef _MSC_VER
			unsigned long retVal = 0;
			if(_BitScanReverse(&retVal, value))
				return 31-retVal;
			// all zeros is undefined behavior, we simply return 32
			return 32;
		#else
			return __builtin_clz(value);
		#endif
	}
/**
	 * A wrapper function for counting leading zeros
	 */
A wrapper function for counting leading zeros
A wrapper function for counting leading zeros
inline int countLeadingZeros(unsigned value) {
		#ifdef _MSC_VER
			unsigned long retVal = 0;
			if(_BitScanReverse(&retVal, value))
				return 31-retVal;
			return 32;
		#else
			return __builtin_clz(value);
		#endif
	}
inline int countLeadingZeros ( unsigned value ) { #ifdef _MSC_VER unsigned long retVal = 0 ; if ( _BitScanReverse ( & retVal , value ) ) return 31 - retVal ; return 32 ; #else return __builtin_clz ( value ) ; #endif }
A wrapper function for counting leading zeros
A wrapper function for counting leading zeros
// all zeros is undefined behavior, we simply return 32