Skip to content

Commit 67b5202

Browse files
authored
Merge pull request #645 from ckormanyos/scripts_and_settings
Scripts and settings
2 parents 1d72404 + 928052f commit 67b5202

9 files changed

+220
-183
lines changed

ref_app/src/app/benchmark/app_benchmark_pi_spigot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ auto app::benchmark::run_pi_spigot() -> bool
6464
app_benchmark_pi_spigot_digits10 < app_benchmark_pi_spigot_object.get_output_digit_count();
6565
++app_benchmark_pi_spigot_digits10)
6666
{
67-
const std::uint8_t by_calculated = app_benchmark_pi_spigot_out_.at(app_benchmark_pi_spigot_digits10);
68-
const std::uint8_t by_control = app_benchmark_pi_spigot_ctrl.at(app_benchmark_pi_spigot_digits10);
67+
const std::uint8_t by_calculated = app_benchmark_pi_spigot_out_.at(static_cast<std::size_t>(app_benchmark_pi_spigot_digits10));
68+
const std::uint8_t by_control = app_benchmark_pi_spigot_ctrl.at(static_cast<std::size_t>(app_benchmark_pi_spigot_digits10));
6969

7070
const bool next_digit_is_ok = (by_calculated == by_control);
7171

ref_app/src/app/benchmark/app_benchmark_pi_spigot_single.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ auto app::benchmark::run_pi_spigot_single() -> bool
5555
app_benchmark_pi_spigot_digits10 < app_benchmark_pi_spigot_object.get_output_digit_count();
5656
++app_benchmark_pi_spigot_digits10)
5757
{
58-
const std::uint8_t by_calc = app_benchmark_pi_spigot_out_.at(app_benchmark_pi_spigot_digits10);
59-
const std::uint8_t by_ctrl = app_benchmark_pi_spigot_ctrl.at(app_benchmark_pi_spigot_digits10);
58+
const std::uint8_t by_calc = app_benchmark_pi_spigot_out_.at(static_cast<std::size_t>(app_benchmark_pi_spigot_digits10));
59+
const std::uint8_t by_ctrl = app_benchmark_pi_spigot_ctrl.at(static_cast<std::size_t>(app_benchmark_pi_spigot_digits10));
6060

6161
const bool next_digit_is_ok = (by_calc == by_ctrl);
6262

ref_app/src/math/fast_math/fast_math.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////////////////////////
2-
// Copyright Christopher Kormanyos 2010 - 2024.
2+
// Copyright Christopher Kormanyos 2010 - 2025.
33
// Distributed under the Boost Software License,
44
// Version 1.0. (See accompanying file LICENSE_1_0.txt
55
// or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -144,7 +144,7 @@
144144
/ ((fast_math_float32_t) 1.0F + (alpha * (alpha + (fast_math_float32_t) 4.0F)));
145145
}
146146

147-
return fast_math_float32_t(n * (fast_math_float32_t) 0.6931471806F) + log_alpha;
147+
return fast_math_float32_t((fast_math_float32_t) n * (fast_math_float32_t) 0.6931471806F) + log_alpha;
148148
}
149149
}
150150

@@ -156,7 +156,7 @@
156156
// Perform argument reduction.
157157
const int_fast8_t n = int_fast8_t(x * (fast_math_float32_t) 1.442695041F);
158158

159-
const fast_math_float32_t alpha = x - ((fast_math_float32_t) 0.6931471806F * n);
159+
const fast_math_float32_t alpha = x - ((fast_math_float32_t) 0.6931471806F * (fast_math_float32_t) n);
160160

161161
#if 0
162162
// Use a polynomial approximation.

ref_app/src/math/filters/fir_order_n.h

Lines changed: 97 additions & 97 deletions
Large diffs are not rendered by default.

ref_app/target/build/test_app_benchmarks.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# Copyright Christopher Kormanyos 2020 - 2024.
3+
# Copyright Christopher Kormanyos 2020 - 2025.
44
# Distributed under the Boost Software License,
55
# Version 1.0. (See accompanying file LICENSE_1_0.txt
66
# or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -22,7 +22,8 @@ mkdir -p bin
2222

2323
rm -f ./bin/*.*
2424

25-
echo run benchmarks with GCC=$GCC STD=$STD
25+
echo run benchmarks with $GCC and language standard $STD
26+
echo
2627

2728
$GCC -std=$STD -Wall -Werror -O2 -m64 -I./src/mcal/host -I./src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_COMPLEX -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_complex.cpp -o ./bin/app_benchmark_complex.exe
2829
$GCC -std=$STD -Wall -Werror -O2 -m64 -I./src/mcal/host -I./src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_CRC -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_crc.cpp -o ./bin/app_benchmark_crc.exe
@@ -49,6 +50,9 @@ fi
4950
$GCC -std=$STD -Wall -O2 -m64 -I./src/mcal/host -I./src -I../../cppalliance-decimal-root/include -I../../boost-root -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_NON_STD_DECIMAL -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_non_std_decimal.cpp -o ./bin/app_benchmark_non_std_decimal.exe
5051
$GCC -std=$STD -Wall -O2 -m64 -I./src/mcal/host -I./src -I../../cppalliance-crypt-root/include -I../../boost-root -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_BOOST_CRYPT_HASHER -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_boost_crypt_hasher.cpp -o ./bin/app_benchmark_boost_crypt_hasher.exe
5152

53+
echo check existences of exe-files
54+
echo
55+
5256
./bin/app_benchmark_complex.exe
5357
result_var_complex=$?
5458

@@ -142,6 +146,9 @@ fi
142146
echo "result_var_non_std_decimal : " "$result_var_non_std_decimal"
143147
echo "result_var_boost_crypt_hasher : " "$result_var_boost_crypt_hasher"
144148

149+
echo verify result_total
150+
echo
151+
145152
if [[ "$GCC" == "g++" ]]; then
146153
result_total=$((result_var_complex+result_var_crc+result_var_fast_math+result_var_filter+result_var_fixed_point+result_var_float+result_var_hash+result_var_none+result_var_pi_agm+result_var_pi_spigot+result_var_pi_spigot_single+$result_var_soft_double_h2f1+result_var_trapezoid_integral+result_var_wide_decimal+result_var_wide_integer+result_var_boost_math_cbrt_tgamma+result_var_boost_math_cyl_bessel_j+result_var_boost_multiprecision_cbrt+result_var_hash_sha256+result_var_ecc_generic_ecc+result_var_non_std_decimal+result_ls_boost_crypt_hasher))
147154
else

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy