Sigrid Solveig Haflínudóttiradd c_builtins*7192dd85 years agoHistory
29 lines · 429 B · C
RawDownload
int__builtin_ctz(unsigned int x){	unsigned int r;	if(x == 0)		return 32;	for(r = 0; (x & 1) == 0; x >>= 1, r++);	return r;} int__builtin_clz(unsigned int x){	unsigned int r;	if(x == 0)		return 32;	for(r = 0; (x & (1UL<<31)) == 0; x <<= 1, r++);	return r;} int__builtin_clzll(unsigned long long x){	unsigned long long r;	if(x == 0)		return 64;	for(r = 0; (x & (1ULL<<63)) == 0; x <<= 1, r++);	return r;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t