MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / anyzero_ps

Function anyzero_ps

test/pthread/test_pthread_mandelbrot.cpp:160–167  ·  view source on GitHub ↗

Not strictly correct anyzero_ps, but faster, and depends on that color alpha channel is always either 0xFF or 0.

Source from the content-addressed store, hash-verified

158#ifdef __SSE__
159// Not strictly correct anyzero_ps, but faster, and depends on that color alpha channel is always either 0xFF or 0.
160int anyzero_ps(__m128 m)
161{
162 __m128 y = _mm_shuffle_ps(m, m, _MM_SHUFFLE(2,3,0,1));
163 m = _mm_and_ps(m, y);
164 __m128 z = _mm_movehl_ps(m, m);
165 m = _mm_and_ps(m, z);
166 return _mm_ucomige_ss(m, m);
167}
168
169int any_ps(__m128 m)
170{

Callers 1

ComputeMandelbrot_SSEFunction · 0.85

Calls 3

_mm_and_psFunction · 0.85
_mm_movehl_psFunction · 0.85
_mm_ucomige_ssFunction · 0.85

Tested by

no test coverage detected