MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / select

Function select

Source/astcenc_vecmathlib_none_4.h:709–715  ·  view source on GitHub ↗

* @brief Return lanes from @c b if MSB of @c cond is set, else @c a. */

Source from the content-addressed store, hash-verified

707 * @brief Return lanes from @c b if MSB of @c cond is set, else @c a.
708 */
709ASTCENC_SIMD_INLINE vint4 select(vint4 a, vint4 b, vmask4 cond)
710{
711 return vint4((cond.m[0] & static_cast<int>(0x80000000)) ? b.m[0] : a.m[0],
712 (cond.m[1] & static_cast<int>(0x80000000)) ? b.m[1] : a.m[1],
713 (cond.m[2] & static_cast<int>(0x80000000)) ? b.m[2] : a.m[2],
714 (cond.m[3] & static_cast<int>(0x80000000)) ? b.m[3] : a.m[3]);
715}
716
717// ============================================================================
718// vfloat4 operators and functions

Callers

nothing calls this directly

Calls 2

vint4Class · 0.70
vfloat4Class · 0.70

Tested by

no test coverage detected