MCPcopy Create free account
hub / github.com/RenderKit/embree / select

Function select

common/math/vec3ia.h:146–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144 ////////////////////////////////////////////////////////////////////////////////
145
146 __forceinline Vec3ia select( const Vec3ba& m, const Vec3ia& t, const Vec3ia& f ) {
147#if defined(__aarch64__) || defined(__SSE4_1__)
148 return _mm_castps_si128(_mm_blendv_ps(_mm_castsi128_ps(f), _mm_castsi128_ps(t), m));
149#else
150 return _mm_or_si128(_mm_and_si128(_mm_castps_si128(m), t), _mm_andnot_si128(_mm_castps_si128(m), f));
151#endif
152 }
153
154 ////////////////////////////////////////////////////////////////////////////////
155 /// Reductions

Callers 5

reduce_addFunction · 0.70
reduce_minFunction · 0.70
reduce_maxFunction · 0.70
minFunction · 0.70
maxFunction · 0.70

Calls 6

_mm_castps_si128Function · 0.85
_mm_blendv_psFunction · 0.85
_mm_castsi128_psFunction · 0.85
_mm_or_si128Function · 0.85
_mm_and_si128Function · 0.85
_mm_andnot_si128Function · 0.85

Tested by

no test coverage detected