XWOS API  3.0
XWOS API参考手册
载入中...
搜索中...
未找到
位操作 的协作图:

宏定义

#define XWBOP_BIT(n)   ((xwbmp_t)1 << (n))
 
#define XWBOP_BMP_MASK(n)   ((xwbmp_t)1 << (xwbmp_t)((n) % BITS_PER_XWBMP_T))
 
#define XWBOP_BMP(n)   ((n) / BITS_PER_XWBMP_T)
 
#define XWBOP_DIV_ROUND(n, d)   ((n) / (d))
 
#define XWBOP_DIV_ROUND_UP(n, d)   (((n) + (d) - 1U) / (d))
 
#define XWBOP_SHIFT_ROUND(n, s)   ((n) >> (s))
 
#define XWBOP_SHIFT_ROUND_UP(n, s)   (((n) + (1ULL << (s)) - 1ULL) >> (s))
 
#define BITS_TO_XWU8_T(n)   XWBOP_DIV_ROUND_UP(n, BITS_PER_XWU8_T)
 
#define BITS_TO_XWBMP_T(n)   XWBOP_DIV_ROUND_UP(n, BITS_PER_XWU8_T * sizeof(xwbmp_t))
 
#define XWBOP_ROUND(x, n)   ((x) & (~((n) - 1U)))
 
#define XWBOP_ALIGN(x, n)   (((x) + ((n) - 1U)) & (~((n) - 1U)))
 
#define XWBOP_TBIT(x, n)   (((x) >> (n)) & 1U)
 
#define xwbop_s1m8(a, mask)   *(a) |= (mask)
 
#define xwbop_c0m8(a, mask)   *(a) &= (~(mask))
 
#define xwbop_x1m8(a, mask)   *(a) ^= (mask)
 
#define xwbop_s1m16(a, mask)   *(a) |= (mask)
 
#define xwbop_c0m16(a, mask)   *(a) &= (~(mask))
 
#define xwbop_x1m16(a, mask)   *(a) ^= (mask)
 
#define xwbop_s1m32(a, mask)   *(a) |= (mask)
 
#define xwbop_c0m32(a, mask)   *(a) &= (~(mask))
 
#define xwbop_x1m32(a, mask)   *(a) ^= (mask)
 
#define xwbop_s1m64(a64, mask64)   *((xwu64_t *)(a64)) |= (mask64)
 
#define xwbop_c0m64(a64, mask64)   *((xwu64_t *)(a64)) &= (~(mask64))
 
#define xwbop_x1m64(a64, mask64)   *((xwu64_t *)(a64)) ^= (mask64)
 
#define xwbop(type, op, ...)   xwbop_##op##__##type(__VA_ARGS__)
 XWOS BOPLIB:调用位操作函数模板
 
#define xwbop_s1m(type, addr, mask)   xwbop(type, s1m, (addr), (mask))
 XWOS BOPLIB:将数据掩码部分的位全部置1
 
#define xwbop_c0m(type, addr, mask)   xwbop(type, c0m, (addr), (mask))
 XWOS BOPLIB:将数据掩码部分的位全部清0
 
#define xwbop_x1m(type, addr, mask)   xwbop(type, x1m, (addr), (mask))
 XWOS BOPLIB:将数据掩码部分的位全部翻转
 
#define xwbop_rbit(type, data)   xwbop(type, rbit, (data))
 XWOS BOPLIB:将数据的位镜面翻转
 
#define xwbop_re(type, data)   xwbop(type, re, (data))
 XWOS BOPLIB:将数据的大小端翻转
 
#define xwbop_ffs(type, data)   xwbop(type, ffs, (data))
 XWOS BOPLIB:在数据中从最低位起查找第一个被置1的位
 
#define xwbop_fls(type, data)   xwbop(type, fls, (data))
 XWOS BOPLIB:在数据中从最高位起查找第一个被置1的位
 
#define xwbop_ffz(type, data)   xwbop(type, flz, (data))
 XWOS BOPLIB:在数据中从最低位起查找第一个被清0的位
 
#define xwbop_flz(type, data)   xwbop(type, flz, (data))
 XWOS BOPLIB:在数据中从最高位起查找第一个被清0的位
 
#define xwbop_weight(type, data)   xwbop(type, weight, (data))
 XWOS BOPLIB:统计数据中1的个数
 
#define DEFINE_XWBOP_S1M(type, bw)
 定义位操作模板:s1m
 
#define DEFINE_XWBOP_C0M(type, bw)
 定义位操作模板:c0m
 
#define DEFINE_XWBOP_X1M(type, bw)
 定义位操作模板:x1m
 
#define DEFINE_XWBOP_RBIT(type, bw)
 定义位操作模板:rbit
 
#define DEFINE_XWBOP_RE(type, bw)
 定义位操作模板:re
 
#define DEFINE_XWBOP_FFS(type, bw)
 定义位操作模板:ffs
 
#define DEFINE_XWBOP_FLS(type, bw)
 定义位操作模板:fls
 
#define DEFINE_XWBOP_FLZ(type, bw)
 定义位操作模板:flz
 
#define DEFINE_XWBOP_FFZ(type, bw)
 定义位操作模板:ffz
 
#define DEFINE_XWBOP_WEIGHT(type, bw)
 定义位操作模板:weight
 
#define DEFINE_XWBOP(type, bw)
 使用模板为类型定义所有的位操作函数
 
#define xwbmpop_define(name, bits)   xwbmp_t name[BITS_TO_XWBMP_T(bits)]
 XWOS BOPLIB:声明位图
 

函数

xwssq_t xwbop_ffs8 (xwu8_t x)
 
xwssq_t xwbop_fls8 (xwu8_t x)
 
static xwssq_t xwbop_ffz8 (xwu8_t x)
 
static xwssq_t xwbop_flz8 (xwu8_t x)
 
xwu8_t xwbop_rbit8 (xwu8_t x)
 
static xwu8_t xwbop_re8 (xwu8_t x)
 
xwsz_t xwbop_weight8 (xwu8_t x)
 
xwssq_t xwbop_ffs16 (xwu16_t x)
 
xwssq_t xwbop_fls16 (xwu16_t x)
 
static xwssq_t xwbop_ffz16 (xwu16_t x)
 
static xwssq_t xwbop_flz16 (xwu16_t x)
 
xwu16_t xwbop_rbit16 (xwu16_t x)
 
xwu16_t xwbop_re16 (xwu16_t a)
 
xwsz_t xwbop_weight16 (xwu16_t x)
 
xwssq_t xwbop_ffs32 (xwu32_t x)
 
xwssq_t xwbop_fls32 (xwu32_t x)
 
static xwssq_t xwbop_ffz32 (xwu32_t x)
 
static xwssq_t xwbop_flz32 (xwu32_t x)
 
xwu32_t xwbop_rbit32 (xwu32_t x)
 
xwu32_t xwbop_re32 (xwu32_t x)
 
xwsz_t xwbop_weight32 (xwu32_t x)
 
xwssq_t xwbop_ffs64 (xwu64_t x)
 
xwssq_t xwbop_fls64 (xwu64_t x)
 
static xwssq_t xwbop_ffz64 (xwu64_t x)
 
static xwssq_t xwbop_flz64 (xwu64_t x)
 
xwu64_t xwbop_re64 (xwu64_t x)
 
xwu64_t xwbop_rbit64 (xwu64_t x)
 
xwsz_t xwbop_weight64 (xwu64_t x)
 
static void xwbop_s1m__xwu8_t (xwu8_t *x, xwu8_t m)
 
static void xwbop_c0m__xwu8_t (xwu8_t *x, xwu8_t m)
 
static void xwbop_x1m__xwu8_t (xwu8_t *x, xwu8_t m)
 
static xwu8_t xwbop_rbit__xwu8_t (xwu8_t x)
 
static xwu8_t xwbop_re__xwu8_t (xwu8_t x)
 
static xwssq_t xwbop_ffs__xwu8_t (xwu8_t x)
 
static xwssq_t xwbop_fls__xwu8_t (xwu8_t x)
 
static xwssq_t xwbop_flz__xwu8_t (xwu8_t x)
 
static xwssq_t xwbop_ffz__xwu8_t (xwu8_t x)
 
static xwsq_t xwbop_weight__xwu8_t (xwu8_t x)
 
static void xwbop_s1m__xws8_t (xws8_t *x, xws8_t m)
 
static void xwbop_c0m__xws8_t (xws8_t *x, xws8_t m)
 
static void xwbop_x1m__xws8_t (xws8_t *x, xws8_t m)
 
static xws8_t xwbop_rbit__xws8_t (xws8_t x)
 
static xws8_t xwbop_re__xws8_t (xws8_t x)
 
static xwssq_t xwbop_ffs__xws8_t (xws8_t x)
 
static xwssq_t xwbop_fls__xws8_t (xws8_t x)
 
static xwssq_t xwbop_flz__xws8_t (xws8_t x)
 
static xwssq_t xwbop_ffz__xws8_t (xws8_t x)
 
static xwsq_t xwbop_weight__xws8_t (xws8_t x)
 
static void xwbop_s1m__xwu16_t (xwu16_t *x, xwu16_t m)
 
static void xwbop_c0m__xwu16_t (xwu16_t *x, xwu16_t m)
 
static void xwbop_x1m__xwu16_t (xwu16_t *x, xwu16_t m)
 
static xwu16_t xwbop_rbit__xwu16_t (xwu16_t x)
 
static xwu16_t xwbop_re__xwu16_t (xwu16_t x)
 
static xwssq_t xwbop_ffs__xwu16_t (xwu16_t x)
 
static xwssq_t xwbop_fls__xwu16_t (xwu16_t x)
 
static xwssq_t xwbop_flz__xwu16_t (xwu16_t x)
 
static xwssq_t xwbop_ffz__xwu16_t (xwu16_t x)
 
static xwsq_t xwbop_weight__xwu16_t (xwu16_t x)
 
static void xwbop_s1m__xws16_t (xws16_t *x, xws16_t m)
 
static void xwbop_c0m__xws16_t (xws16_t *x, xws16_t m)
 
static void xwbop_x1m__xws16_t (xws16_t *x, xws16_t m)
 
static xws16_t xwbop_rbit__xws16_t (xws16_t x)
 
static xws16_t xwbop_re__xws16_t (xws16_t x)
 
static xwssq_t xwbop_ffs__xws16_t (xws16_t x)
 
static xwssq_t xwbop_fls__xws16_t (xws16_t x)
 
static xwssq_t xwbop_flz__xws16_t (xws16_t x)
 
static xwssq_t xwbop_ffz__xws16_t (xws16_t x)
 
static xwsq_t xwbop_weight__xws16_t (xws16_t x)
 
static void xwbop_s1m__xwu32_t (xwu32_t *x, xwu32_t m)
 
static void xwbop_c0m__xwu32_t (xwu32_t *x, xwu32_t m)
 
static void xwbop_x1m__xwu32_t (xwu32_t *x, xwu32_t m)
 
static xwu32_t xwbop_rbit__xwu32_t (xwu32_t x)
 
static xwu32_t xwbop_re__xwu32_t (xwu32_t x)
 
static xwssq_t xwbop_ffs__xwu32_t (xwu32_t x)
 
static xwssq_t xwbop_fls__xwu32_t (xwu32_t x)
 
static xwssq_t xwbop_flz__xwu32_t (xwu32_t x)
 
static xwssq_t xwbop_ffz__xwu32_t (xwu32_t x)
 
static xwsq_t xwbop_weight__xwu32_t (xwu32_t x)
 
static void xwbop_s1m__xws32_t (xws32_t *x, xws32_t m)
 
static void xwbop_c0m__xws32_t (xws32_t *x, xws32_t m)
 
static void xwbop_x1m__xws32_t (xws32_t *x, xws32_t m)
 
static xws32_t xwbop_rbit__xws32_t (xws32_t x)
 
static xws32_t xwbop_re__xws32_t (xws32_t x)
 
static xwssq_t xwbop_ffs__xws32_t (xws32_t x)
 
static xwssq_t xwbop_fls__xws32_t (xws32_t x)
 
static xwssq_t xwbop_flz__xws32_t (xws32_t x)
 
static xwssq_t xwbop_ffz__xws32_t (xws32_t x)
 
static xwsq_t xwbop_weight__xws32_t (xws32_t x)
 
static void xwbop_s1m__xwu64_t (xwu64_t *x, xwu64_t m)
 
static void xwbop_c0m__xwu64_t (xwu64_t *x, xwu64_t m)
 
static void xwbop_x1m__xwu64_t (xwu64_t *x, xwu64_t m)
 
static xwu64_t xwbop_rbit__xwu64_t (xwu64_t x)
 
static xwu64_t xwbop_re__xwu64_t (xwu64_t x)
 
static xwssq_t xwbop_ffs__xwu64_t (xwu64_t x)
 
static xwssq_t xwbop_fls__xwu64_t (xwu64_t x)
 
static xwssq_t xwbop_flz__xwu64_t (xwu64_t x)
 
static xwssq_t xwbop_ffz__xwu64_t (xwu64_t x)
 
static xwsq_t xwbop_weight__xwu64_t (xwu64_t x)
 
static void xwbop_s1m__xws64_t (xws64_t *x, xws64_t m)
 
static void xwbop_c0m__xws64_t (xws64_t *x, xws64_t m)
 
static void xwbop_x1m__xws64_t (xws64_t *x, xws64_t m)
 
static xws64_t xwbop_rbit__xws64_t (xws64_t x)
 
static xws64_t xwbop_re__xws64_t (xws64_t x)
 
static xwssq_t xwbop_ffs__xws64_t (xws64_t x)
 
static xwssq_t xwbop_fls__xws64_t (xws64_t x)
 
static xwssq_t xwbop_flz__xws64_t (xws64_t x)
 
static xwssq_t xwbop_ffz__xws64_t (xws64_t x)
 
static xwsq_t xwbop_weight__xws64_t (xws64_t x)
 
static void xwbop_s1m__xwsz_t (xwsz_t *x, xwsz_t m)
 
static void xwbop_c0m__xwsz_t (xwsz_t *x, xwsz_t m)
 
static void xwbop_x1m__xwsz_t (xwsz_t *x, xwsz_t m)
 
static xwsz_t xwbop_rbit__xwsz_t (xwsz_t x)
 
static xwsz_t xwbop_re__xwsz_t (xwsz_t x)
 
static xwssq_t xwbop_ffs__xwsz_t (xwsz_t x)
 
static xwssq_t xwbop_fls__xwsz_t (xwsz_t x)
 
static xwssq_t xwbop_flz__xwsz_t (xwsz_t x)
 
static xwssq_t xwbop_ffz__xwsz_t (xwsz_t x)
 
static xwsq_t xwbop_weight__xwsz_t (xwsz_t x)
 
static void xwbop_s1m__xwptr_t (xwptr_t *x, xwptr_t m)
 
static void xwbop_c0m__xwptr_t (xwptr_t *x, xwptr_t m)
 
static void xwbop_x1m__xwptr_t (xwptr_t *x, xwptr_t m)
 
static xwptr_t xwbop_rbit__xwptr_t (xwptr_t x)
 
static xwptr_t xwbop_re__xwptr_t (xwptr_t x)
 
static xwssq_t xwbop_ffs__xwptr_t (xwptr_t x)
 
static xwssq_t xwbop_fls__xwptr_t (xwptr_t x)
 
static xwssq_t xwbop_flz__xwptr_t (xwptr_t x)
 
static xwssq_t xwbop_ffz__xwptr_t (xwptr_t x)
 
static xwsq_t xwbop_weight__xwptr_t (xwptr_t x)
 
static void xwbop_s1m__xwid_t (xwid_t *x, xwid_t m)
 
static void xwbop_c0m__xwid_t (xwid_t *x, xwid_t m)
 
static void xwbop_x1m__xwid_t (xwid_t *x, xwid_t m)
 
static xwid_t xwbop_rbit__xwid_t (xwid_t x)
 
static xwid_t xwbop_re__xwid_t (xwid_t x)
 
static xwssq_t xwbop_ffs__xwid_t (xwid_t x)
 
static xwssq_t xwbop_fls__xwid_t (xwid_t x)
 
static xwssq_t xwbop_flz__xwid_t (xwid_t x)
 
static xwssq_t xwbop_ffz__xwid_t (xwid_t x)
 
static xwsq_t xwbop_weight__xwid_t (xwid_t x)
 
static void xwbop_s1m__xwreg_t (xwreg_t *x, xwreg_t m)
 
static void xwbop_c0m__xwreg_t (xwreg_t *x, xwreg_t m)
 
static void xwbop_x1m__xwreg_t (xwreg_t *x, xwreg_t m)
 
static xwreg_t xwbop_rbit__xwreg_t (xwreg_t x)
 
static xwreg_t xwbop_re__xwreg_t (xwreg_t x)
 
static xwssq_t xwbop_ffs__xwreg_t (xwreg_t x)
 
static xwssq_t xwbop_fls__xwreg_t (xwreg_t x)
 
static xwssq_t xwbop_flz__xwreg_t (xwreg_t x)
 
static xwssq_t xwbop_ffz__xwreg_t (xwreg_t x)
 
static xwsq_t xwbop_weight__xwreg_t (xwreg_t x)
 
static void xwbop_s1m__xwsq_t (xwsq_t *x, xwsq_t m)
 
static void xwbop_c0m__xwsq_t (xwsq_t *x, xwsq_t m)
 
static void xwbop_x1m__xwsq_t (xwsq_t *x, xwsq_t m)
 
static xwsq_t xwbop_rbit__xwsq_t (xwsq_t x)
 
static xwsq_t xwbop_re__xwsq_t (xwsq_t x)
 
static xwssq_t xwbop_ffs__xwsq_t (xwsq_t x)
 
static xwssq_t xwbop_fls__xwsq_t (xwsq_t x)
 
static xwssq_t xwbop_flz__xwsq_t (xwsq_t x)
 
static xwssq_t xwbop_ffz__xwsq_t (xwsq_t x)
 
static xwsq_t xwbop_weight__xwsq_t (xwsq_t x)
 
static void xwbop_s1m__xwbmp_t (xwbmp_t *x, xwbmp_t m)
 
static void xwbop_c0m__xwbmp_t (xwbmp_t *x, xwbmp_t m)
 
static void xwbop_x1m__xwbmp_t (xwbmp_t *x, xwbmp_t m)
 
static xwbmp_t xwbop_rbit__xwbmp_t (xwbmp_t x)
 
static xwbmp_t xwbop_re__xwbmp_t (xwbmp_t x)
 
static xwssq_t xwbop_ffs__xwbmp_t (xwbmp_t x)
 
static xwssq_t xwbop_fls__xwbmp_t (xwbmp_t x)
 
static xwssq_t xwbop_flz__xwbmp_t (xwbmp_t x)
 
static xwssq_t xwbop_ffz__xwbmp_t (xwbmp_t x)
 
static xwsq_t xwbop_weight__xwbmp_t (xwbmp_t x)
 
void xwbmpop_assign (xwbmp_t *bmp, xwbmp_t opd[], xwsz_t num)
 XWOS BOPLIB:赋值操作数到位图
 
xwssq_t xwbmpop_cmp (xwbmp_t *bmp, xwbmp_t opd[], xwsz_t num)
 XWOS BOPLIB:从数组最高元素开始比较两个位图的数值大小
 
void xwbmpop_s1all (xwbmp_t *bmp, xwsq_t num)
 XWOS BOPLIB:将位图中所有位置1
 
void xwbmpop_c0all (xwbmp_t *bmp, xwsq_t num)
 XWOS BOPLIB:将位图中所有位清0
 
void xwbmpop_s1i (xwbmp_t *bmp, xwsq_t n)
 XWOS BOPLIB:将位图中单个位置1
 
void xwbmpop_s1m (xwbmp_t *bmp, xwbmp_t msk[], xwsz_t num)
 XWOS BOPLIB:将位图中掩码部分置1
 
void xwbmpop_c0i (xwbmp_t *bmp, xwsq_t n)
 XWOS BOPLIB:将位图中单个位清0
 
void xwbmpop_c0m (xwbmp_t *bmp, xwbmp_t msk[], xwsz_t num)
 XWOS BOPLIB:将位图中掩码部分清0
 
void xwbmpop_x1i (xwbmp_t *bmp, xwsq_t n)
 XWOS BOPLIB:将位图中单个位翻转
 
void xwbmpop_x1m (xwbmp_t *bmp, xwbmp_t msk[], xwsz_t num)
 XWOS BOPLIB:将位图中掩码部分翻转
 
bool xwbmpop_t1i (xwbmp_t *bmp, xwsq_t n)
 XWOS BOPLIB:测试位图中的单个位是否为1
 
bool xwbmpop_t1ma (xwbmp_t *bmp, xwbmp_t msk[], xwsz_t num)
 XWOS BOPLIB:测试位图中掩码部分是否全部为1
 
bool xwbmpop_t1ma_then_c0m (xwbmp_t *bmp, xwbmp_t msk[], xwsz_t num)
 XWOS BOPLIB:测试位图中掩码部分是否全部为1,如果是,就将掩码部分全部清0
 
bool xwbmpop_t1mo (xwbmp_t *bmp, xwbmp_t msk[], xwsz_t num)
 XWOS BOPLIB:测试位图中掩码部分是否至少有一位为1
 
bool xwbmpop_t1mo_then_c0m (xwbmp_t *bmp, xwbmp_t msk[], xwsz_t num)
 XWOS BOPLIB:测试位图中掩码部分是否至少有一位为1,如果是,就将掩码部分全部清0
 
bool xwbmpop_t0ma (xwbmp_t *bmp, xwbmp_t msk[], xwsz_t num)
 XWOS BOPLIB:测试位图中掩码部分是否全部为0
 
bool xwbmpop_t0ma_then_s1m (xwbmp_t *bmp, xwbmp_t msk[], xwsz_t num)
 XWOS BOPLIB:测试位图中掩码部分是否全部为0,如果是,就将掩码部分全部置1
 
bool xwbmpop_t0mo (xwbmp_t *bmp, xwbmp_t msk[], xwsz_t num)
 XWOS BOPLIB:测试位图中掩码部分是否至少有一位为0
 
bool xwbmpop_t0mo_then_s1m (xwbmp_t *bmp, xwbmp_t msk[], xwsz_t num)
 XWOS BOPLIB:测试位图中掩码部分是否至少有一位为0,如果是,就将掩码部分全部置1
 
void xwbmpop_not (xwbmp_t *bmp, xwsz_t num)
 XWOS BOPLIB:将位图按位取反
 
void xwbmpop_and (xwbmp_t *bmp, xwbmp_t opd[], xwsz_t num)
 XWOS BOPLIB:将位图与操作数进行逐位“与”运算
 
void xwbmpop_or (xwbmp_t *bmp, xwbmp_t opd[], xwsz_t num)
 XWOS BOPLIB:将位图与操作数进行逐位“或”运算
 
void xwbmpop_xor (xwbmp_t *bmp, xwbmp_t opd[], xwsz_t num)
 XWOS BOPLIB:将位图与操作数进行逐位“异或”运算
 
xwssq_t xwbmpop_ffs (xwbmp_t *bmp, xwsz_t num)
 XWOS BOPLIB:在位图中从最低位起查找第一个被置1的位
 
xwssq_t xwbmpop_ffz (xwbmp_t *bmp, xwsz_t num)
 XWOS BOPLIB:在位图中从最低位起查找第一个被清0的位
 
xwssq_t xwbmpop_fls (xwbmp_t *bmp, xwsz_t num)
 XWOS BOPLIB:在位图中从最高位起查找第一个被置1的位
 
xwssq_t xwbmpop_flz (xwbmp_t *bmp, xwsz_t num)
 XWOS BOPLIB:在位图中从最高位起查找第一个被清0的位
 
xwsz_t xwbmpop_weight (xwbmp_t *bmp, xwsz_t num)
 XWOS BOPLIB:在位图中统计被置1的位的个数
 

详细描述

宏定义说明

◆ BITS_TO_XWBMP_T

#define BITS_TO_XWBMP_T (   n)    XWBOP_DIV_ROUND_UP(n, BITS_PER_XWU8_T * sizeof(xwbmp_t))

在文件 xwbop.h35 行定义.

◆ BITS_TO_XWU8_T

#define BITS_TO_XWU8_T (   n)    XWBOP_DIV_ROUND_UP(n, BITS_PER_XWU8_T)

在文件 xwbop.h34 行定义.

◆ DEFINE_XWBOP

#define DEFINE_XWBOP (   type,
  bw 
)
值:
DEFINE_XWBOP_S1M(type, bw) \
DEFINE_XWBOP_C0M(type, bw) \
DEFINE_XWBOP_X1M(type, bw) \
DEFINE_XWBOP_RBIT(type, bw) \
DEFINE_XWBOP_RE(type, bw) \
DEFINE_XWBOP_FFS(type, bw) \
DEFINE_XWBOP_FLS(type, bw) \
DEFINE_XWBOP_FLZ(type, bw) \
DEFINE_XWBOP_FFZ(type, bw) \
DEFINE_XWBOP_WEIGHT(type, bw)
#define DEFINE_XWBOP_S1M(type, bw)
定义位操作模板:s1m
Definition xwbop.h:253

使用模板为类型定义所有的位操作函数

参数
[in]type类型
[in]bw位宽

在文件 xwbop.h373 行定义.

◆ DEFINE_XWBOP_C0M

#define DEFINE_XWBOP_C0M (   type,
  bw 
)
值:
static __xwlib_inline \
void xwbop_c0m__##type(type * x, type m) \
{ \
xwbop_c0m##bw((xwu##bw##_t *)x, (xwu##bw##_t)m); \
}
#define xwbop_c0m(type, addr, mask)
XWOS BOPLIB:将数据掩码部分的位全部清0
Definition xwbop.h:165

定义位操作模板:c0m

参数
[in]type类型
[in]bw位宽

在文件 xwbop.h265 行定义.

◆ DEFINE_XWBOP_FFS

#define DEFINE_XWBOP_FFS (   type,
  bw 
)
值:
static __xwlib_inline \
xwssq_t xwbop_ffs__##type(type x) \
{ \
return xwbop_ffs##bw((xwu##bw##_t)x); \
}
#define xwbop_ffs(type, data)
XWOS BOPLIB:在数据中从最低位起查找第一个被置1的位
Definition xwbop.h:201

定义位操作模板:ffs

参数
[in]type类型
[in]bw位宽

在文件 xwbop.h313 行定义.

◆ DEFINE_XWBOP_FFZ

#define DEFINE_XWBOP_FFZ (   type,
  bw 
)
值:
static __xwlib_inline \
xwssq_t xwbop_ffz__##type(type x) \
{ \
return xwbop_ffz##bw((xwu##bw##_t)x); \
}
#define xwbop_ffz(type, data)
XWOS BOPLIB:在数据中从最低位起查找第一个被清0的位
Definition xwbop.h:225

定义位操作模板:ffz

参数
[in]type类型
[in]bw位宽

在文件 xwbop.h349 行定义.

◆ DEFINE_XWBOP_FLS

#define DEFINE_XWBOP_FLS (   type,
  bw 
)
值:
static __xwlib_inline \
xwssq_t xwbop_fls__##type(type x) \
{ \
return xwbop_fls##bw((xwu##bw##_t)x); \
}
#define xwbop_fls(type, data)
XWOS BOPLIB:在数据中从最高位起查找第一个被置1的位
Definition xwbop.h:213

定义位操作模板:fls

参数
[in]type类型
[in]bw位宽

在文件 xwbop.h325 行定义.

◆ DEFINE_XWBOP_FLZ

#define DEFINE_XWBOP_FLZ (   type,
  bw 
)
值:
static __xwlib_inline \
xwssq_t xwbop_flz__##type(type x) \
{ \
return xwbop_flz##bw((xwu##bw##_t)x); \
}
#define xwbop_flz(type, data)
XWOS BOPLIB:在数据中从最高位起查找第一个被清0的位
Definition xwbop.h:237

定义位操作模板:flz

参数
[in]type类型
[in]bw位宽

在文件 xwbop.h337 行定义.

◆ DEFINE_XWBOP_RBIT

#define DEFINE_XWBOP_RBIT (   type,
  bw 
)
值:
static __xwlib_inline \
type xwbop_rbit__##type(type x) \
{ \
return (type)xwbop_rbit##bw((xwu##bw##_t)x); \
}
#define xwbop_rbit(type, data)
XWOS BOPLIB:将数据的位镜面翻转
Definition xwbop.h:181

定义位操作模板:rbit

参数
[in]type类型
[in]bw位宽

在文件 xwbop.h289 行定义.

◆ DEFINE_XWBOP_RE

#define DEFINE_XWBOP_RE (   type,
  bw 
)
值:
static __xwlib_inline \
type xwbop_re__##type(type x) \
{ \
return (type)xwbop_re##bw((xwu##bw##_t)x); \
}
#define xwbop_re(type, data)
XWOS BOPLIB:将数据的大小端翻转
Definition xwbop.h:189

定义位操作模板:re

参数
[in]type类型
[in]bw位宽

在文件 xwbop.h301 行定义.

◆ DEFINE_XWBOP_S1M

#define DEFINE_XWBOP_S1M (   type,
  bw 
)
值:
static __xwlib_inline \
void xwbop_s1m__##type(type * x, type m) \
{ \
xwbop_s1m##bw((xwu##bw##_t *)x, (xwu##bw##_t)m); \
}
#define xwbop_s1m(type, addr, mask)
XWOS BOPLIB:将数据掩码部分的位全部置1
Definition xwbop.h:157

定义位操作模板:s1m

参数
[in]type类型
[in]bw位宽

在文件 xwbop.h253 行定义.

◆ DEFINE_XWBOP_WEIGHT

#define DEFINE_XWBOP_WEIGHT (   type,
  bw 
)
值:
static __xwlib_inline \
xwsq_t xwbop_weight__##type(type x) \
{ \
return xwbop_weight##bw((xwu##bw##_t)x); \
}
#define xwbop_weight(type, data)
XWOS BOPLIB:统计数据中1的个数
Definition xwbop.h:245

定义位操作模板:weight

参数
[in]type类型
[in]bw位宽

在文件 xwbop.h361 行定义.

◆ DEFINE_XWBOP_X1M

#define DEFINE_XWBOP_X1M (   type,
  bw 
)
值:
static __xwlib_inline \
void xwbop_x1m__##type(type * x, type m) \
{ \
xwbop_x1m##bw((xwu##bw##_t *)x, (xwu##bw##_t)m); \
}
#define xwbop_x1m(type, addr, mask)
XWOS BOPLIB:将数据掩码部分的位全部翻转
Definition xwbop.h:173

定义位操作模板:x1m

参数
[in]type类型
[in]bw位宽

在文件 xwbop.h277 行定义.

◆ xwbmpop_define

#define xwbmpop_define (   name,
  bits 
)    xwbmp_t name[BITS_TO_XWBMP_T(bits)]

XWOS BOPLIB:声明位图

参数
[in]name符号名
[in]bits位图中的位数

在文件 xwbop.h457 行定义.

◆ xwbop

#define xwbop (   type,
  op,
  ... 
)    xwbop_##op##__##type(__VA_ARGS__)

XWOS BOPLIB:调用位操作函数模板

参数
[in]type数据类型
[in]op位操作函数
[in]...函数的参数

在文件 xwbop.h149 行定义.

◆ XWBOP_ALIGN

#define XWBOP_ALIGN (   x,
 
)    (((x) + ((n) - 1U)) & (~((n) - 1U)))

在文件 xwbop.h37 行定义.

◆ XWBOP_BIT

#define XWBOP_BIT (   n)    ((xwbmp_t)1 << (n))

在文件 xwbop.h27 行定义.

◆ XWBOP_BMP

#define XWBOP_BMP (   n)    ((n) / BITS_PER_XWBMP_T)

在文件 xwbop.h29 行定义.

◆ XWBOP_BMP_MASK

#define XWBOP_BMP_MASK (   n)    ((xwbmp_t)1 << (xwbmp_t)((n) % BITS_PER_XWBMP_T))

在文件 xwbop.h28 行定义.

◆ xwbop_c0m

#define xwbop_c0m (   type,
  addr,
  mask 
)    xwbop(type, c0m, (addr), (mask))

XWOS BOPLIB:将数据掩码部分的位全部清0

参数
[in]type数据类型
[in]addr数据的地址
[in]mask位的掩码

在文件 xwbop.h165 行定义.

◆ xwbop_c0m16

#define xwbop_c0m16 (   a,
  mask 
)    *(a) &= (~(mask))

在文件 xwbop.h72 行定义.

◆ xwbop_c0m32

#define xwbop_c0m32 (   a,
  mask 
)    *(a) &= (~(mask))

在文件 xwbop.h96 行定义.

◆ xwbop_c0m64

#define xwbop_c0m64 (   a64,
  mask64 
)    *((xwu64_t *)(a64)) &= (~(mask64))

在文件 xwbop.h120 行定义.

◆ xwbop_c0m8

#define xwbop_c0m8 (   a,
  mask 
)    *(a) &= (~(mask))

在文件 xwbop.h42 行定义.

◆ XWBOP_DIV_ROUND

#define XWBOP_DIV_ROUND (   n,
 
)    ((n) / (d))

在文件 xwbop.h30 行定义.

◆ XWBOP_DIV_ROUND_UP

#define XWBOP_DIV_ROUND_UP (   n,
 
)    (((n) + (d) - 1U) / (d))

在文件 xwbop.h31 行定义.

◆ xwbop_ffs

#define xwbop_ffs (   type,
  data 
)    xwbop(type, ffs, (data))

XWOS BOPLIB:在数据中从最低位起查找第一个被置1的位

参数
[in]type数据类型
[in]data数据(注:非指针)
返回
位的序号
返回值
>=0位的序号
-1没有任何一个位为1
注解
  • 返回的序号是从0开始编号的,与C标准库中ffs()函数返回值不同。

在文件 xwbop.h201 行定义.

◆ xwbop_ffz

#define xwbop_ffz (   type,
  data 
)    xwbop(type, flz, (data))

XWOS BOPLIB:在数据中从最低位起查找第一个被清0的位

参数
[in]type数据类型
[in]data数据(注:非指针)
返回
位的序号
返回值
>=0位的序号
-1没有任何一个位为0
注解
  • 返回的序号是从0开始编号的。

在文件 xwbop.h225 行定义.

◆ xwbop_fls

#define xwbop_fls (   type,
  data 
)    xwbop(type, fls, (data))

XWOS BOPLIB:在数据中从最高位起查找第一个被置1的位

参数
[in]type数据类型
[in]data数据(注:非指针)
返回
位的序号
返回值
>=0位的序号
-1没有任何一个位为1
注解
  • 返回的序号是从0开始编号的。

在文件 xwbop.h213 行定义.

◆ xwbop_flz

#define xwbop_flz (   type,
  data 
)    xwbop(type, flz, (data))

XWOS BOPLIB:在数据中从最高位起查找第一个被清0的位

参数
[in]type数据类型
[in]data数据(注:非指针)
返回
位的序号
返回值
>=0位的序号
-1没有任何一个位为0
注解
  • 返回的序号是从0开始编号的。

在文件 xwbop.h237 行定义.

◆ xwbop_rbit

#define xwbop_rbit (   type,
  data 
)    xwbop(type, rbit, (data))

XWOS BOPLIB:将数据的位镜面翻转

参数
[in]type数据类型
[in]data数据(注:非指针)
返回
镜面翻转后的结果

在文件 xwbop.h181 行定义.

◆ xwbop_re

#define xwbop_re (   type,
  data 
)    xwbop(type, re, (data))

XWOS BOPLIB:将数据的大小端翻转

参数
[in]type数据类型
[in]data数据(注:非指针)
返回
大小端翻转后的结果

在文件 xwbop.h189 行定义.

◆ XWBOP_ROUND

#define XWBOP_ROUND (   x,
 
)    ((x) & (~((n) - 1U)))

在文件 xwbop.h36 行定义.

◆ xwbop_s1m

#define xwbop_s1m (   type,
  addr,
  mask 
)    xwbop(type, s1m, (addr), (mask))

XWOS BOPLIB:将数据掩码部分的位全部置1

参数
[in]type数据类型
[in]addr数据的地址
[in]mask位的掩码

在文件 xwbop.h157 行定义.

◆ xwbop_s1m16

#define xwbop_s1m16 (   a,
  mask 
)    *(a) |= (mask)

在文件 xwbop.h71 行定义.

◆ xwbop_s1m32

#define xwbop_s1m32 (   a,
  mask 
)    *(a) |= (mask)

在文件 xwbop.h95 行定义.

◆ xwbop_s1m64

#define xwbop_s1m64 (   a64,
  mask64 
)    *((xwu64_t *)(a64)) |= (mask64)

在文件 xwbop.h119 行定义.

◆ xwbop_s1m8

#define xwbop_s1m8 (   a,
  mask 
)    *(a) |= (mask)

在文件 xwbop.h41 行定义.

◆ XWBOP_SHIFT_ROUND

#define XWBOP_SHIFT_ROUND (   n,
 
)    ((n) >> (s))

在文件 xwbop.h32 行定义.

◆ XWBOP_SHIFT_ROUND_UP

#define XWBOP_SHIFT_ROUND_UP (   n,
 
)    (((n) + (1ULL << (s)) - 1ULL) >> (s))

在文件 xwbop.h33 行定义.

◆ XWBOP_TBIT

#define XWBOP_TBIT (   x,
 
)    (((x) >> (n)) & 1U)

在文件 xwbop.h38 行定义.

◆ xwbop_weight

#define xwbop_weight (   type,
  data 
)    xwbop(type, weight, (data))

XWOS BOPLIB:统计数据中1的个数

参数
[in]type数据类型
[in]data数据(注:非指针)
返回
数据中1的个数

在文件 xwbop.h245 行定义.

◆ xwbop_x1m

#define xwbop_x1m (   type,
  addr,
  mask 
)    xwbop(type, x1m, (addr), (mask))

XWOS BOPLIB:将数据掩码部分的位全部翻转

参数
[in]type数据类型
[in]addr数据的地址
[in]mask位的掩码

在文件 xwbop.h173 行定义.

◆ xwbop_x1m16

#define xwbop_x1m16 (   a,
  mask 
)    *(a) ^= (mask)

在文件 xwbop.h73 行定义.

◆ xwbop_x1m32

#define xwbop_x1m32 (   a,
  mask 
)    *(a) ^= (mask)

在文件 xwbop.h97 行定义.

◆ xwbop_x1m64

#define xwbop_x1m64 (   a64,
  mask64 
)    *((xwu64_t *)(a64)) ^= (mask64)

在文件 xwbop.h121 行定义.

◆ xwbop_x1m8

#define xwbop_x1m8 (   a,
  mask 
)    *(a) ^= (mask)

在文件 xwbop.h43 行定义.

函数说明

◆ xwbmpop_and()

void xwbmpop_and ( xwbmp_t bmp,
xwbmp_t  opd[],
xwsz_t  num 
)

XWOS BOPLIB:将位图与操作数进行逐位“与”运算

参数
[in]bmp位图的起始地址指针
[in]opd操作数
[in]num掩码的有效位数

在文件 xwbop.c655 行定义.

656{
657 xwsq_t i;
658 xwsz_t size;
659
660 size = BITS_TO_XWBMP_T(num);
661 for (i = 0; i < size; i++) {
662 bmp[i] &= opd[i];
663 }
664}
unsigned long xwsz_t
Definition type.h:97
unsigned long xwsq_t
Definition type.h:145
#define BITS_TO_XWBMP_T(n)
Definition xwbop.h:35

◆ xwbmpop_assign()

void xwbmpop_assign ( xwbmp_t bmp,
xwbmp_t  opd[],
xwsz_t  num 
)

XWOS BOPLIB:赋值操作数到位图

参数
[in]bmp位图的起始地址指针
[in]opd操作数
[in]num位图中总的位数

在文件 xwbop.c352 行定义.

353{
354 xwsz_t n = BITS_TO_XWBMP_T(num);
355 xwsz_t i;
356
357 for (i = 0; i < n; i++) {
358 bmp[i] = opd[i];
359 }
360}

◆ xwbmpop_c0all()

void xwbmpop_c0all ( xwbmp_t bmp,
xwsq_t  num 
)

XWOS BOPLIB:将位图中所有位清0

参数
[in]bmp位图的起始地址指针
[in]num位图中总的位数

在文件 xwbop.c396 行定义.

397{
398 xwsz_t n = BITS_TO_XWBMP_T(num);
399 xwsz_t i;
400
401 for (i = 0; i < n; i++) {
402 xwbop_c0m(xwbmp_t, &bmp[i], (~(xwbmp_t)0));
403 }
404}
xwu32_t xwbmp_t
Definition type.h:201

◆ xwbmpop_c0i()

void xwbmpop_c0i ( xwbmp_t bmp,
xwsq_t  n 
)

XWOS BOPLIB:将位图中单个位清0

参数
[in]bmp位图的起始地址指针
[in]n被清0的位的序号

◆ xwbmpop_c0m()

void xwbmpop_c0m ( xwbmp_t bmp,
xwbmp_t  msk[],
xwsz_t  num 
)

XWOS BOPLIB:将位图中掩码部分清0

参数
[in]bmp位图的起始地址指针
[in]msk掩码
[in]num掩码的有效位数

在文件 xwbop.c437 行定义.

438{
439 xwsq_t i;
440 xwsz_t size;
441
442 size = BITS_TO_XWBMP_T(num);
443 for (i = 0; i < size; i++) {
444 xwbop_c0m(xwbmp_t, &bmp[i], msk[i]);
445 }
446}

◆ xwbmpop_cmp()

xwssq_t xwbmpop_cmp ( xwbmp_t bmp,
xwbmp_t  opd[],
xwsz_t  num 
)

XWOS BOPLIB:从数组最高元素开始比较两个位图的数值大小

参数
[in]bmp位图的起始地址指针
[in]opd操作数
[in]num位图中总的位数
返回
比较结果
返回值
0相等
<0小于
>0大于

在文件 xwbop.c363 行定义.

364{
365 xwsz_t n = BITS_TO_XWBMP_T(num);
366 xwsz_t i;
367 xwsz_t j;
368 xwssq_t ret;
369
370 ret = 0;
371 for (j = n; j > (xwsz_t)0; j--) { // cppcheck-suppress [misra-c2012-15.4]
372 i = j - (xwsz_t)1;
373 if (bmp[i] < opd[i]) {
374 ret = -1;
375 break;
376 } else if (bmp[i] > opd[i]) {
377 ret = 1;
378 break;
379 } else {}
380 }
381 return ret;
382}
signed long xwssq_t
Definition type.h:153

◆ xwbmpop_ffs()

xwssq_t xwbmpop_ffs ( xwbmp_t bmp,
xwsz_t  num 
)

XWOS BOPLIB:在位图中从最低位起查找第一个被置1的位

参数
[in]bmp位图的起始地址指针
[in]num位图中总的位数
返回
位的序号
返回值
>=0位的序号
-1没有任何一个位为1
注解
  • 返回的序号是从0开始编号的,与C标准库中 ffs() 函数返回值不同。

◆ xwbmpop_ffz()

xwssq_t xwbmpop_ffz ( xwbmp_t bmp,
xwsz_t  num 
)

XWOS BOPLIB:在位图中从最低位起查找第一个被清0的位

参数
[in]bmp位图的起始地址指针
[in]num位图中总的位数
返回
位的序号
返回值
>=0位的序号
-1没有任何一个位被清0
注解
  • 返回的序号是从0开始编号的,与C标准库中 ffs() 函数返回值不同。

◆ xwbmpop_fls()

xwssq_t xwbmpop_fls ( xwbmp_t bmp,
xwsz_t  num 
)

XWOS BOPLIB:在位图中从最高位起查找第一个被置1的位

参数
[in]bmp位图的起始地址指针
[in]num位图中总的位数
返回
位的序号
返回值
>=0位的序号
-1没有任何一个位为1
注解
  • 返回的序号是从0开始编号的,与C标准库中 ffs() 函数返回值不同。

◆ xwbmpop_flz()

xwssq_t xwbmpop_flz ( xwbmp_t bmp,
xwsz_t  num 
)

XWOS BOPLIB:在位图中从最高位起查找第一个被清0的位

参数
[in]bmp位图的起始地址指针
[in]num位图中总的位数
返回
位的序号
返回值
>=0位的序号
-1没有任何一个位为0
注解
  • 返回的序号是从0开始编号的,与C标准库中 ffs() 函数返回值不同。

◆ xwbmpop_not()

void xwbmpop_not ( xwbmp_t bmp,
xwsz_t  num 
)

XWOS BOPLIB:将位图按位取反

参数
[in]bmp位图的起始地址指针
[in]num掩码的有效位数

在文件 xwbop.c643 行定义.

644{
645 xwsq_t i;
646 xwsz_t size;
647
648 size = BITS_TO_XWBMP_T(num);
649 for (i = 0; i < size; i++) {
650 bmp[i] = ~bmp[i];
651 }
652}

◆ xwbmpop_or()

void xwbmpop_or ( xwbmp_t bmp,
xwbmp_t  opd[],
xwsz_t  num 
)

XWOS BOPLIB:将位图与操作数进行逐位“或”运算

参数
[in]bmp位图的起始地址指针
[in]opd操作数
[in]num掩码的有效位数

在文件 xwbop.c667 行定义.

668{
669 xwsq_t i;
670 xwsz_t size;
671
672 size = BITS_TO_XWBMP_T(num);
673 for (i = 0; i < size; i++) {
674 bmp[i] |= opd[i];
675 }
676}

◆ xwbmpop_s1all()

void xwbmpop_s1all ( xwbmp_t bmp,
xwsq_t  num 
)

XWOS BOPLIB:将位图中所有位置1

参数
[in]bmp位图的起始地址指针
[in]num位图中总的位数

在文件 xwbop.c385 行定义.

386{
387 xwsz_t n = BITS_TO_XWBMP_T(num);
388 xwsz_t i;
389
390 for (i = 0; i < n; i++) {
391 xwbop_s1m(xwbmp_t, &bmp[i], (~(xwbmp_t)0));
392 }
393}

◆ xwbmpop_s1i()

void xwbmpop_s1i ( xwbmp_t bmp,
xwsq_t  n 
)

XWOS BOPLIB:将位图中单个位置1

参数
[in]bmp位图的起始地址指针
[in]n位的序号

◆ xwbmpop_s1m()

void xwbmpop_s1m ( xwbmp_t bmp,
xwbmp_t  msk[],
xwsz_t  num 
)

XWOS BOPLIB:将位图中掩码部分置1

参数
[in]bmp位图的起始地址指针
[in]msk掩码
[in]num掩码的有效位数

在文件 xwbop.c416 行定义.

417{
418 xwsq_t i;
419 xwsz_t size;
420
421 size = BITS_TO_XWBMP_T(num);
422 for (i = 0; i < size; i++) {
423 xwbop_s1m(xwbmp_t, &bmp[i], msk[i]);
424 }
425}

◆ xwbmpop_t0ma()

bool xwbmpop_t0ma ( xwbmp_t bmp,
xwbmp_t  msk[],
xwsz_t  num 
)

XWOS BOPLIB:测试位图中掩码部分是否全部为0

参数
[in]bmp位图的起始地址指针
[in]msk掩码
[in]num掩码的有效位数
返回
布尔值
返回值
true全部为0
false至少一位为1

在文件 xwbop.c561 行定义.

562{
563 xwsq_t i;
564 xwsz_t size;
565 bool ret;
566
567 size = BITS_TO_XWBMP_T(num);
568 ret = false;
569 for (i = 0; i < size; i++) {
570 ret = !(bmp[i] & msk[i]);
571 if (!ret) {
572 break;
573 }
574 }
575 return ret;
576}

◆ xwbmpop_t0ma_then_s1m()

bool xwbmpop_t0ma_then_s1m ( xwbmp_t bmp,
xwbmp_t  msk[],
xwsz_t  num 
)

XWOS BOPLIB:测试位图中掩码部分是否全部为0,如果是,就将掩码部分全部置1

参数
[in]bmp位图的起始地址指针
[in]msk掩码
[in]num掩码的有效位数
返回
布尔值
返回值
true全部为0
false至少一位为1

在文件 xwbop.c579 行定义.

580{
581 xwsq_t i;
582 xwsz_t size;
583 bool ret;
584
585 size = BITS_TO_XWBMP_T(num);
586 ret = false;
587 for (i = 0; i < size; i++) {
588 ret = !(bmp[i] & msk[i]);
589 if (!ret) {
590 break;
591 }
592 }
593 if (ret) {
594 for (i = 0; i < size; i++) {
595 xwbop_s1m(xwbmp_t, &bmp[i], msk[i]);
596 }
597 }
598 return ret;
599}

◆ xwbmpop_t0mo()

bool xwbmpop_t0mo ( xwbmp_t bmp,
xwbmp_t  msk[],
xwsz_t  num 
)

XWOS BOPLIB:测试位图中掩码部分是否至少有一位为0

参数
[in]bmp位图的起始地址指针
[in]msk掩码
[in]num掩码的有效位数
返回
布尔值
返回值
true至少一位为0
false全部为1

在文件 xwbop.c602 行定义.

603{
604 xwsq_t i;
605 xwsz_t size;
606 bool ret;
607
608 size = BITS_TO_XWBMP_T(num);
609 ret = false;
610 for (i = 0; i < size; i++) {
611 ret = !!((bmp[i] & msk[i]) != msk[i]);
612 if (ret) {
613 break;
614 }
615 }
616 return ret;
617}

◆ xwbmpop_t0mo_then_s1m()

bool xwbmpop_t0mo_then_s1m ( xwbmp_t bmp,
xwbmp_t  msk[],
xwsz_t  num 
)

XWOS BOPLIB:测试位图中掩码部分是否至少有一位为0,如果是,就将掩码部分全部置1

参数
[in]bmp位图的起始地址指针
[in]msk掩码
[in]num掩码的有效位数
返回
布尔值
返回值
true至少一位为0
false全部为1

在文件 xwbop.c620 行定义.

621{
622 xwsq_t i;
623 xwsz_t size;
624 bool ret;
625
626 size = BITS_TO_XWBMP_T(num);
627 ret = false;
628 for (i = 0; i < size; i++) {
629 ret = !!((bmp[i] & msk[i]) != msk[i]);
630 if (ret) {
631 break;
632 }
633 }
634 if (ret) {
635 for (i = 0; i < size; i++) {
636 xwbop_s1m(xwbmp_t, &bmp[i], msk[i]);
637 }
638 }
639 return ret;
640}

◆ xwbmpop_t1i()

bool xwbmpop_t1i ( xwbmp_t bmp,
xwsq_t  n 
)

XWOS BOPLIB:测试位图中的单个位是否为1

参数
[in]bmp位图的起始地址指针
[in]n被测试的位的序号
返回
布尔值
返回值
true置位
false复位

◆ xwbmpop_t1ma()

bool xwbmpop_t1ma ( xwbmp_t bmp,
xwbmp_t  msk[],
xwsz_t  num 
)

XWOS BOPLIB:测试位图中掩码部分是否全部为1

参数
[in]bmp位图的起始地址指针
[in]msk掩码
[in]num掩码的有效位数
返回
布尔值
返回值
true全部为1
false至少一位为0

在文件 xwbop.c479 行定义.

480{
481 xwsq_t i;
482 xwsz_t size;
483 bool ret;
484
485 size = BITS_TO_XWBMP_T(num);
486 ret = false;
487 for (i = 0; i < size; i++) {
488 ret = !!((bmp[i] & msk[i]) == msk[i]);
489 if (!ret) {
490 break;
491 }
492 }
493 return ret;
494}

◆ xwbmpop_t1ma_then_c0m()

bool xwbmpop_t1ma_then_c0m ( xwbmp_t bmp,
xwbmp_t  msk[],
xwsz_t  num 
)

XWOS BOPLIB:测试位图中掩码部分是否全部为1,如果是,就将掩码部分全部清0

参数
[in]bmp位图的起始地址指针
[in]msk掩码
[in]num掩码的有效位数
返回
布尔值
返回值
true全部为1
false至少一位为0

在文件 xwbop.c497 行定义.

498{
499 xwsq_t i;
500 xwsz_t size;
501 bool ret;
502
503 size = BITS_TO_XWBMP_T(num);
504 ret = false;
505 for (i = 0; i < size; i++) {
506 ret = !!((bmp[i] & msk[i]) == msk[i]);
507 if (!ret) {
508 break;
509 }
510 }
511 if (ret) {
512 for (i = 0; i < size; i++) {
513 xwbop_c0m(xwbmp_t, &bmp[i], msk[i]);
514 }
515 }
516 return ret;
517}

◆ xwbmpop_t1mo()

bool xwbmpop_t1mo ( xwbmp_t bmp,
xwbmp_t  msk[],
xwsz_t  num 
)

XWOS BOPLIB:测试位图中掩码部分是否至少有一位为1

参数
[in]bmp位图的起始地址指针
[in]msk掩码
[in]num掩码的有效位数
返回
布尔值
返回值
true至少一位为1
false全部为0

在文件 xwbop.c520 行定义.

521{
522 xwsq_t i;
523 xwsz_t size;
524 bool ret;
525
526 size = BITS_TO_XWBMP_T(num);
527 ret = false;
528 for (i = 0; i < size; i++) {
529 ret = !!(bmp[i] & msk[i]);
530 if (ret) {
531 break;
532 }
533 }
534 return ret;
535}

◆ xwbmpop_t1mo_then_c0m()

bool xwbmpop_t1mo_then_c0m ( xwbmp_t bmp,
xwbmp_t  msk[],
xwsz_t  num 
)

XWOS BOPLIB:测试位图中掩码部分是否至少有一位为1,如果是,就将掩码部分全部清0

参数
[in]bmp位图的起始地址指针
[in]msk掩码
[in]num掩码的有效位数
返回
布尔值
返回值
true至少一位为1
false全部为0

在文件 xwbop.c538 行定义.

539{
540 xwsq_t i;
541 xwsz_t size;
542 bool ret;
543
544 size = BITS_TO_XWBMP_T(num);
545 ret = false;
546 for (i = 0; i < size; i++) {
547 ret = !!(bmp[i] & msk[i]);
548 if (ret) {
549 break;
550 }
551 }
552 if (ret) {
553 for (i = 0; i < size; i++) {
554 xwbop_c0m(xwbmp_t, &bmp[i], msk[i]);
555 }
556 }
557 return ret;
558}

◆ xwbmpop_weight()

xwsz_t xwbmpop_weight ( xwbmp_t bmp,
xwsz_t  num 
)

XWOS BOPLIB:在位图中统计被置1的位的个数

参数
[in]bmp位图的起始地址指针
[in]num位图中总的位数
返回
数据中1的个数

在文件 xwbop.c801 行定义.

802{
803 xwsz_t i;
804 xwsz_t n;
805 xwsz_t res;
806
807 res = 0;
808 n = BITS_TO_XWBMP_T(num);
809 for (i = 0; i < n; i++) {
810 res += xwbop_weight(xwbmp_t, bmp[i]);
811 }
812 return res;
813}

◆ xwbmpop_x1i()

void xwbmpop_x1i ( xwbmp_t bmp,
xwsq_t  n 
)

XWOS BOPLIB:将位图中单个位翻转

参数
[in]bmp位图的起始地址指针
[in]n被翻转的位的序号

◆ xwbmpop_x1m()

void xwbmpop_x1m ( xwbmp_t bmp,
xwbmp_t  msk[],
xwsz_t  num 
)

XWOS BOPLIB:将位图中掩码部分翻转

参数
[in]bmp位图的起始地址指针
[in]msk掩码
[in]num掩码的有效位数

在文件 xwbop.c458 行定义.

459{
460 xwsq_t i;
461 xwsz_t size;
462
463 size = BITS_TO_XWBMP_T(num);
464 for (i = 0; i < size; i++) {
465 xwbop_x1m(xwbmp_t, &bmp[i], msk[i]);
466 }
467}

◆ xwbmpop_xor()

void xwbmpop_xor ( xwbmp_t bmp,
xwbmp_t  opd[],
xwsz_t  num 
)

XWOS BOPLIB:将位图与操作数进行逐位“异或”运算

参数
[in]bmp位图的起始地址指针
[in]opd操作数
[in]num掩码的有效位数

在文件 xwbop.c679 行定义.

680{
681 xwsq_t i;
682 xwsz_t size;
683
684 size = BITS_TO_XWBMP_T(num);
685 for (i = 0; i < size; i++) {
686 bmp[i] ^= opd[i];
687 }
688}

◆ xwbop_c0m__xwbmp_t()

static void xwbop_c0m__xwbmp_t ( xwbmp_t x,
xwbmp_t  m 
)
inlinestatic

在文件 xwbop.h446 行定义.

◆ xwbop_c0m__xwid_t()

static void xwbop_c0m__xwid_t ( xwid_t x,
xwid_t  m 
)
inlinestatic

在文件 xwbop.h418 行定义.

◆ xwbop_c0m__xwptr_t()

static void xwbop_c0m__xwptr_t ( xwptr_t x,
xwptr_t  m 
)
inlinestatic

在文件 xwbop.h408 行定义.

◆ xwbop_c0m__xwreg_t()

static void xwbop_c0m__xwreg_t ( xwreg_t x,
xwreg_t  m 
)
inlinestatic

在文件 xwbop.h428 行定义.

◆ xwbop_c0m__xws16_t()

static void xwbop_c0m__xws16_t ( xws16_t x,
xws16_t  m 
)
inlinestatic

在文件 xwbop.h389 行定义.

◆ xwbop_c0m__xws32_t()

static void xwbop_c0m__xws32_t ( xws32_t x,
xws32_t  m 
)
inlinestatic

在文件 xwbop.h392 行定义.

◆ xwbop_c0m__xws64_t()

static void xwbop_c0m__xws64_t ( xws64_t x,
xws64_t  m 
)
inlinestatic

在文件 xwbop.h395 行定义.

◆ xwbop_c0m__xws8_t()

static void xwbop_c0m__xws8_t ( xws8_t x,
xws8_t  m 
)
inlinestatic

在文件 xwbop.h386 行定义.

◆ xwbop_c0m__xwsq_t()

static void xwbop_c0m__xwsq_t ( xwsq_t x,
xwsq_t  m 
)
inlinestatic

在文件 xwbop.h436 行定义.

◆ xwbop_c0m__xwsz_t()

static void xwbop_c0m__xwsz_t ( xwsz_t x,
xwsz_t  m 
)
inlinestatic

在文件 xwbop.h400 行定义.

◆ xwbop_c0m__xwu16_t()

static void xwbop_c0m__xwu16_t ( xwu16_t x,
xwu16_t  m 
)
inlinestatic

在文件 xwbop.h388 行定义.

◆ xwbop_c0m__xwu32_t()

static void xwbop_c0m__xwu32_t ( xwu32_t x,
xwu32_t  m 
)
inlinestatic

在文件 xwbop.h391 行定义.

◆ xwbop_c0m__xwu64_t()

static void xwbop_c0m__xwu64_t ( xwu64_t x,
xwu64_t  m 
)
inlinestatic

在文件 xwbop.h394 行定义.

◆ xwbop_c0m__xwu8_t()

static void xwbop_c0m__xwu8_t ( xwu8_t x,
xwu8_t  m 
)
inlinestatic

在文件 xwbop.h385 行定义.

◆ xwbop_ffs16()

xwssq_t xwbop_ffs16 ( xwu16_t  x)
这是这个函数的调用关系图:

◆ xwbop_ffs32()

xwssq_t xwbop_ffs32 ( xwu32_t  x)
这是这个函数的调用关系图:

◆ xwbop_ffs64()

xwssq_t xwbop_ffs64 ( xwu64_t  x)
这是这个函数的调用关系图:

◆ xwbop_ffs8()

xwssq_t xwbop_ffs8 ( xwu8_t  x)
这是这个函数的调用关系图:

◆ xwbop_ffs__xwbmp_t()

static xwssq_t xwbop_ffs__xwbmp_t ( xwbmp_t  x)
inlinestatic

在文件 xwbop.h446 行定义.

◆ xwbop_ffs__xwid_t()

static xwssq_t xwbop_ffs__xwid_t ( xwid_t  x)
inlinestatic

在文件 xwbop.h418 行定义.

◆ xwbop_ffs__xwptr_t()

static xwssq_t xwbop_ffs__xwptr_t ( xwptr_t  x)
inlinestatic

在文件 xwbop.h408 行定义.

◆ xwbop_ffs__xwreg_t()

static xwssq_t xwbop_ffs__xwreg_t ( xwreg_t  x)
inlinestatic

在文件 xwbop.h428 行定义.

◆ xwbop_ffs__xws16_t()

static xwssq_t xwbop_ffs__xws16_t ( xws16_t  x)
inlinestatic

在文件 xwbop.h389 行定义.

◆ xwbop_ffs__xws32_t()

static xwssq_t xwbop_ffs__xws32_t ( xws32_t  x)
inlinestatic

在文件 xwbop.h392 行定义.

◆ xwbop_ffs__xws64_t()

static xwssq_t xwbop_ffs__xws64_t ( xws64_t  x)
inlinestatic

在文件 xwbop.h395 行定义.

◆ xwbop_ffs__xws8_t()

static xwssq_t xwbop_ffs__xws8_t ( xws8_t  x)
inlinestatic

在文件 xwbop.h386 行定义.

◆ xwbop_ffs__xwsq_t()

static xwssq_t xwbop_ffs__xwsq_t ( xwsq_t  x)
inlinestatic

在文件 xwbop.h436 行定义.

◆ xwbop_ffs__xwsz_t()

static xwssq_t xwbop_ffs__xwsz_t ( xwsz_t  x)
inlinestatic

在文件 xwbop.h400 行定义.

◆ xwbop_ffs__xwu16_t()

static xwssq_t xwbop_ffs__xwu16_t ( xwu16_t  x)
inlinestatic

在文件 xwbop.h388 行定义.

◆ xwbop_ffs__xwu32_t()

static xwssq_t xwbop_ffs__xwu32_t ( xwu32_t  x)
inlinestatic

在文件 xwbop.h391 行定义.

◆ xwbop_ffs__xwu64_t()

static xwssq_t xwbop_ffs__xwu64_t ( xwu64_t  x)
inlinestatic

在文件 xwbop.h394 行定义.

◆ xwbop_ffs__xwu8_t()

static xwssq_t xwbop_ffs__xwu8_t ( xwu8_t  x)
inlinestatic

在文件 xwbop.h385 行定义.

◆ xwbop_ffz16()

static xwssq_t xwbop_ffz16 ( xwu16_t  x)
inlinestatic

在文件 xwbop.h79 行定义.

80{
81 return xwbop_ffs16((xwu16_t)(~x));
82}
uint16_t xwu16_t
Definition type.h:49
xwssq_t xwbop_ffs16(xwu16_t x)
函数调用图:

◆ xwbop_ffz32()

static xwssq_t xwbop_ffz32 ( xwu32_t  x)
inlinestatic

在文件 xwbop.h103 行定义.

104{
105 return xwbop_ffs32(~x);
106}
xwssq_t xwbop_ffs32(xwu32_t x)
函数调用图:

◆ xwbop_ffz64()

static xwssq_t xwbop_ffz64 ( xwu64_t  x)
inlinestatic

在文件 xwbop.h127 行定义.

128{
129 return xwbop_ffs64(~x);
130}
xwssq_t xwbop_ffs64(xwu64_t x)
函数调用图:

◆ xwbop_ffz8()

static xwssq_t xwbop_ffz8 ( xwu8_t  x)
inlinestatic

在文件 xwbop.h49 行定义.

50{
51 return xwbop_ffs8((xwu8_t)(~x));
52}
uint8_t xwu8_t
Definition type.h:33
xwssq_t xwbop_ffs8(xwu8_t x)
函数调用图:

◆ xwbop_ffz__xwbmp_t()

static xwssq_t xwbop_ffz__xwbmp_t ( xwbmp_t  x)
inlinestatic

在文件 xwbop.h446 行定义.

◆ xwbop_ffz__xwid_t()

static xwssq_t xwbop_ffz__xwid_t ( xwid_t  x)
inlinestatic

在文件 xwbop.h418 行定义.

◆ xwbop_ffz__xwptr_t()

static xwssq_t xwbop_ffz__xwptr_t ( xwptr_t  x)
inlinestatic

在文件 xwbop.h408 行定义.

◆ xwbop_ffz__xwreg_t()

static xwssq_t xwbop_ffz__xwreg_t ( xwreg_t  x)
inlinestatic

在文件 xwbop.h428 行定义.

◆ xwbop_ffz__xws16_t()

static xwssq_t xwbop_ffz__xws16_t ( xws16_t  x)
inlinestatic

在文件 xwbop.h389 行定义.

◆ xwbop_ffz__xws32_t()

static xwssq_t xwbop_ffz__xws32_t ( xws32_t  x)
inlinestatic

在文件 xwbop.h392 行定义.

◆ xwbop_ffz__xws64_t()

static xwssq_t xwbop_ffz__xws64_t ( xws64_t  x)
inlinestatic

在文件 xwbop.h395 行定义.

◆ xwbop_ffz__xws8_t()

static xwssq_t xwbop_ffz__xws8_t ( xws8_t  x)
inlinestatic

在文件 xwbop.h386 行定义.

◆ xwbop_ffz__xwsq_t()

static xwssq_t xwbop_ffz__xwsq_t ( xwsq_t  x)
inlinestatic

在文件 xwbop.h436 行定义.

◆ xwbop_ffz__xwsz_t()

static xwssq_t xwbop_ffz__xwsz_t ( xwsz_t  x)
inlinestatic

在文件 xwbop.h400 行定义.

◆ xwbop_ffz__xwu16_t()

static xwssq_t xwbop_ffz__xwu16_t ( xwu16_t  x)
inlinestatic

在文件 xwbop.h388 行定义.

◆ xwbop_ffz__xwu32_t()

static xwssq_t xwbop_ffz__xwu32_t ( xwu32_t  x)
inlinestatic

在文件 xwbop.h391 行定义.

◆ xwbop_ffz__xwu64_t()

static xwssq_t xwbop_ffz__xwu64_t ( xwu64_t  x)
inlinestatic

在文件 xwbop.h394 行定义.

◆ xwbop_ffz__xwu8_t()

static xwssq_t xwbop_ffz__xwu8_t ( xwu8_t  x)
inlinestatic

在文件 xwbop.h385 行定义.

◆ xwbop_fls16()

xwssq_t xwbop_fls16 ( xwu16_t  x)
这是这个函数的调用关系图:

◆ xwbop_fls32()

xwssq_t xwbop_fls32 ( xwu32_t  x)
这是这个函数的调用关系图:

◆ xwbop_fls64()

xwssq_t xwbop_fls64 ( xwu64_t  x)

◆ xwbop_fls8()

xwssq_t xwbop_fls8 ( xwu8_t  x)
这是这个函数的调用关系图:

◆ xwbop_fls__xwbmp_t()

static xwssq_t xwbop_fls__xwbmp_t ( xwbmp_t  x)
inlinestatic

在文件 xwbop.h446 行定义.

◆ xwbop_fls__xwid_t()

static xwssq_t xwbop_fls__xwid_t ( xwid_t  x)
inlinestatic

在文件 xwbop.h418 行定义.

◆ xwbop_fls__xwptr_t()

static xwssq_t xwbop_fls__xwptr_t ( xwptr_t  x)
inlinestatic

在文件 xwbop.h408 行定义.

◆ xwbop_fls__xwreg_t()

static xwssq_t xwbop_fls__xwreg_t ( xwreg_t  x)
inlinestatic

在文件 xwbop.h428 行定义.

◆ xwbop_fls__xws16_t()

static xwssq_t xwbop_fls__xws16_t ( xws16_t  x)
inlinestatic

在文件 xwbop.h389 行定义.

◆ xwbop_fls__xws32_t()

static xwssq_t xwbop_fls__xws32_t ( xws32_t  x)
inlinestatic

在文件 xwbop.h392 行定义.

◆ xwbop_fls__xws64_t()

static xwssq_t xwbop_fls__xws64_t ( xws64_t  x)
inlinestatic

在文件 xwbop.h395 行定义.

◆ xwbop_fls__xws8_t()

static xwssq_t xwbop_fls__xws8_t ( xws8_t  x)
inlinestatic

在文件 xwbop.h386 行定义.

◆ xwbop_fls__xwsq_t()

static xwssq_t xwbop_fls__xwsq_t ( xwsq_t  x)
inlinestatic

在文件 xwbop.h436 行定义.

◆ xwbop_fls__xwsz_t()

static xwssq_t xwbop_fls__xwsz_t ( xwsz_t  x)
inlinestatic

在文件 xwbop.h400 行定义.

◆ xwbop_fls__xwu16_t()

static xwssq_t xwbop_fls__xwu16_t ( xwu16_t  x)
inlinestatic

在文件 xwbop.h388 行定义.

◆ xwbop_fls__xwu32_t()

static xwssq_t xwbop_fls__xwu32_t ( xwu32_t  x)
inlinestatic

在文件 xwbop.h391 行定义.

◆ xwbop_fls__xwu64_t()

static xwssq_t xwbop_fls__xwu64_t ( xwu64_t  x)
inlinestatic

在文件 xwbop.h394 行定义.

◆ xwbop_fls__xwu8_t()

static xwssq_t xwbop_fls__xwu8_t ( xwu8_t  x)
inlinestatic

在文件 xwbop.h385 行定义.

◆ xwbop_flz16()

static xwssq_t xwbop_flz16 ( xwu16_t  x)
inlinestatic

在文件 xwbop.h85 行定义.

86{
87 return xwbop_fls16((xwu16_t)(~x));
88}
xwssq_t xwbop_fls16(xwu16_t x)
函数调用图:

◆ xwbop_flz32()

static xwssq_t xwbop_flz32 ( xwu32_t  x)
inlinestatic

在文件 xwbop.h109 行定义.

110{
111 return xwbop_fls32(~x);
112}
xwssq_t xwbop_fls32(xwu32_t x)
函数调用图:

◆ xwbop_flz64()

static xwssq_t xwbop_flz64 ( xwu64_t  x)
inlinestatic

在文件 xwbop.h133 行定义.

134{
135 return xwbop_ffs64(~x);
136}
函数调用图:

◆ xwbop_flz8()

static xwssq_t xwbop_flz8 ( xwu8_t  x)
inlinestatic

在文件 xwbop.h55 行定义.

56{
57 return xwbop_fls8((xwu8_t)(~x));
58}
xwssq_t xwbop_fls8(xwu8_t x)
函数调用图:

◆ xwbop_flz__xwbmp_t()

static xwssq_t xwbop_flz__xwbmp_t ( xwbmp_t  x)
inlinestatic

在文件 xwbop.h446 行定义.

◆ xwbop_flz__xwid_t()

static xwssq_t xwbop_flz__xwid_t ( xwid_t  x)
inlinestatic

在文件 xwbop.h418 行定义.

◆ xwbop_flz__xwptr_t()

static xwssq_t xwbop_flz__xwptr_t ( xwptr_t  x)
inlinestatic

在文件 xwbop.h408 行定义.

◆ xwbop_flz__xwreg_t()

static xwssq_t xwbop_flz__xwreg_t ( xwreg_t  x)
inlinestatic

在文件 xwbop.h428 行定义.

◆ xwbop_flz__xws16_t()

static xwssq_t xwbop_flz__xws16_t ( xws16_t  x)
inlinestatic

在文件 xwbop.h389 行定义.

◆ xwbop_flz__xws32_t()

static xwssq_t xwbop_flz__xws32_t ( xws32_t  x)
inlinestatic

在文件 xwbop.h392 行定义.

◆ xwbop_flz__xws64_t()

static xwssq_t xwbop_flz__xws64_t ( xws64_t  x)
inlinestatic

在文件 xwbop.h395 行定义.

◆ xwbop_flz__xws8_t()

static xwssq_t xwbop_flz__xws8_t ( xws8_t  x)
inlinestatic

在文件 xwbop.h386 行定义.

◆ xwbop_flz__xwsq_t()

static xwssq_t xwbop_flz__xwsq_t ( xwsq_t  x)
inlinestatic

在文件 xwbop.h436 行定义.

◆ xwbop_flz__xwsz_t()

static xwssq_t xwbop_flz__xwsz_t ( xwsz_t  x)
inlinestatic

在文件 xwbop.h400 行定义.

◆ xwbop_flz__xwu16_t()

static xwssq_t xwbop_flz__xwu16_t ( xwu16_t  x)
inlinestatic

在文件 xwbop.h388 行定义.

◆ xwbop_flz__xwu32_t()

static xwssq_t xwbop_flz__xwu32_t ( xwu32_t  x)
inlinestatic

在文件 xwbop.h391 行定义.

◆ xwbop_flz__xwu64_t()

static xwssq_t xwbop_flz__xwu64_t ( xwu64_t  x)
inlinestatic

在文件 xwbop.h394 行定义.

◆ xwbop_flz__xwu8_t()

static xwssq_t xwbop_flz__xwu8_t ( xwu8_t  x)
inlinestatic

在文件 xwbop.h385 行定义.

◆ xwbop_rbit16()

xwu16_t xwbop_rbit16 ( xwu16_t  x)

◆ xwbop_rbit32()

xwu32_t xwbop_rbit32 ( xwu32_t  x)
这是这个函数的调用关系图:

◆ xwbop_rbit64()

xwu64_t xwbop_rbit64 ( xwu64_t  x)

◆ xwbop_rbit8()

xwu8_t xwbop_rbit8 ( xwu8_t  x)
这是这个函数的调用关系图:

◆ xwbop_rbit__xwbmp_t()

static xwbmp_t xwbop_rbit__xwbmp_t ( xwbmp_t  x)
inlinestatic

在文件 xwbop.h446 行定义.

◆ xwbop_rbit__xwid_t()

static xwid_t xwbop_rbit__xwid_t ( xwid_t  x)
inlinestatic

在文件 xwbop.h418 行定义.

◆ xwbop_rbit__xwptr_t()

static xwptr_t xwbop_rbit__xwptr_t ( xwptr_t  x)
inlinestatic

在文件 xwbop.h408 行定义.

◆ xwbop_rbit__xwreg_t()

static xwreg_t xwbop_rbit__xwreg_t ( xwreg_t  x)
inlinestatic

在文件 xwbop.h428 行定义.

◆ xwbop_rbit__xws16_t()

static xws16_t xwbop_rbit__xws16_t ( xws16_t  x)
inlinestatic

在文件 xwbop.h389 行定义.

◆ xwbop_rbit__xws32_t()

static xws32_t xwbop_rbit__xws32_t ( xws32_t  x)
inlinestatic

在文件 xwbop.h392 行定义.

◆ xwbop_rbit__xws64_t()

static xws64_t xwbop_rbit__xws64_t ( xws64_t  x)
inlinestatic

在文件 xwbop.h395 行定义.

◆ xwbop_rbit__xws8_t()

static xws8_t xwbop_rbit__xws8_t ( xws8_t  x)
inlinestatic

在文件 xwbop.h386 行定义.

◆ xwbop_rbit__xwsq_t()

static xwsq_t xwbop_rbit__xwsq_t ( xwsq_t  x)
inlinestatic

在文件 xwbop.h436 行定义.

◆ xwbop_rbit__xwsz_t()

static xwsz_t xwbop_rbit__xwsz_t ( xwsz_t  x)
inlinestatic

在文件 xwbop.h400 行定义.

◆ xwbop_rbit__xwu16_t()

static xwu16_t xwbop_rbit__xwu16_t ( xwu16_t  x)
inlinestatic

在文件 xwbop.h388 行定义.

◆ xwbop_rbit__xwu32_t()

static xwu32_t xwbop_rbit__xwu32_t ( xwu32_t  x)
inlinestatic

在文件 xwbop.h391 行定义.

◆ xwbop_rbit__xwu64_t()

static xwu64_t xwbop_rbit__xwu64_t ( xwu64_t  x)
inlinestatic

在文件 xwbop.h394 行定义.

◆ xwbop_rbit__xwu8_t()

static xwu8_t xwbop_rbit__xwu8_t ( xwu8_t  x)
inlinestatic

在文件 xwbop.h385 行定义.

◆ xwbop_re16()

xwu16_t xwbop_re16 ( xwu16_t  a)

◆ xwbop_re32()

xwu32_t xwbop_re32 ( xwu32_t  x)

◆ xwbop_re64()

xwu64_t xwbop_re64 ( xwu64_t  x)

◆ xwbop_re8()

static xwu8_t xwbop_re8 ( xwu8_t  x)
inlinestatic

在文件 xwbop.h63 行定义.

64{
65 return x;
66}

◆ xwbop_re__xwbmp_t()

static xwbmp_t xwbop_re__xwbmp_t ( xwbmp_t  x)
inlinestatic

在文件 xwbop.h446 行定义.

◆ xwbop_re__xwid_t()

static xwid_t xwbop_re__xwid_t ( xwid_t  x)
inlinestatic

在文件 xwbop.h418 行定义.

◆ xwbop_re__xwptr_t()

static xwptr_t xwbop_re__xwptr_t ( xwptr_t  x)
inlinestatic

在文件 xwbop.h408 行定义.

◆ xwbop_re__xwreg_t()

static xwreg_t xwbop_re__xwreg_t ( xwreg_t  x)
inlinestatic

在文件 xwbop.h428 行定义.

◆ xwbop_re__xws16_t()

static xws16_t xwbop_re__xws16_t ( xws16_t  x)
inlinestatic

在文件 xwbop.h389 行定义.

◆ xwbop_re__xws32_t()

static xws32_t xwbop_re__xws32_t ( xws32_t  x)
inlinestatic

在文件 xwbop.h392 行定义.

◆ xwbop_re__xws64_t()

static xws64_t xwbop_re__xws64_t ( xws64_t  x)
inlinestatic

在文件 xwbop.h395 行定义.

◆ xwbop_re__xws8_t()

static xws8_t xwbop_re__xws8_t ( xws8_t  x)
inlinestatic

在文件 xwbop.h386 行定义.

◆ xwbop_re__xwsq_t()

static xwsq_t xwbop_re__xwsq_t ( xwsq_t  x)
inlinestatic

在文件 xwbop.h436 行定义.

◆ xwbop_re__xwsz_t()

static xwsz_t xwbop_re__xwsz_t ( xwsz_t  x)
inlinestatic

在文件 xwbop.h400 行定义.

◆ xwbop_re__xwu16_t()

static xwu16_t xwbop_re__xwu16_t ( xwu16_t  x)
inlinestatic

在文件 xwbop.h388 行定义.

◆ xwbop_re__xwu32_t()

static xwu32_t xwbop_re__xwu32_t ( xwu32_t  x)
inlinestatic

在文件 xwbop.h391 行定义.

◆ xwbop_re__xwu64_t()

static xwu64_t xwbop_re__xwu64_t ( xwu64_t  x)
inlinestatic

在文件 xwbop.h394 行定义.

◆ xwbop_re__xwu8_t()

static xwu8_t xwbop_re__xwu8_t ( xwu8_t  x)
inlinestatic

在文件 xwbop.h385 行定义.

◆ xwbop_s1m__xwbmp_t()

static void xwbop_s1m__xwbmp_t ( xwbmp_t x,
xwbmp_t  m 
)
inlinestatic

在文件 xwbop.h446 行定义.

◆ xwbop_s1m__xwid_t()

static void xwbop_s1m__xwid_t ( xwid_t x,
xwid_t  m 
)
inlinestatic

在文件 xwbop.h418 行定义.

◆ xwbop_s1m__xwptr_t()

static void xwbop_s1m__xwptr_t ( xwptr_t x,
xwptr_t  m 
)
inlinestatic

在文件 xwbop.h408 行定义.

◆ xwbop_s1m__xwreg_t()

static void xwbop_s1m__xwreg_t ( xwreg_t x,
xwreg_t  m 
)
inlinestatic

在文件 xwbop.h428 行定义.

◆ xwbop_s1m__xws16_t()

static void xwbop_s1m__xws16_t ( xws16_t x,
xws16_t  m 
)
inlinestatic

在文件 xwbop.h389 行定义.

◆ xwbop_s1m__xws32_t()

static void xwbop_s1m__xws32_t ( xws32_t x,
xws32_t  m 
)
inlinestatic

在文件 xwbop.h392 行定义.

◆ xwbop_s1m__xws64_t()

static void xwbop_s1m__xws64_t ( xws64_t x,
xws64_t  m 
)
inlinestatic

在文件 xwbop.h395 行定义.

◆ xwbop_s1m__xws8_t()

static void xwbop_s1m__xws8_t ( xws8_t x,
xws8_t  m 
)
inlinestatic

在文件 xwbop.h386 行定义.

◆ xwbop_s1m__xwsq_t()

static void xwbop_s1m__xwsq_t ( xwsq_t x,
xwsq_t  m 
)
inlinestatic

在文件 xwbop.h436 行定义.

◆ xwbop_s1m__xwsz_t()

static void xwbop_s1m__xwsz_t ( xwsz_t x,
xwsz_t  m 
)
inlinestatic

在文件 xwbop.h400 行定义.

◆ xwbop_s1m__xwu16_t()

static void xwbop_s1m__xwu16_t ( xwu16_t x,
xwu16_t  m 
)
inlinestatic

在文件 xwbop.h388 行定义.

◆ xwbop_s1m__xwu32_t()

static void xwbop_s1m__xwu32_t ( xwu32_t x,
xwu32_t  m 
)
inlinestatic

在文件 xwbop.h391 行定义.

◆ xwbop_s1m__xwu64_t()

static void xwbop_s1m__xwu64_t ( xwu64_t x,
xwu64_t  m 
)
inlinestatic

在文件 xwbop.h394 行定义.

◆ xwbop_s1m__xwu8_t()

static void xwbop_s1m__xwu8_t ( xwu8_t x,
xwu8_t  m 
)
inlinestatic

在文件 xwbop.h385 行定义.

◆ xwbop_weight16()

xwsz_t xwbop_weight16 ( xwu16_t  x)

在文件 xwbop.c978 行定义.

979{
980 xwu16_t res = x - ((x >> 1) & (xwu16_t)0x5555);
981 res = (res & (xwu16_t)0x3333) + ((res >> 2) & (xwu16_t)0x3333);
982 res = (res + (res >> 4)) & (xwu16_t)0x0F0F;
983 return (res + (res >> 8)) & (xwu16_t)0x00FF;
984}

◆ xwbop_weight32()

xwsz_t xwbop_weight32 ( xwu32_t  x)

在文件 xwbop.c989 行定义.

990{
991 xwu32_t res = x - ((x >> 1) & (xwu32_t)0x55555555);
992 res = (res & (xwu32_t)0x33333333) + ((res >> 2) & (xwu32_t)0x33333333);
993 res = (res + (res >> 4)) & (xwu32_t)0x0F0F0F0F;
994 res = res + (res >> 8);
995 return (res + (res >> 16)) & (xwu32_t)0x000000FF;
996}
uint32_t xwu32_t
Definition type.h:65

◆ xwbop_weight64()

xwsz_t xwbop_weight64 ( xwu64_t  x)

在文件 xwbop.c1001 行定义.

1002{
1003 xwu64_t res = x - ((x >> 1) & (xwu64_t)0x5555555555555555);
1004 res = (res & (xwu64_t)0x3333333333333333) +
1005 ((res >> 2) & (xwu64_t)0x3333333333333333);
1006 res = (res + (res >> 4)) & (xwu64_t)0x0F0F0F0F0F0F0F0F;
1007 res = res + (res >> 8);
1008 res = res + (res >> 16);
1009 return (res + (res >> 32)) & (xwu64_t)0x00000000000000FF;
1010}
uint64_t xwu64_t
Definition type.h:81

◆ xwbop_weight8()

xwsz_t xwbop_weight8 ( xwu8_t  x)

在文件 xwbop.c968 行定义.

969{
970 xwu8_t res = x - ((x >> 1) & (xwu8_t)0x55);
971 res = (res & (xwu8_t)0x33) + ((res >> 2) & (xwu8_t)0x33);
972 return (res + (res >> 4)) & (xwu8_t)0x0F;
973}

◆ xwbop_weight__xwbmp_t()

static xwsq_t xwbop_weight__xwbmp_t ( xwbmp_t  x)
inlinestatic

在文件 xwbop.h446 行定义.

◆ xwbop_weight__xwid_t()

static xwsq_t xwbop_weight__xwid_t ( xwid_t  x)
inlinestatic

在文件 xwbop.h418 行定义.

◆ xwbop_weight__xwptr_t()

static xwsq_t xwbop_weight__xwptr_t ( xwptr_t  x)
inlinestatic

在文件 xwbop.h408 行定义.

◆ xwbop_weight__xwreg_t()

static xwsq_t xwbop_weight__xwreg_t ( xwreg_t  x)
inlinestatic

在文件 xwbop.h428 行定义.

◆ xwbop_weight__xws16_t()

static xwsq_t xwbop_weight__xws16_t ( xws16_t  x)
inlinestatic

在文件 xwbop.h389 行定义.

◆ xwbop_weight__xws32_t()

static xwsq_t xwbop_weight__xws32_t ( xws32_t  x)
inlinestatic

在文件 xwbop.h392 行定义.

◆ xwbop_weight__xws64_t()

static xwsq_t xwbop_weight__xws64_t ( xws64_t  x)
inlinestatic

在文件 xwbop.h395 行定义.

◆ xwbop_weight__xws8_t()

static xwsq_t xwbop_weight__xws8_t ( xws8_t  x)
inlinestatic

在文件 xwbop.h386 行定义.

◆ xwbop_weight__xwsq_t()

static xwsq_t xwbop_weight__xwsq_t ( xwsq_t  x)
inlinestatic

在文件 xwbop.h436 行定义.

◆ xwbop_weight__xwsz_t()

static xwsq_t xwbop_weight__xwsz_t ( xwsz_t  x)
inlinestatic

在文件 xwbop.h400 行定义.

◆ xwbop_weight__xwu16_t()

static xwsq_t xwbop_weight__xwu16_t ( xwu16_t  x)
inlinestatic

在文件 xwbop.h388 行定义.

◆ xwbop_weight__xwu32_t()

static xwsq_t xwbop_weight__xwu32_t ( xwu32_t  x)
inlinestatic

在文件 xwbop.h391 行定义.

◆ xwbop_weight__xwu64_t()

static xwsq_t xwbop_weight__xwu64_t ( xwu64_t  x)
inlinestatic

在文件 xwbop.h394 行定义.

◆ xwbop_weight__xwu8_t()

static xwsq_t xwbop_weight__xwu8_t ( xwu8_t  x)
inlinestatic

在文件 xwbop.h385 行定义.

◆ xwbop_x1m__xwbmp_t()

static void xwbop_x1m__xwbmp_t ( xwbmp_t x,
xwbmp_t  m 
)
inlinestatic

在文件 xwbop.h446 行定义.

◆ xwbop_x1m__xwid_t()

static void xwbop_x1m__xwid_t ( xwid_t x,
xwid_t  m 
)
inlinestatic

在文件 xwbop.h418 行定义.

◆ xwbop_x1m__xwptr_t()

static void xwbop_x1m__xwptr_t ( xwptr_t x,
xwptr_t  m 
)
inlinestatic

在文件 xwbop.h408 行定义.

◆ xwbop_x1m__xwreg_t()

static void xwbop_x1m__xwreg_t ( xwreg_t x,
xwreg_t  m 
)
inlinestatic

在文件 xwbop.h428 行定义.

◆ xwbop_x1m__xws16_t()

static void xwbop_x1m__xws16_t ( xws16_t x,
xws16_t  m 
)
inlinestatic

在文件 xwbop.h389 行定义.

◆ xwbop_x1m__xws32_t()

static void xwbop_x1m__xws32_t ( xws32_t x,
xws32_t  m 
)
inlinestatic

在文件 xwbop.h392 行定义.

◆ xwbop_x1m__xws64_t()

static void xwbop_x1m__xws64_t ( xws64_t x,
xws64_t  m 
)
inlinestatic

在文件 xwbop.h395 行定义.

◆ xwbop_x1m__xws8_t()

static void xwbop_x1m__xws8_t ( xws8_t x,
xws8_t  m 
)
inlinestatic

在文件 xwbop.h386 行定义.

◆ xwbop_x1m__xwsq_t()

static void xwbop_x1m__xwsq_t ( xwsq_t x,
xwsq_t  m 
)
inlinestatic

在文件 xwbop.h436 行定义.

◆ xwbop_x1m__xwsz_t()

static void xwbop_x1m__xwsz_t ( xwsz_t x,
xwsz_t  m 
)
inlinestatic

在文件 xwbop.h400 行定义.

◆ xwbop_x1m__xwu16_t()

static void xwbop_x1m__xwu16_t ( xwu16_t x,
xwu16_t  m 
)
inlinestatic

在文件 xwbop.h388 行定义.

◆ xwbop_x1m__xwu32_t()

static void xwbop_x1m__xwu32_t ( xwu32_t x,
xwu32_t  m 
)
inlinestatic

在文件 xwbop.h391 行定义.

◆ xwbop_x1m__xwu64_t()

static void xwbop_x1m__xwu64_t ( xwu64_t x,
xwu64_t  m 
)
inlinestatic

在文件 xwbop.h394 行定义.

◆ xwbop_x1m__xwu8_t()

static void xwbop_x1m__xwu8_t ( xwu8_t x,
xwu8_t  m 
)
inlinestatic

在文件 xwbop.h385 行定义.