MCPcopy Create free account
hub / github.com/numpy/numpy / npyv_pack_b8_b32

Function npyv_pack_b8_b32

numpy/core/src/common/simd/neon/conversion.h:100–110  ·  view source on GitHub ↗

pack four 32-bit boolean vectors into one 8-bit boolean vector

Source from the content-addressed store, hash-verified

98
99// pack four 32-bit boolean vectors into one 8-bit boolean vector
100NPY_FINLINE npyv_b8
101npyv_pack_b8_b32(npyv_b32 a, npyv_b32 b, npyv_b32 c, npyv_b32 d) {
102#if defined(__aarch64__)
103 npyv_b16 ab = vuzp1q_u16((uint16x8_t)a, (uint16x8_t)b);
104 npyv_b16 cd = vuzp1q_u16((uint16x8_t)c, (uint16x8_t)d);
105#else
106 npyv_b16 ab = vcombine_u16(vmovn_u32(a), vmovn_u32(b));
107 npyv_b16 cd = vcombine_u16(vmovn_u32(c), vmovn_u32(d));
108#endif
109 return npyv_pack_b8_b16(ab, cd);
110}
111
112// pack eight 64-bit boolean vectors into one 8-bit boolean vector
113NPY_FINLINE npyv_b8

Callers 1

npyv_pack_b8_b64Function · 0.70

Calls 1

npyv_pack_b8_b16Function · 0.70

Tested by

no test coverage detected