Skip to content

Commit 79fc6ad

Browse files
committed
Rename in test files
1 parent 51cfc31 commit 79fc6ad

File tree

122 files changed

+3718
-3718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+3718
-3718
lines changed

test/Jamfile

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,25 @@ run github_issue_900.cpp ;
6262
run github_issue_911.cpp ;
6363
run link_1.cpp link_2.cpp link_3.cpp ;
6464
run quick.cpp ;
65-
run random_decimal32_comp.cpp ;
66-
run random_decimal32_fast_comp.cpp ;
67-
run random_decimal32_fast_math.cpp ;
68-
run random_decimal32_math.cpp ;
69-
run random_decimal64_comp.cpp ;
70-
run random_decimal64_fast_comp.cpp ;
71-
run random_decimal64_fast_math.cpp ;
72-
run random_decimal64_math.cpp ;
73-
run random_decimal128_comp.cpp ;
74-
run random_decimal128_fast_comp.cpp ;
75-
run random_decimal128_fast_math.cpp ;
76-
run random_decimal128_math.cpp ;
65+
run random_decimal32_t_comp.cpp ;
66+
run random_decimal_fast32_t_comp.cpp ;
67+
run random_decimal_fast32_t_math.cpp ;
68+
run random_decimal32_t_math.cpp ;
69+
run random_decimal64_t_comp.cpp ;
70+
run random_decimal_fast64_t_comp.cpp ;
71+
run random_decimal_fast64_t_math.cpp ;
72+
run random_decimal64_t_math.cpp ;
73+
run random_decimal128_t_comp.cpp ;
74+
run random_decimal_fast128_t_comp.cpp ;
75+
run random_decimal_fast128_t_math.cpp ;
76+
run random_decimal128_t_math.cpp ;
7777
run random_mixed_decimal_comp.cpp ;
7878
run random_mixed_decimal_math.cpp ;
79-
run roundtrip_decimal32.cpp ;
80-
run roundtrip_decimal32_fast.cpp ;
81-
run roundtrip_decimal64.cpp ;
82-
run roundtrip_decimal128.cpp ;
83-
run roundtrip_decimal128_fast.cpp ;
79+
run roundtrip_decimal32_t.cpp ;
80+
run roundtrip_decimal_fast32_t.cpp ;
81+
run roundtrip_decimal64_t.cpp ;
82+
run roundtrip_decimal128_t.cpp ;
83+
run roundtrip_decimal_fast128_t.cpp ;
8484
run test_acos.cpp ;
8585
run test_acosh.cpp ;
8686
run test_asin.cpp ;
@@ -99,15 +99,15 @@ run test_cbrt.cpp ;
9999
run test_cmath.cpp ;
100100
run test_constants.cpp ;
101101
run test_cosh.cpp ;
102-
#run test_decimal32.cpp ;
103-
run test_decimal32_fast_basis.cpp ;
104-
run test_decimal32_fast_stream.cpp ;
105-
run test_decimal32_stream.cpp ;
106-
#run test_decimal64_basis.cpp ;
107-
run test_decimal64_fast_basis.cpp ;
108-
run test_decimal64_fast_stream.cpp ;
109-
run test_decimal64_stream.cpp ;
110-
#run test_decimal128_basis.cpp ;
102+
#run test_decimal32_t.cpp ;
103+
run test_decimal_fast32_t_basis.cpp ;
104+
run test_decimal_fast32_t_stream.cpp ;
105+
run test_decimal32_t_stream.cpp ;
106+
#run test_decimal64_t_basis.cpp ;
107+
run test_decimal_fast64_t_basis.cpp ;
108+
run test_decimal_fast64_t_stream.cpp ;
109+
run test_decimal64_t_stream.cpp ;
110+
#run test_decimal128_t_basis.cpp ;
111111
run test_decimal_quantum.cpp ;
112112
run test_dpd_conversions.cpp ;
113113
run test_edges_and_behave.cpp ;
@@ -132,11 +132,11 @@ run test_git_issue_266.cpp ;
132132
run test_git_issue_271.cpp ;
133133
run test_hash.cpp ;
134134
run test_hermite.cpp ;
135-
compile-fail test_illegal_decimal32_fast_implicit_conversions.cpp ;
136-
compile-fail test_illegal_decimal32_implicit_conversions.cpp ;
137-
compile-fail test_illegal_decimal64_fast_implicit_conversions.cpp ;
138-
compile-fail test_illegal_decimal64_implicit_conversions.cpp ;
139-
compile-fail test_illegal_decimal128_implicit_conversions.cpp ;
135+
compile-fail test_illegal_decimal_fast32_t_implicit_conversions.cpp ;
136+
compile-fail test_illegal_decimal32_t_implicit_conversions.cpp ;
137+
compile-fail test_illegal_decimal_fast64_t_implicit_conversions.cpp ;
138+
compile-fail test_illegal_decimal64_t_implicit_conversions.cpp ;
139+
compile-fail test_illegal_decimal128_t_implicit_conversions.cpp ;
140140
run test_implicit_integral_conversion.cpp ;
141141
run test_laguerre.cpp ;
142142
run test_legal_implicit_conversions.cpp ;
@@ -184,12 +184,12 @@ compile compile_tests/charconv_compile.cpp ;
184184
compile compile_tests/cmath_compile.cpp ;
185185
compile compile_tests/cstdio_compile.cpp ;
186186
compile compile_tests/cstdlib_compile.cpp ;
187-
compile compile_tests/decimal32_compile.cpp ;
188-
compile compile_tests/decimal32_fast_compile.cpp ;
189-
compile compile_tests/decimal64_compile.cpp ;
190-
compile compile_tests/decimal64_fast_compile.cpp ;
191-
compile compile_tests/decimal128_compile.cpp ;
192-
compile compile_tests/decimal128_fast_compile.cpp ;
187+
compile compile_tests/decimal32_t_compile.cpp ;
188+
compile compile_tests/decimal_fast32_t_compile.cpp ;
189+
compile compile_tests/decimal64_t_compile.cpp ;
190+
compile compile_tests/decimal_fast64_t_compile.cpp ;
191+
compile compile_tests/decimal128_t_compile.cpp ;
192+
compile compile_tests/decimal_fast128_t_compile.cpp ;
193193
compile compile_tests/main_header.cpp ;
194194
compile compile_tests/fenv_compile.cpp ;
195195
compile compile_tests/format_compile.cpp ;

test/benchmark_libdfp.c

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ double float_rand(double min, double max)
1717
return min + scale * (max - min);
1818
}
1919

20-
__attribute__ ((__noinline__)) void generate_vector_32(_Decimal32* buffer, size_t buffer_len)
20+
__attribute__ ((__noinline__)) void generate_vector_32(_decimal32_t* buffer, size_t buffer_len)
2121
{
2222
size_t i = 0;
2323
while (i < buffer_len)
@@ -27,7 +27,7 @@ __attribute__ ((__noinline__)) void generate_vector_32(_Decimal32* buffer, size_
2727
}
2828
}
2929

30-
__attribute__ ((__noinline__)) void test_comparisons_32(_Decimal32* data, const char* label)
30+
__attribute__ ((__noinline__)) void test_comparisons_32(_decimal32_t* data, const char* label)
3131
{
3232
struct timespec t1, t2;
3333
clock_gettime(CLOCK_MONOTONIC, &t1);
@@ -38,8 +38,8 @@ __attribute__ ((__noinline__)) void test_comparisons_32(_Decimal32* data, const
3838
{
3939
for (size_t k = 0; k < K - 1; ++k)
4040
{
41-
_Decimal32 val1 = data[k];
42-
_Decimal32 val2 = data[k + 1];
41+
_decimal32_t val1 = data[k];
42+
_decimal32_t val2 = data[k + 1];
4343

4444
s += (size_t)(val1 > val2);
4545
s += (size_t)(val1 >= val2);
@@ -56,7 +56,7 @@ __attribute__ ((__noinline__)) void test_comparisons_32(_Decimal32* data, const
5656
printf("Comparisons <%-10s >: %-10" PRIu64 " us (s=%zu)\n", label, elapsed_time_us, s);
5757
}
5858

59-
__attribute__ ((__noinline__)) void generate_vector_64(_Decimal64* buffer, size_t buffer_len)
59+
__attribute__ ((__noinline__)) void generate_vector_64(_decimal64_t* buffer, size_t buffer_len)
6060
{
6161
size_t i = 0;
6262
while (i < buffer_len)
@@ -66,7 +66,7 @@ __attribute__ ((__noinline__)) void generate_vector_64(_Decimal64* buffer, size_
6666
}
6767
}
6868

69-
__attribute__ ((__noinline__)) void test_comparisons_64(_Decimal64* data, const char* label)
69+
__attribute__ ((__noinline__)) void test_comparisons_64(_decimal64_t* data, const char* label)
7070
{
7171
struct timespec t1, t2;
7272
clock_gettime(CLOCK_MONOTONIC, &t1);
@@ -77,8 +77,8 @@ __attribute__ ((__noinline__)) void test_comparisons_64(_Decimal64* data, const
7777
{
7878
for (size_t k = 0; k < K - 1; ++k)
7979
{
80-
_Decimal64 val1 = data[k];
81-
_Decimal64 val2 = data[k + 1];
80+
_decimal64_t val1 = data[k];
81+
_decimal64_t val2 = data[k + 1];
8282

8383
s += (size_t)(val1 > val2);
8484
s += (size_t)(val1 >= val2);
@@ -95,7 +95,7 @@ __attribute__ ((__noinline__)) void test_comparisons_64(_Decimal64* data, const
9595
printf("Comparisons <%-10s >: %-10" PRIu64 " us (s=%zu)\n", label, elapsed_time_us, s);
9696
}
9797

98-
__attribute__ ((__noinline__)) void generate_vector_128(_Decimal128* buffer, size_t buffer_len)
98+
__attribute__ ((__noinline__)) void generate_vector_128(_decimal128_t* buffer, size_t buffer_len)
9999
{
100100
size_t i = 0;
101101
while (i < buffer_len)
@@ -105,7 +105,7 @@ __attribute__ ((__noinline__)) void generate_vector_128(_Decimal128* buffer, siz
105105
}
106106
}
107107

108-
__attribute__ ((__noinline__)) void test_comparisons_128(_Decimal128* data, const char* label)
108+
__attribute__ ((__noinline__)) void test_comparisons_128(_decimal128_t* data, const char* label)
109109
{
110110
struct timespec t1, t2;
111111
clock_gettime(CLOCK_MONOTONIC, &t1);
@@ -116,8 +116,8 @@ __attribute__ ((__noinline__)) void test_comparisons_128(_Decimal128* data, cons
116116
{
117117
for (size_t k = 0; k < K - 1; ++k)
118118
{
119-
_Decimal128 val1 = data[k];
120-
_Decimal128 val2 = data[k + 1];
119+
_decimal128_t val1 = data[k];
120+
_decimal128_t val2 = data[k + 1];
121121

122122
s += (size_t)(val1 > val2);
123123
s += (size_t)(val1 >= val2);
@@ -134,28 +134,28 @@ __attribute__ ((__noinline__)) void test_comparisons_128(_Decimal128* data, cons
134134
printf("Comparisons <%-10s>: %-10" PRIu64 " us (s=%zu)\n", label, elapsed_time_us, s);
135135
}
136136

137-
typedef _Decimal32 (*operation_32)(_Decimal32, _Decimal32);
137+
typedef _decimal32_t (*operation_32)(_decimal32_t, _decimal32_t);
138138

139-
__attribute__ ((__noinline__)) _Decimal32 add_32(_Decimal32 a, _Decimal32 b)
139+
__attribute__ ((__noinline__)) _decimal32_t add_32(_decimal32_t a, _decimal32_t b)
140140
{
141141
return a + b;
142142
}
143-
__attribute__ ((__noinline__)) _Decimal32 sub_32(_Decimal32 a, _Decimal32 b)
143+
__attribute__ ((__noinline__)) _decimal32_t sub_32(_decimal32_t a, _decimal32_t b)
144144
{
145145
return a - b;
146146
}
147147

148-
__attribute__ ((__noinline__)) _Decimal32 mul_32(_Decimal32 a, _Decimal32 b)
148+
__attribute__ ((__noinline__)) _decimal32_t mul_32(_decimal32_t a, _decimal32_t b)
149149
{
150150
return a * b;
151151
}
152152

153-
__attribute__ ((__noinline__)) _Decimal32 div_32(_Decimal32 a, _Decimal32 b)
153+
__attribute__ ((__noinline__)) _decimal32_t div_32(_decimal32_t a, _decimal32_t b)
154154
{
155155
return a / b;
156156
}
157157

158-
__attribute__ ((__noinline__)) void test_two_element_operation_32(_Decimal32* data, operation_32 op, const char* label, const char* op_label)
158+
__attribute__ ((__noinline__)) void test_two_element_operation_32(_decimal32_t* data, operation_32 op, const char* label, const char* op_label)
159159
{
160160
struct timespec t1, t2;
161161
clock_gettime(CLOCK_MONOTONIC, &t1);
@@ -166,8 +166,8 @@ __attribute__ ((__noinline__)) void test_two_element_operation_32(_Decimal32* da
166166
{
167167
for (size_t k = 0; k < K - 1; ++k)
168168
{
169-
_Decimal32 val1 = data[k];
170-
_Decimal32 val2 = data[k + 1];
169+
_decimal32_t val1 = data[k];
170+
_decimal32_t val2 = data[k + 1];
171171

172172
s += (size_t)op(val1, val2);
173173
}
@@ -179,29 +179,29 @@ __attribute__ ((__noinline__)) void test_two_element_operation_32(_Decimal32* da
179179
printf("%-15s<%-10s >: %-10" PRIu64 " us (s=%zu)\n", op_label, label, elapsed_time_us, s);
180180
}
181181

182-
typedef _Decimal64 (*operation_64)(_Decimal64, _Decimal64);
182+
typedef _decimal64_t (*operation_64)(_decimal64_t, _decimal64_t);
183183

184-
__attribute__ ((__noinline__)) _Decimal64 add_64(_Decimal64 a, _Decimal64 b)
184+
__attribute__ ((__noinline__)) _decimal64_t add_64(_decimal64_t a, _decimal64_t b)
185185
{
186186
return a + b;
187187
}
188188

189-
__attribute__ ((__noinline__)) _Decimal64 sub_64(_Decimal64 a, _Decimal64 b)
189+
__attribute__ ((__noinline__)) _decimal64_t sub_64(_decimal64_t a, _decimal64_t b)
190190
{
191191
return a - b;
192192
}
193193

194-
__attribute__ ((__noinline__)) _Decimal64 mul_64(_Decimal64 a, _Decimal64 b)
194+
__attribute__ ((__noinline__)) _decimal64_t mul_64(_decimal64_t a, _decimal64_t b)
195195
{
196196
return a * b;
197197
}
198198

199-
__attribute__ ((__noinline__)) _Decimal64 div_64(_Decimal64 a, _Decimal64 b)
199+
__attribute__ ((__noinline__)) _decimal64_t div_64(_decimal64_t a, _decimal64_t b)
200200
{
201201
return a / b;
202202
}
203203

204-
__attribute__ ((__noinline__)) void test_two_element_operation_64(_Decimal64* data, operation_64 op, const char* label, const char* op_label)
204+
__attribute__ ((__noinline__)) void test_two_element_operation_64(_decimal64_t* data, operation_64 op, const char* label, const char* op_label)
205205
{
206206
struct timespec t1, t2;
207207
clock_gettime(CLOCK_MONOTONIC, &t1);
@@ -212,8 +212,8 @@ __attribute__ ((__noinline__)) void test_two_element_operation_64(_Decimal64* da
212212
{
213213
for (size_t k = 0; k < K - 1; ++k)
214214
{
215-
_Decimal64 val1 = data[k];
216-
_Decimal64 val2 = data[k + 1];
215+
_decimal64_t val1 = data[k];
216+
_decimal64_t val2 = data[k + 1];
217217

218218
s += (size_t)op(val1, val2);
219219
}
@@ -225,29 +225,29 @@ __attribute__ ((__noinline__)) void test_two_element_operation_64(_Decimal64* da
225225
printf("%-15s<%-10s >: %-10" PRIu64 " us (s=%zu)\n", op_label, label, elapsed_time_us, s);
226226
}
227227

228-
typedef _Decimal128 (*operation_128)(_Decimal128, _Decimal128);
228+
typedef _decimal128_t (*operation_128)(_decimal128_t, _decimal128_t);
229229

230-
__attribute__ ((__noinline__)) _Decimal128 add_128(_Decimal128 a, _Decimal128 b)
230+
__attribute__ ((__noinline__)) _decimal128_t add_128(_decimal128_t a, _decimal128_t b)
231231
{
232232
return a + b;
233233
}
234234

235-
__attribute__ ((__noinline__)) _Decimal128 sub_128(_Decimal128 a, _Decimal128 b)
235+
__attribute__ ((__noinline__)) _decimal128_t sub_128(_decimal128_t a, _decimal128_t b)
236236
{
237237
return a - b;
238238
}
239239

240-
__attribute__ ((__noinline__)) _Decimal128 mul_128(_Decimal128 a, _Decimal128 b)
240+
__attribute__ ((__noinline__)) _decimal128_t mul_128(_decimal128_t a, _decimal128_t b)
241241
{
242242
return a * b;
243243
}
244244

245-
__attribute__ ((__noinline__)) _Decimal128 div_128(_Decimal128 a, _Decimal128 b)
245+
__attribute__ ((__noinline__)) _decimal128_t div_128(_decimal128_t a, _decimal128_t b)
246246
{
247247
return a / b;
248248
}
249249

250-
__attribute__ ((__noinline__)) void test_two_element_operation_128(_Decimal128* data, operation_128 op, const char* label, const char* op_label)
250+
__attribute__ ((__noinline__)) void test_two_element_operation_128(_decimal128_t* data, operation_128 op, const char* label, const char* op_label)
251251
{
252252
struct timespec t1, t2;
253253
clock_gettime(CLOCK_MONOTONIC, &t1);
@@ -258,8 +258,8 @@ __attribute__ ((__noinline__)) void test_two_element_operation_128(_Decimal128*
258258
{
259259
for (size_t k = 0; k < K - 1; ++k)
260260
{
261-
_Decimal128 val1 = data[k];
262-
_Decimal128 val2 = data[k + 1];
261+
_decimal128_t val1 = data[k];
262+
_decimal128_t val2 = data[k + 1];
263263

264264
s += (size_t)op(val1, val2);
265265
}
@@ -276,9 +276,9 @@ int main()
276276
// One time init of random number generator
277277
srand(time(NULL));
278278

279-
_Decimal32* d32_array = malloc(K * sizeof(_Decimal32));
280-
_Decimal64* d64_array = malloc(K * sizeof(_Decimal64));
281-
_Decimal128* d128_array = malloc(K * sizeof(_Decimal128));
279+
_decimal32_t* d32_array = malloc(K * sizeof(_decimal32_t));
280+
_decimal64_t* d64_array = malloc(K * sizeof(_decimal64_t));
281+
_decimal128_t* d128_array = malloc(K * sizeof(_decimal128_t));
282282

283283
if (d32_array == NULL || d64_array == NULL || d128_array == NULL)
284284
{
@@ -288,37 +288,37 @@ int main()
288288
printf("===== Comparisons =====\n");
289289

290290
generate_vector_32(d32_array, K);
291-
test_comparisons_32(d32_array, "_Decimal32");
291+
test_comparisons_32(d32_array, "_decimal32_t");
292292

293293
generate_vector_64(d64_array, K);
294-
test_comparisons_64(d64_array, "_Decimal64");
294+
test_comparisons_64(d64_array, "_decimal64_t");
295295

296296
generate_vector_128(d128_array, K);
297-
test_comparisons_128(d128_array, "_Decimal128");
297+
test_comparisons_128(d128_array, "_decimal128_t");
298298

299299
printf("\n===== Addition =====\n");
300300

301-
test_two_element_operation_32(d32_array, add_32, "_Decimal32", "Addition");
302-
test_two_element_operation_64(d64_array, add_64, "_Decimal64", "Addition");
303-
test_two_element_operation_128(d128_array, add_128, "_Decimal128", "Addition");
301+
test_two_element_operation_32(d32_array, add_32, "_decimal32_t", "Addition");
302+
test_two_element_operation_64(d64_array, add_64, "_decimal64_t", "Addition");
303+
test_two_element_operation_128(d128_array, add_128, "_decimal128_t", "Addition");
304304

305305
printf("\n===== Subtraction =====\n");
306306

307-
test_two_element_operation_32(d32_array, sub_32, "_Decimal32", "Subtraction");
308-
test_two_element_operation_64(d64_array, sub_64, "_Decimal64", "Subtraction");
309-
test_two_element_operation_128(d128_array, sub_128, "_Decimal128", "Subtraction");
307+
test_two_element_operation_32(d32_array, sub_32, "_decimal32_t", "Subtraction");
308+
test_two_element_operation_64(d64_array, sub_64, "_decimal64_t", "Subtraction");
309+
test_two_element_operation_128(d128_array, sub_128, "_decimal128_t", "Subtraction");
310310

311311
printf("\n===== Multiplication =====\n");
312312

313-
test_two_element_operation_32(d32_array, mul_32, "_Decimal32", "Multiplication");
314-
test_two_element_operation_64(d64_array, mul_64, "_Decimal64", "Multiplication");
315-
test_two_element_operation_128(d128_array, mul_128, "_Decimal128", "Multiplication");
313+
test_two_element_operation_32(d32_array, mul_32, "_decimal32_t", "Multiplication");
314+
test_two_element_operation_64(d64_array, mul_64, "_decimal64_t", "Multiplication");
315+
test_two_element_operation_128(d128_array, mul_128, "_decimal128_t", "Multiplication");
316316

317317
printf("\n===== Division =====\n");
318318

319-
test_two_element_operation_32(d32_array, div_32, "_Decimal32", "Division");
320-
test_two_element_operation_64(d64_array, div_64, "_Decimal64", "Division");
321-
test_two_element_operation_128(d128_array, div_128, "_Decimal128", "Division");
319+
test_two_element_operation_32(d32_array, div_32, "_decimal32_t", "Division");
320+
test_two_element_operation_64(d64_array, div_64, "_decimal64_t", "Division");
321+
test_two_element_operation_128(d128_array, div_128, "_decimal128_t", "Division");
322322

323323
free(d32_array);
324324
free(d64_array);

0 commit comments

Comments
 (0)