Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Built-in functions in c++

I was browsing through some codes at the end of the contest and found out that many people were using functions like __gcd(int,int) . What are these functions ? Similar functions include

__builtin_popcount(int)

__builtin_ctz(int)

__builtin_clz(int)

Where can I study about these functions ? Googling it didn't help much.

like image 488
g4ur4v Avatar asked Oct 06 '22 22:10

g4ur4v


1 Answers

Those are all GCC specifics. you can read about them here: http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html#C-Extensions - but be aware, they're NOT C/C++ Standards.

like image 163
Aniket Inge Avatar answered Oct 10 '22 03:10

Aniket Inge