Skip to content

Commit 87c317c

Browse files
committed
More bulk repairs
1 parent ba89d8d commit 87c317c

File tree

115 files changed

+2375
-2376
lines changed

Some content is hidden

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

115 files changed

+2375
-2376
lines changed

include/boost/decimal/decimal128.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ BOOST_DECIMAL_EXPORT class decimal128_t final
543543
friend constexpr auto fmad128(decimal128_t x, decimal128_t y, decimal128_t z) noexcept -> decimal128_t;
544544
};
545545

546-
[[deprecated("Use re-named type decimal128_t instead of decimal128")]] BOOST_DECIMAL_EXPORT using decimal128 = decimal128_t;
546+
BOOST_DECIMAL_EXPORT using decimal128 [[deprecated("Use re-named type decimal128_t instead of decimal128")]] = decimal128_t;
547547

548548
#if !defined(BOOST_DECIMAL_DISABLE_IOSTREAM)
549549
inline std::string bit_string(decimal128_t rhs) noexcept

include/boost/decimal/decimal128_fast.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ BOOST_DECIMAL_CONSTEXPR_VARIABLE auto d128_fast_snan_high_bits = UINT64_MAX;
4040

4141
} // namespace detail
4242

43-
[[deprecated("Use re-named type decimal_fast128_t instead of decimal_fast128_t")]]
4443
BOOST_DECIMAL_EXPORT class decimal_fast128_t final
4544
{
4645
public:
@@ -370,7 +369,7 @@ BOOST_DECIMAL_EXPORT class decimal_fast128_t final
370369
friend constexpr auto quantized128f(const decimal_fast128_t& lhs, const decimal_fast128_t& rhs) noexcept -> decimal_fast128_t;
371370
};
372371

373-
[[deprecated("Use re-named type decimal_fast128_t instead of decimal128_fast")]] using decimal128_fast = decimal_fast128_t;
372+
BOOST_DECIMAL_EXPORT using decimal128_fast [[deprecated("Use re-named type decimal_fast128_t instead of decimal128_fast")]] = decimal_fast128_t;
374373

375374
#ifdef BOOST_DECIMAL_HAS_CONCEPTS
376375
template <BOOST_DECIMAL_UNSIGNED_INTEGRAL T1, BOOST_DECIMAL_INTEGRAL T2>

include/boost/decimal/decimal32.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ BOOST_DECIMAL_EXPORT class decimal32_t final // NOLINT(cppcoreguidelines-special
563563
constexpr auto edit_sign(bool sign) noexcept -> void;
564564
};
565565

566-
[[deprecated("Use the renamed decimal32_t instead of decimal32")]] BOOST_DECIMAL_EXPORT using decimal32 = decimal32_t;
566+
BOOST_DECIMAL_EXPORT using decimal32 [[deprecated("Use the renamed decimal32_t instead of decimal32")]] = decimal32_t;
567567

568568
#if defined(__GNUC__) && __GNUC__ >= 8
569569
# pragma GCC diagnostic pop

include/boost/decimal/decimal32_fast.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ BOOST_DECIMAL_EXPORT class decimal_fast32_t final
374374
friend constexpr auto quantized32f(decimal_fast32_t lhs, decimal_fast32_t rhs) noexcept -> decimal_fast32_t;
375375
};
376376

377-
[[deprecated("Use re-named type decimal_fast32_t instead of decimal_fast32_t")]] BOOST_DECIMAL_EXPORT using decimal32_fast = decimal_fast32_t;
377+
BOOST_DECIMAL_EXPORT using decimal32_fast [[deprecated("Use re-named type decimal_fast32_t instead of decimal_fast32_t")]] = decimal_fast32_t;
378378

379379
template <typename T1, typename T2, std::enable_if_t<detail::is_unsigned_v<T1> && detail::is_integral_v<T2>, bool>>
380380
constexpr decimal_fast32_t::decimal_fast32_t(T1 coeff, T2 exp, bool sign) noexcept

include/boost/decimal/decimal64.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ BOOST_DECIMAL_EXPORT class decimal64_t final
551551
friend constexpr auto scalblnd64(decimal64_t num, long exp) noexcept -> decimal64_t;
552552
};
553553

554-
[[deprecated("Use re-named type decimal64_t instead of decimal64")]] BOOST_DECIMAL_EXPORT using decimal64 = decimal64_t;
554+
BOOST_DECIMAL_EXPORT using decimal64 [[deprecated("Use re-named type decimal64_t instead of decimal64")]] = decimal64_t;
555555

556556
#if defined(__GNUC__) && __GNUC__ >= 8
557557
# pragma GCC diagnostic pop

include/boost/decimal/decimal64_fast.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ BOOST_DECIMAL_EXPORT class decimal_fast64_t final
382382
friend constexpr auto scalblnd64f(decimal_fast64_t num, long exp) noexcept -> decimal_fast64_t;
383383
};
384384

385-
[[deprecated("Use re-named type decimal_fast64_t instead of decimal64_fast")]] BOOST_DECIMAL_EXPORT using decimal64_fast = decimal_fast64_t;
385+
BOOST_DECIMAL_EXPORT using decimal64_fast [[deprecated("Use re-named type decimal_fast64_t instead of decimal64_fast")]] = decimal_fast64_t;
386386

387387
#ifdef BOOST_DECIMAL_HAS_CONCEPTS
388388
template <BOOST_DECIMAL_UNSIGNED_INTEGRAL T1, BOOST_DECIMAL_INTEGRAL T2>

include/boost/decimal/decimal_fast128_t.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
#ifndef BOOST_DECIMAL_DECIMAL_FAST128_T_HPP
66
#define BOOST_DECIMAL_DECIMAL_FAST128_T_HPP
77

8-
#include <boost/decimal/decimal64_fast.hpp>
8+
#include <boost/decimal/decimal128_fast.hpp>
99

1010
#endif // BOOST_DECIMAL_DECIMAL_FAST128_T_HPP

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_t_t* 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_t_t* buffer, s
2727
}
2828
}
2929

30-
__attribute__ ((__noinline__)) void test_comparisons_32(_decimal32_t_t* 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_t_t* data, co
3838
{
3939
for (size_t k = 0; k < K - 1; ++k)
4040
{
41-
_decimal32_t_t val1 = data[k];
42-
_decimal32_t_t 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_t_t* data, co
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_t_t* 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_t_t* buffer, s
6666
}
6767
}
6868

69-
__attribute__ ((__noinline__)) void test_comparisons_64(_decimal64_t_t* 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_t_t* data, co
7777
{
7878
for (size_t k = 0; k < K - 1; ++k)
7979
{
80-
_decimal64_t_t val1 = data[k];
81-
_decimal64_t_t 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_t_t* data, co
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_t_t* 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_t_t* buffer,
105105
}
106106
}
107107

108-
__attribute__ ((__noinline__)) void test_comparisons_128(_decimal128_t_t* 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_t_t* data,
116116
{
117117
for (size_t k = 0; k < K - 1; ++k)
118118
{
119-
_decimal128_t_t val1 = data[k];
120-
_decimal128_t_t 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_t_t* data,
134134
printf("Comparisons <%-10s>: %-10" PRIu64 " us (s=%zu)\n", label, elapsed_time_us, s);
135135
}
136136

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

139-
__attribute__ ((__noinline__)) _decimal32_t_t add_32(_decimal32_t_t a, _decimal32_t_t b)
139+
__attribute__ ((__noinline__)) _decimal32_t add_32(_decimal32_t a, _decimal32_t b)
140140
{
141141
return a + b;
142142
}
143-
__attribute__ ((__noinline__)) _decimal32_t_t sub_32(_decimal32_t_t a, _decimal32_t_t 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_t_t mul_32(_decimal32_t_t a, _decimal32_t_t 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_t_t div_32(_decimal32_t_t a, _decimal32_t_t 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_t_t* 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_t_t
166166
{
167167
for (size_t k = 0; k < K - 1; ++k)
168168
{
169-
_decimal32_t_t val1 = data[k];
170-
_decimal32_t_t 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_t_t
179179
printf("%-15s<%-10s >: %-10" PRIu64 " us (s=%zu)\n", op_label, label, elapsed_time_us, s);
180180
}
181181

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

184-
__attribute__ ((__noinline__)) _decimal64_t_t add_64(_decimal64_t_t a, _decimal64_t_t 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_t_t sub_64(_decimal64_t_t a, _decimal64_t_t 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_t_t mul_64(_decimal64_t_t a, _decimal64_t_t 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_t_t div_64(_decimal64_t_t a, _decimal64_t_t 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_t_t* 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_t_t
212212
{
213213
for (size_t k = 0; k < K - 1; ++k)
214214
{
215-
_decimal64_t_t val1 = data[k];
216-
_decimal64_t_t 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_t_t
225225
printf("%-15s<%-10s >: %-10" PRIu64 " us (s=%zu)\n", op_label, label, elapsed_time_us, s);
226226
}
227227

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

230-
__attribute__ ((__noinline__)) _decimal128_t_t add_128(_decimal128_t_t a, _decimal128_t_t 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_t_t sub_128(_decimal128_t_t a, _decimal128_t_t 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_t_t mul_128(_decimal128_t_t a, _decimal128_t_t 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_t_t div_128(_decimal128_t_t a, _decimal128_t_t 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_t_t* 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_t
258258
{
259259
for (size_t k = 0; k < K - 1; ++k)
260260
{
261-
_decimal128_t_t val1 = data[k];
262-
_decimal128_t_t 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_t_t* d32_array = malloc(K * sizeof(_decimal32_t_t));
280-
_decimal64_t_t* d64_array = malloc(K * sizeof(_decimal64_t_t));
281-
_decimal128_t_t* d128_array = malloc(K * sizeof(_decimal128_t_t));
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_t_t");
291+
test_comparisons_32(d32_array, "_decimal32_t");
292292

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

296296
generate_vector_128(d128_array, K);
297-
test_comparisons_128(d128_array, "_decimal128_t_t");
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_t_t", "Addition");
302-
test_two_element_operation_64(d64_array, add_64, "_decimal64_t_t", "Addition");
303-
test_two_element_operation_128(d128_array, add_128, "_decimal128_t_t", "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_t_t", "Subtraction");
308-
test_two_element_operation_64(d64_array, sub_64, "_decimal64_t_t", "Subtraction");
309-
test_two_element_operation_128(d128_array, sub_128, "_decimal128_t_t", "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_t_t", "Multiplication");
314-
test_two_element_operation_64(d64_array, mul_64, "_decimal64_t_t", "Multiplication");
315-
test_two_element_operation_128(d128_array, mul_128, "_decimal128_t_t", "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_t_t", "Division");
320-
test_two_element_operation_64(d64_array, div_64, "_decimal64_t_t", "Division");
321-
test_two_element_operation_128(d128_array, div_128, "_decimal128_t_t", "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)