|
inlineconstexpr |
Defined in Header
Parameters
mask
: logical value or condition to use as mask.t
: Value or constant to use where mask
evaluates to true
.f
: Value or constant to use where mask
evaluates to false
.Return value
The call if_else(mask, t, f)
performs an elementwise selection between the elements of t
and f
according to the value of the elements of mask
.
Possible optimizations
The following calls, where t
and f
are values, are optimized so the constant are not evaluated:
if_else(mask, t , eve::allbits)
if_else(mask, t , eve::one )
if_else(mask, t , eve::mone )
if_else(mask, t , eve::zero )
if_else(mask, eve::allbits , f )
if_else(mask, eve::one , f )
if_else(mask, eve::mone , f )
if_else(mask, eve::zero , f )
In addition, the following calls, where t
and f
are unsigned values, are optimized so the constant are not evaluated:
if_else(mask, t , eve::valmax)
if_else(mask, t , eve::valmin)
if_else(mask, eve::valmax, f )
if_else(mask, eve::valmin, f )