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

Function npyv_pack_b8_b64

numpy/core/src/common/simd/sse/conversion.h:76–84  ·  view source on GitHub ↗

pack eight 64-bit boolean vectors into one 8-bit boolean vector

Source from the content-addressed store, hash-verified

74
75// pack eight 64-bit boolean vectors into one 8-bit boolean vector
76NPY_FINLINE npyv_b8
77npyv_pack_b8_b64(npyv_b64 a, npyv_b64 b, npyv_b64 c, npyv_b64 d,
78 npyv_b64 e, npyv_b64 f, npyv_b64 g, npyv_b64 h) {
79 npyv_b32 ab = _mm_packs_epi32(a, b);
80 npyv_b32 cd = _mm_packs_epi32(c, d);
81 npyv_b32 ef = _mm_packs_epi32(e, f);
82 npyv_b32 gh = _mm_packs_epi32(g, h);
83 return npyv_pack_b8_b32(ab, cd, ef, gh);
84}
85
86// round to nearest integer (assuming even)
87#define npyv_round_s32_f32 _mm_cvtps_epi32

Callers

nothing calls this directly

Calls 1

npyv_pack_b8_b32Function · 0.70

Tested by

no test coverage detected