libcstl
Loading...
Searching...
No Matches
Functions
common.c File Reference

Go to the source code of this file.

Functions

int cstl_fls (const unsigned long x)
 Find the last (highest order) bit set.
 

Function Documentation

◆ cstl_fls()

int cstl_fls ( unsigned long  x)

Find the last (highest order) bit set.

Returns
Zero-based index of the highest order set bit
Return values
-1No bits are set, i.e. the input value is zero

Definition at line 7 of file common.c.