Skip to content

vec.h add vpermute , update tests

vec_test and vec_fb_test

  • We have extensive tests for all methods , for various kinds of packed float and int types for both the vec type and the vec_fb type.
  • Having many test cases is good. But the single test was slow to compile.
  • It also means that if a method depends on the ternary operator (which is not directly available for the vec_fb ) we might be not testing all code paths with a single version.
  • To make things a bit easier . Split all the common parts to vec_test_common.h i.e copy as is the actual testing part from vec_test.cxx there.
  • Define 4 simpler .cxx : vec vsvec_fb and float vs int 2x2.
  • It does not change the amount of work to add a test for a new operation as it needs to go to the common part.
  • On the actual tests to simplify things a bit tried to be more explicit on the 128 bit , 256 bit vector types.

vec

  • And the last method discussed with @amorley and @ssnyder . vpermute which is basically a wrapper of the GCC _builtin_shuffle(vec,mask)
  • And a few more comments on the documentation.
Edited by Christos Anastopoulos

Merge request reports

Loading