Mercurial > vec
comparison test/test_compare.h @ 15:e05c257c6a23
*: huge refactor, add many new x86 intrinsics and the like
ALSO!! now intrinsics are enabled at runtime, depending on what is
detected. altivec *should* still work but I only tested compiling
it.
the major version has been updated to 2.0 for this...
author | Paper <paper@tflc.us> |
---|---|
date | Wed, 20 Nov 2024 04:10:37 -0500 |
parents | 53197dbf4e8e |
children | 41dd962abdd1 |
comparison
equal
deleted
inserted
replaced
14:981cf0bc7f3a | 15:e05c257c6a23 |
---|---|
30 CREATE_TEST(sign, psign, bits, size, cmple, orig_a[i] <= orig_b[i]) \ | 30 CREATE_TEST(sign, psign, bits, size, cmple, orig_a[i] <= orig_b[i]) \ |
31 CREATE_TEST(sign, psign, bits, size, cmpge, orig_a[i] >= orig_b[i]) | 31 CREATE_TEST(sign, psign, bits, size, cmpge, orig_a[i] >= orig_b[i]) |
32 | 32 |
33 #define CREATE_TESTS(bits, size) CREATE_TESTS_SIGN(, d, bits, size) CREATE_TESTS_SIGN(u, u, bits, size) | 33 #define CREATE_TESTS(bits, size) CREATE_TESTS_SIGN(, d, bits, size) CREATE_TESTS_SIGN(u, u, bits, size) |
34 | 34 |
35 CREATE_TESTS(8, 8) | |
36 CREATE_TESTS(16, 4) | |
37 CREATE_TESTS(32, 2) | |
38 | |
35 CREATE_TESTS(8, 16) | 39 CREATE_TESTS(8, 16) |
40 CREATE_TESTS(16, 8) | |
41 CREATE_TESTS(32, 4) | |
42 CREATE_TESTS(64, 2) | |
43 | |
44 CREATE_TESTS(8, 32) | |
45 CREATE_TESTS(16, 16) | |
46 CREATE_TESTS(32, 8) | |
47 CREATE_TESTS(64, 4) | |
48 | |
49 CREATE_TESTS(8, 64) | |
50 CREATE_TESTS(16, 32) | |
51 CREATE_TESTS(32, 16) | |
52 CREATE_TESTS(64, 8) | |
36 | 53 |
37 #undef CREATE_TESTS_SIGN | 54 #undef CREATE_TESTS_SIGN |
38 #undef CREATE_TESTS | 55 #undef CREATE_TESTS |
39 #undef CREATE_TEST | 56 #undef CREATE_TEST |
40 | 57 |
57 | 74 |
58 #define RUN_TESTS(bits, size) \ | 75 #define RUN_TESTS(bits, size) \ |
59 RUN_TESTS_SIGN( , bits, size) \ | 76 RUN_TESTS_SIGN( , bits, size) \ |
60 RUN_TESTS_SIGN(u, bits, size) | 77 RUN_TESTS_SIGN(u, bits, size) |
61 | 78 |
79 RUN_TESTS(8, 8) | |
80 RUN_TESTS(16, 4) | |
81 RUN_TESTS(32, 2) | |
82 | |
62 RUN_TESTS(8, 16) | 83 RUN_TESTS(8, 16) |
84 RUN_TESTS(16, 8) | |
85 RUN_TESTS(32, 4) | |
86 RUN_TESTS(64, 2) | |
87 | |
88 RUN_TESTS(8, 32) | |
89 RUN_TESTS(16, 16) | |
90 RUN_TESTS(32, 8) | |
91 RUN_TESTS(64, 4) | |
92 | |
93 RUN_TESTS(8, 64) | |
94 RUN_TESTS(16, 32) | |
95 RUN_TESTS(32, 16) | |
96 RUN_TESTS(64, 8) | |
63 | 97 |
64 #undef RUN_TESTS_SIGN | 98 #undef RUN_TESTS_SIGN |
65 #undef RUN_TESTS | 99 #undef RUN_TESTS |
66 | 100 |
67 return ret; | 101 return ret; |