Loading

二进制内置函数

  • int __builtin_ffs (unsigned int x)
    返回右起第一个 \(1\) 的位置。

  • int __builtin_clz (unsigned int x)
    返回左起第一个 \(1\) 之前 \(0\) 的个数。

  • int __builtin_ctz (unsigned int x)
    返回右起第一个 \(1\) 之前 \(0\) 的个数。

  • int __builtin_popcount (unsigned int x)
    返回 \(1\) 的个数

  • int __builtin_parity (unsigned int x)
    返回 \(1\) 的个数的奇偶性

posted @ 2024-10-11 15:09  Sktn0089  阅读(19)  评论(0)    收藏  举报