]> sourceware.org Git - lvm2.git/commit
util: add clz() and use __builtin_clz() if available
authorBryn M. Reeves <bmr@redhat.com>
Mon, 12 Dec 2016 12:03:50 +0000 (12:03 +0000)
committerBryn M. Reeves <bmr@redhat.com>
Tue, 13 Dec 2016 20:41:29 +0000 (20:41 +0000)
commit107bc13db3b0117e32bacede53fbd382feaf4a17
treea895240085000799e64aca8b3776f7857082476c
parent83a9cd5258fbd1acf293734cb4c3aba0f9ffcc9b
util: add clz() and use __builtin_clz() if available

Add a macro for the clz (count leading zeros) operation.

Use the GCC __builtin_clz() for clz() if it is available and fall
back to a shift based implementation on systems that do not set
HAVE___BUILTIN_CLZ.
lib/misc/util.h
This page took 0.035043 seconds and 5 git commands to generate.