C++里的几个常用的二进制位内置函数
来源:互联网 发布:券商研究员 知乎 编辑:程序博客网 时间:2024/06/16 11:29
转载自http://www.cnblogs.com/nysanier/archive/2011/04/19/2020778.html
— Built-in Function: int __builtin_ffs (unsigned int x)
Returns one plus the index of the least significant 1-bit of x, or if x is zero, returns zero.
返回右起第一个‘1’的位置。
— Built-in Function: int __builtin_clz (unsigned int x)
「count leading zero」
Returns the number of leading 0-bits in x, starting at the most significant bit position. If x is 0, the result is undefined.
返回左起第一个‘1’之前0的个数。
— Built-in Function: int __builtin_ctz (unsigned int x)
「count trailing zero」
Returns the number of trailing 0-bits in x, starting at the least significant bit position. If x is 0, the result is undefined.
返回右起第一个‘1’之后的0的个数。
— Built-in Function: int __builtin_popcount (unsigned int x)
Returns the number of 1-bits in x.
返回‘1’的个数。
— Built-in Function: int __builtin_parity (unsigned int x)
Returns the parity of x, i.e. the number of 1-bits in x modulo 2.
返回‘1’的个数的奇偶性。
— Built-in Function: int __builtin_ffsl (unsigned long)
Similar to __builtin_ffs, except the argument type is unsigned long.
— Built-in Function: int __builtin_clzl (unsigned long)
Similar to __builtin_clz, except the argument type is unsigned long.
— Built-in Function: int __builtin_ctzl (unsigned long)
Similar to __builtin_ctz, except the argument type is unsigned long.
— Built-in Function: int __builtin_popcountl (unsigned long)
Similar to __builtin_popcount, except the argument type is unsigned long.
— Built-in Function: int __builtin_parityl (unsigned long)
Similar to __builtin_parity, except the argument type is unsigned long.
— Built-in Function: int __builtin_ffsll (unsigned long long)
Similar to __builtin_ffs, except the argument type is unsigned long long.
— Built-in Function: int __builtin_clzll (unsigned long long)
Similar to __builtin_clz, except the argument type is unsigned long long.
— Built-in Function: int __builtin_ctzll (unsigned long long)
Similar to __builtin_ctz, except the argument type is unsigned long long.
— Built-in Function: int __builtin_popcountll (unsigned long long)
Similar to __builtin_popcount, except the argument type is unsigned long long.
— Built-in Function: int __builtin_parityll (unsigned long long)
Similar to __builtin_parity, except the argument type is unsigned long long.
- C++里的几个常用的二进制位内置函数
- glibc的几个有用的处理二进制位的内置函数
- glibc的几个有用的处理二进制位的内置函数
- glibc的几个有用的处理二进制位的内置函数
- glibc的几个有用的处理二进制位的内置函数
- Tip_glibc的几个有用的处理二进制位的内置函数
- glibc的几个有用的处理二进制位的内置函数
- glibc的几个有用的处理二进制位的内置函数
- glibc的几个有用的处理二进制位的内置函数
- glibc的几个有用的处理二进制位的内置函数
- GCC 处理二进制位的内置函数
- php对字符串加密解密常用的几个内置函数
- c++ algorithm中常用的几个内置函数
- C++<algorithm>能用到的几个内置函数
- 几个常用C语言函数的分析
- C语言几个常用的函数
- c里常见的几个有用的函数总结
- javaScript 常用的几个内置对象
- 希尔排序 代码
- 如何正确的选择运算放大器
- Android开发之AsyncTask机制及使用细节
- Android http 请求
- 键盘过滤驱动之IRP劫持
- C++里的几个常用的二进制位内置函数
- 走进C标准库(2)——"stdio.h"中的fopen函数
- iOS8自带模糊效果
- Oracle触发器详解
- 【CodeForces】19D Points 线段树+set
- maven 更新webapp version 和 jdk version
- 做网页的一点心得
- HDU_ACM-2001 计算两点间的距离
- ArcGIS教程:训练样本评估工具