You copied the Doc URL to your clipboard.

__clz intrinsic

This intrinsic inserts a CLZ instruction or an equivalent code sequence into the instruction stream generated by the compiler. It enables you to count the number of leading zeros of a data value in your C or C++ code.


unsigned char __clz(unsigned int val)



is an unsigned int.

Return value

The __clz intrinsic returns the number of leading zeros in val.

See also