annotate test/test.c @ 45:7955bed1d169 default tip

*: add preliminary floating point support no x86 intrinsics just yet, but I did add altivec since it's (arguably) the simplest :)
author Paper <paper@tflc.us>
date Wed, 30 Apr 2025 18:36:38 -0400
parents c6e0df09b86f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
1 #include "vec/vec.h"
39
f9ca85d2f14c *: rearrange some things; add avx512bw support
Paper <paper@tflc.us>
parents: 37
diff changeset
2 #include "vec/mem.h"
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
3
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
4 #include <stdio.h>
17
41dd962abdd1 *: allow compiling vec in a C++ translation unit
Paper <paper@tflc.us>
parents: 15
diff changeset
5 #include <string.h>
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
6 #include <inttypes.h>
37
4b5a557aa64f *: turns out extern is a practical joke. rewrite to be always inline again
Paper <paper@tflc.us>
parents: 30
diff changeset
7 #include <time.h>
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
8
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
9 #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
10
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
11 static const int8_t testval8[] = {
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
12 INT8_C(-80), INT8_C(-3), INT8_C(25), INT8_C(0x7F),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
13 INT8_C(-42), INT8_C(27), INT8_C(24), INT8_C(0x40),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
14 };
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
16 static const uint8_t testvalu8[] = {
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
17 UINT8_C(0x00), UINT8_C(0xFF), UINT8_C(0xFE), UINT8_C(0x7F),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
18 UINT8_C(0xC0), UINT8_C(0x80), UINT8_C(0x20), UINT8_C(0x50),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
19 };
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
20
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
21 static const int16_t testval16[] = {
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
22 INT16_C(-8000), INT16_C(-30), INT16_MAX, INT16_C(0x4000),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
23 INT16_C(-42), INT16_C(250), INT16_MIN, INT16_C(0x500),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
24 };
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
25
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
26 static const uint16_t testvalu16[] = {
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
27 UINT16_C(0x0000), UINT16_C(0xFFFF), UINT16_C(0xFEA), UINT16_C(0x7FF),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
28 UINT16_C(0x7FFF), UINT16_C(0x8000), UINT16_C(0x20B), UINT16_C(0x50C),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
29 };
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
30
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
31 static const int32_t testval32[] = {
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
32 INT32_C(-1000000), INT32_C(-3), INT32_C(0x00000000), INT32_C(0xFFFFFFFF),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
33 INT32_C( -42), INT32_C(27), INT32_C(0xABCDEF03), INT32_C(0x00000FFF),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
34 INT32_C(0xFFFFFFFF), INT32_C( 0), INT32_C(0xFFFFFFFE), INT32_C( 1),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
35 };
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
36
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
37 static const uint32_t testvalu32[] = {
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
38 UINT32_C(0x00000000), UINT32_C(0xDEADBEEF), UINT32_C(42), UINT32_C(0x12340000),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
39 UINT32_C(0xFFFFFFFF), UINT32_C(0xFEDCBA98), UINT32_C(17), UINT32_C(0x00012345),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
40 UINT32_C(0xFFFFFFFF), UINT32_C(0xFFFFFFFE), UINT32_C( 0), UINT32_C( 1),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
41 };
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
42
45
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
43 static const float testvalf32[] = {
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
44 1.0f, -3.33f, -4096.0f, 1234.0f,
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
45 90.0f, -12.0f, 60.0f, 10224.0f,
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
46 };
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
47
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
48 static const int64_t testval64[] = {
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
49 INT64_MAX, INT64_C(-3), INT64_C(0x00000000), INT64_C(0xFFFFFFFFF),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
50 INT64_MIN, INT64_C(645366), INT64_C(0x12345ABCDE), INT64_C(0xF00000FFF),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
51 };
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
52
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
53 static const uint64_t testvalu64[] = {
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
54 UINT64_MAX, UINT64_C(0x44354365), UINT64_C(0x00000000), UINT64_C(0xFFFFFFFFF),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
55 UINT64_C(0xff), UINT64_C(645366), UINT64_C(0x12345ABCDE), UINT64_C(0xF00000FFF),
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
56 };
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
57
45
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
58 static const double testvalf64[] = {
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
59 2345734.0, 12498.0, 12.0, -12312.0,
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
60 -5.0, 12.234, 3.1415, 2.71828,
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
61 };
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
62
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
63 #define VTEST(shorttype, type, ctype, bits, size) \
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
64 static inline v##type##bits##x##size vtest##shorttype##bits##x##size(const size_t start) \
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
65 { \
45
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
66 V##ctype##bits##x##size##_ALIGNED_ARRAY(x); \
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
67 for (size_t i = 0; i < size; i++) \
45
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
68 x[i] = testval##shorttype##bits[(start + i) % ARRAY_SIZE(testval##shorttype##bits)]; \
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
69 return v##type##bits##x##size##_load_aligned(x); \
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
70 }
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
71
45
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
72 #define VPRINT(type, ctype, print, bits, size) \
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
73 static inline void print_v##type##bits##x##size(FILE *file, v##type##bits##x##size vec) \
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
74 { \
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
75 fputs("vector: ", file); \
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
76 \
45
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
77 V##ctype##bits##x##size##_ALIGNED_ARRAY(v); \
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
78 \
45
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
79 v##type##bits##x##size##_store_aligned(vec, v); \
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
80 \
45
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
81 fprintf(file, "%" print, v[0]); \
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
82 \
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
83 for (int i = 1; i < size; i++) \
45
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
84 fprintf(file, ", %" print, v[i]); \
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
85 \
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
86 fputs("\n", file); \
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
87 }
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
88
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
89 #define DEF_VEC_TEST_FUNCS(bits, size) \
45
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
90 VTEST(, int, INT, bits, size) VTEST(u, uint, UINT, bits, size) \
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
91 VPRINT(int, INT, PRI##d##bits, bits, size) VPRINT(uint, UINT, PRI##u##bits, bits, size)
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
92
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
93 #define DEF_VEC_TEST_FUNC_FLOAT(bits, size) \
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
94 VTEST(f, f, F, bits, size) \
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
95 VPRINT(f, F, "f", bits, size)
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
96
17
41dd962abdd1 *: allow compiling vec in a C++ translation unit
Paper <paper@tflc.us>
parents: 15
diff changeset
97 DEF_VEC_TEST_FUNCS(8, 2)
41dd962abdd1 *: allow compiling vec in a C++ translation unit
Paper <paper@tflc.us>
parents: 15
diff changeset
98
41dd962abdd1 *: allow compiling vec in a C++ translation unit
Paper <paper@tflc.us>
parents: 15
diff changeset
99 DEF_VEC_TEST_FUNCS(8, 4)
41dd962abdd1 *: allow compiling vec in a C++ translation unit
Paper <paper@tflc.us>
parents: 15
diff changeset
100 DEF_VEC_TEST_FUNCS(16, 2)
41dd962abdd1 *: allow compiling vec in a C++ translation unit
Paper <paper@tflc.us>
parents: 15
diff changeset
101
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
102 DEF_VEC_TEST_FUNCS(8, 8)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
103 DEF_VEC_TEST_FUNCS(16, 4)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
104 DEF_VEC_TEST_FUNCS(32, 2)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
105
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
106 DEF_VEC_TEST_FUNCS(8, 16)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
107 DEF_VEC_TEST_FUNCS(16, 8)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
108 DEF_VEC_TEST_FUNCS(32, 4)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
109 DEF_VEC_TEST_FUNCS(64, 2)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
110
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
111 DEF_VEC_TEST_FUNCS(8, 32)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
112 DEF_VEC_TEST_FUNCS(16, 16)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
113 DEF_VEC_TEST_FUNCS(32, 8)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
114 DEF_VEC_TEST_FUNCS(64, 4)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
115
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
116 DEF_VEC_TEST_FUNCS(8, 64)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
117 DEF_VEC_TEST_FUNCS(16, 32)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
118 DEF_VEC_TEST_FUNCS(32, 16)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
119 DEF_VEC_TEST_FUNCS(64, 8)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
120
45
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
121 DEF_VEC_TEST_FUNC_FLOAT(32, 2)
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
122 DEF_VEC_TEST_FUNC_FLOAT(32, 4)
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
123 DEF_VEC_TEST_FUNC_FLOAT(32, 8)
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
124 DEF_VEC_TEST_FUNC_FLOAT(32, 16)
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
125
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
126 DEF_VEC_TEST_FUNC_FLOAT(64, 2)
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
127 DEF_VEC_TEST_FUNC_FLOAT(64, 4)
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
128 DEF_VEC_TEST_FUNC_FLOAT(64, 8)
7955bed1d169 *: add preliminary floating point support
Paper <paper@tflc.us>
parents: 41
diff changeset
129
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
130 #undef DEF_VEC_TEST_FUNCS
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
131 #undef VPRINT
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
132 #undef VTEST
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
133
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
134 // ------------------------------------------------------------
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
135
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
136 #include "test_align.h"
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
137 #include "test_arith.h"
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
138 #include "test_compare.h"
18
cf04071d2148 impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents: 17
diff changeset
139 #include "test_shift.h"
37
4b5a557aa64f *: turns out extern is a practical joke. rewrite to be always inline again
Paper <paper@tflc.us>
parents: 30
diff changeset
140 #include "test_benchmark.h"
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
141
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
142 // ------------------------------------------------------------
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
143
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
144 int main(void)
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
145 {
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
146 int ret = 0;
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
147
37
4b5a557aa64f *: turns out extern is a practical joke. rewrite to be always inline again
Paper <paper@tflc.us>
parents: 30
diff changeset
148 srand(time(NULL));
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
149
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
150 ret |= test_align();
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
151 ret |= test_arith();
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
152 ret |= test_compare();
18
cf04071d2148 impl: initial NEON support; test: verify bit shifting functions
Paper <paper@tflc.us>
parents: 17
diff changeset
153 ret |= test_shift();
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
154
37
4b5a557aa64f *: turns out extern is a practical joke. rewrite to be always inline again
Paper <paper@tflc.us>
parents: 30
diff changeset
155 test_benchmark();
4b5a557aa64f *: turns out extern is a practical joke. rewrite to be always inline again
Paper <paper@tflc.us>
parents: 30
diff changeset
156
15
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
157 return ret;
e05c257c6a23 *: huge refactor, add many new x86 intrinsics and the like
Paper <paper@tflc.us>
parents:
diff changeset
158 }