I have the following __m128
vectors:
v_weight
v_entropy
I need to add v_entropy
to v_weight
only where elements in v_weight
are not 0f.
Obviously _mm_add_ps()
adds all elements regardless.
I can compile up to AVX, but not AVX2.
EDIT
I do know beforehand how many elements in v_weight
will be 0 (there will always be either 0 or the last 1, 2, or 3 elements). If it's easier, how do I zero-out the corresponding elements in v_entropy
?