MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / hsum_float_4x4

Function hsum_float_4x4

ggml-quants.c:256–264  ·  view source on GitHub ↗

horizontally add 4x4 floats

Source from the content-addressed store, hash-verified

254#elif defined(__SSSE3__)
255// horizontally add 4x4 floats
256static inline float hsum_float_4x4(const __m128 a, const __m128 b, const __m128 c, const __m128 d) {
257 __m128 res_0 =_mm_hadd_ps(a, b);
258 __m128 res_1 =_mm_hadd_ps(c, d);
259 __m128 res =_mm_hadd_ps(res_0, res_1);
260 res =_mm_hadd_ps(res, res);
261 res =_mm_hadd_ps(res, res);
262
263 return _mm_cvtss_f32(res);
264}
265#endif // __AVX__ || __AVX2__ || __AVX512F__
266#endif // defined(__AVX__) || defined(__AVX2__) || defined(__AVX512F__) || defined(__SSSE3__)
267

Callers 1

ggml_vec_dot_q4_0_q8_0Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected