hi,
when i do the diff
// Compute diff int32x4_t diff1_4 = vabsq_s32(vsubq_s32(A, B));
I got 4 result. One for each test (A1,B1)(A2,B2)(A3,B3) and (A4,B4)
And than i have to do the comparaison
uint32x4_t mask1_4 = vcltq_s32(diff1_4, X);
So in "uint32x4_t mask1_4" i got the comparaison for each test, so 4 résult.
the answer on post "SIMD help for exemple" was to use
if (vmaxvq_u32(mask1_4) > 0) { ... }
I thinks my sentence was confuse in the previous post. I wrote
" if (mask1_4[0] > 0 && mask1_4[1] > 0) and if (mask1_4[2] > 0 && mask1_4[3] > 0) "
but it is not if( mask1_4[0] > 0 && mask1_4[1] > 0 && mask1_4[2] > 0 && mask1_4[3] > 0) )
i need to do 2 test
if (mask1_4[0] > 0 && mask1_4[1] > 0){
process data1
}
if (mask1_4[2] > 0 && mask1_4[3] > 0){
process data2
I think that vmaxvq_u32(mask1_4) will check all the comparaison. like
if( mask1_4[0] > 0 && mask1_4[1] > 0 && mask1_4[2] > 0 && mask1_4[3] > 0 )
PS: i think i should have post it in the old post
i think i may be found what i need but i am not sure.here is how i see the code: // Compute diff int32x4_t diff1_4 = vabsq_s32(vsubq_s32(A, B)); // Comparee diff uint32x4_t mask1_4 = vcltq_s32(diff1_4, X); // extract [0] and [1] from mask1_4 uint32x2_t mask1_4_01 = vget_high_u32(mask1_4); // not sure high is [0][1] // extract [2] and [3] from mask1_4 uint32x2_t mask1_4_23 = vget_low_u32(mask1_4); if (vmaxvq_u32(mask1_4_01 ) > 0){ process data1 } // it is like i check if (mask1_4[0] > 0 && mask1_4[1] > 0) if (vmaxvq_u32(mask1_4_23 ) > 0){ process data2 } // it is like i check if (mask1_4[2] > 0 && mask1_4[3] > 0)is this correct or did i miss something. Or is there a better way to do it ?