Changeset df6cc9d for libcfa/src/bitmanip.hfa
- Timestamp:
- Oct 19, 2022, 4:43:26 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 1a45263
- Parents:
- 9cd5bd2 (diff), 135143ba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bitmanip.hfa
r9cd5bd2 rdf6cc9d 11 11 // Created On : Sat Mar 14 18:12:27 2020 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : S un Aug 23 21:39:28 202014 // Update Count : 14 013 // Last Modified On : Sat Oct 8 08:28:15 2022 14 // Update Count : 142 15 15 // 16 16 … … 21 21 // Bits are numbered 1-N. 22 22 23 #include <assert.h>24 25 23 #define __bitsizeof( n ) (sizeof(n) * __CHAR_BIT__) 26 24 27 static inline {25 static inline __attribute__((always_inline)) { 28 26 // Count leading 0 bits. 29 27 unsigned int leading0s( unsigned char n ) { return n != 0 ? __builtin_clz( n ) - (__bitsizeof(unsigned int) - __bitsizeof(n)) : __bitsizeof(n); }
Note:
See TracChangeset
for help on using the changeset viewer.