MCPcopy Create free account
hub / github.com/TheRealMJP/SHforHLSL / wasmMoveMask

Function wasmMoveMask

SHTest/Externals/meshoptimizer/vertexcodec.cpp:769–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

767}
768
769SIMD_TARGET
770static void wasmMoveMask(v128_t mask, unsigned char& mask0, unsigned char& mask1)
771{
772 // magic constant found using z3 SMT assuming mask has 8 groups of 0xff or 0x00
773 const uint64_t magic = 0x000103070f1f3f80ull;
774
775 mask0 = uint8_t((wasm_i64x2_extract_lane(mask, 0) * magic) >> 56);
776 mask1 = uint8_t((wasm_i64x2_extract_lane(mask, 1) * magic) >> 56);
777}
778
779SIMD_TARGET
780static const unsigned char* decodeBytesGroupSimd(const unsigned char* data, unsigned char* buffer, int bitslog2)

Callers 1

decodeBytesGroupSimdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected