Vector unit tests
To make life easier when moving to new architectures, we discussed having a set of vector unit tests. I've started this in 64a09dc2. About 41 of them work for AVX2, 2 are not finished, and a few are still missing. @jwillis do you have any time to look at the mask ones at some point for AVX512? I'm not sure how to check the masks for AVX512 as I can't just do:
vector result;
mask_t mask, mask2;
for(int i = 0; i < VEC_SIZE; i++){
mask2.i[i] = 0xFFFFFFFF;
if(i & 1){
mask.i[i] = 0xFFFFFFFF;
}else{
mask.i[i] = 0;
}
}
result.v = vec_mask_and(mask2, mask);
for(int i = 0; i < VEC_SIZE; i++){
if(i & 1 && result.i[i] != 0xFFFFFFFF){
return 1;
}else if( !(i&1) && result.i[i] != 0){
return 1;
}
}
return 0;
for example.
I think we can automate getting all of these compiled and running.