[vector] Is Mask inverted in XXXVector.xxxAll(Mask<>)?

Lev Serebryakov lev at serebryakov.spb.ru
Fri Mar 22 12:25:45 UTC 2019


On 22.03.2019 3:46, Vladimir Ivanov wrote:

> It looks naturally when you compare it to other masked operations:
> 
>   a.op(m)       == (m_i ? op(a_i)     : a_i)
> 
>   a.op(b, m)    == (m_i ? op(a_i,b_i) : a_i)
> 
>   a.blend(b, m) == (m_i ? b_i         : a_i) // ok
> 
> but it's confusing (at least, to me) when you see it alone:
> 
>   a.blend(b, m);
> 
> I read it as 'blend(a,b,m)' and the first interpretation usually is
> opposite to the actual behavior.
 For me it was natural ("take from B what is marked in M, default take
from A"), bu Javadoc was misleading :-)

-- 
// Black Lion AKA Lev Serebryakov



More information about the panama-dev mailing list