Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 54 additions & 23 deletions .github/workflows/real-time-cpp-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,60 @@ jobs:
echo
./target/build/test_app_benchmarks_avr.sh ${{ matrix.standard }}
working-directory: ./ref_app/
benchmark_builds-riscv:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
standard: [ c++20 ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: update-tools
run: |
wget --no-check-certificate https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v14.2.0-3/xpack-riscv-none-elf-gcc-14.2.0-3-linux-x64.tar.gz
tar -xzf xpack-riscv-none-elf-gcc-14.2.0-3-linux-x64.tar.gz -C ${{ runner.workspace }}
working-directory: ./
- name: benchmark_builds-riscv
run: |
PATH="${{ runner.workspace }}/xpack-riscv-none-elf-gcc-14.2.0-3/bin:$PATH"
./target/build/test_app_benchmarks_riscv.sh ${{ matrix.standard }}
working-directory: ./ref_app/
benchmark_builds-rl78:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
standard: [ c++23 ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: update-tools
run: |
wget --no-check-certificate https://github.com/ckormanyos/gcc-rl78-unknown-elf/releases/download/v15.1.0/gcc-15.1.0-rl78-unknown-elf.tar.gz
tar -xzf gcc-15.1.0-rl78-unknown-elf.tar.gz -C ${{ runner.workspace }}
- name: benchmark_builds-rl78
run: |
echo
echo 'Add rl78-unknown-elf-g++ path'
echo
PATH="${{ runner.workspace }}/gcc-15.1.0-rl78-unknown-elf/bin:$PATH"
echo 'Query avr-g++ version'
echo
rl78-unknown-elf-g++ -v
echo
echo 'Build avr benchmarks'
echo
./target/build/test_app_benchmarks_rl78.sh ${{ matrix.standard }}
working-directory: ./ref_app/
benchmark_builds-stm32f446:
runs-on: ubuntu-latest
defaults:
Expand Down Expand Up @@ -144,29 +198,6 @@ jobs:
- name: benchmark_builds-stm32f446
run: ./target/build/test_app_benchmarks_stm32f446.sh ${{ matrix.standard }}
working-directory: ./ref_app/
benchmark_builds-riscv:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
standard: [ c++20 ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: update-tools
run: |
wget --no-check-certificate https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v14.2.0-3/xpack-riscv-none-elf-gcc-14.2.0-3-linux-x64.tar.gz
tar -xzf xpack-riscv-none-elf-gcc-14.2.0-3-linux-x64.tar.gz -C ${{ runner.workspace }}
working-directory: ./
- name: benchmark_builds-riscv
run: |
PATH="${{ runner.workspace }}/xpack-riscv-none-elf-gcc-14.2.0-3/bin:$PATH"
./target/build/test_app_benchmarks_riscv.sh ${{ matrix.standard }}
working-directory: ./ref_app/
benchmark_single-stm32f446:
runs-on: ubuntu-latest
defaults:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ extern "C"
}
}

auto main() -> int;

auto main() -> int
{
auto result_is_ok = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ auto app::benchmark::run_boost_math_cbrt_tgamma() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_BOOST_MATH_CBRT_TGAMMA -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_boost_math_cbrt_tgamma.cpp -o ./ref_app/bin/app_benchmark_boost_math_cbrt_tgamma.exe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ auto app::benchmark::run_boost_math_cbrt_cyl_bessel_j() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_BOOST_MATH_CYL_BESSEL_J -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_boost_math_cyl_bessel_j.cpp -o ./ref_app/bin/app_benchmark_boost_math_cyl_bessel_j.exe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ auto app::benchmark::run_boost_multiprecision_cbrt() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_BOOST_MULTIPRECISION_CBRT -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_boost_math_cbrt_tgamma.cpp -o ./ref_app/bin/app_benchmark_boost_multiprecision_cbrt.exe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ extern "C"
}
}

auto main() -> int;

auto main() -> int
{
auto result_is_ok = true;
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_complex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ auto app::benchmark::run_complex() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_COMPLEX -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_complex.cpp -o ./ref_app/bin/app_benchmark_complex.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_crc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ extern "C"
}
}

auto main() -> int;

auto main() -> int
{
auto result_is_ok = true;
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_ecc_generic_ecc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ auto my_hardware_random_device_generator() -> unsigned int
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_ECC_GENERIC_ECC -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_hash.cpp -o ./ref_app/bin/app_benchmark_hash.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_fast_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ auto app::benchmark::run_fast_math() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_FAST_MATH -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_fast_math.cpp -o ./ref_app/bin/app_benchmark_fast_math.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ auto app::benchmark::run_filter() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_FILTER -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_filter.cpp -o ./ref_app/bin/app_benchmark_filter.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_fixed_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ auto app::benchmark::run_fixed_point() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_FIXED_POINT -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_fixed_point.cpp -o ./ref_app/bin/app_benchmark_fixed_point.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ bool app::benchmark::run_float()
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_FLOAT -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_float.cpp -o ./ref_app/bin/app_benchmark_float.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ auto app::benchmark::run_hash() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_HASH -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_hash.cpp -o ./ref_app/bin/app_benchmark_hash.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_hash_sha256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ auto app::benchmark::run_hash_sha256() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_HASH_SHA256 -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_hash.cpp -o ./ref_app/bin/app_benchmark_hash.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_non_std_decimal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ arithmetic_float_type xarg = static_cast<arithmetic_float_type>(1234) / 1000;
arithmetic_float_type ctrl = static_cast<arithmetic_float_type>(UINT64_C(343494186080075997)) / UINT64_C(100000000000000000);

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_NON_STD_DECIMAL -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_float.cpp -o ./ref_app/bin/app_benchmark_float.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_none.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ auto app::benchmark::run_none() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_NONE -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_none.cpp -o ./ref_app/bin/app_benchmark_none.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_pi_agm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ auto app::benchmark::run_pi_agm() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_PI_AGM -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_pi_agm.cpp -o ./ref_app/bin/app_benchmark_pi_agm.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_pi_spigot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ auto app::benchmark::run_pi_spigot() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_PI_SPIGOT -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_pi_spigot.cpp -o ./ref_app/bin/app_benchmark_pi_spigot.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_pi_spigot_single.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ auto app::benchmark::run_pi_spigot_single() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_PI_SPIGOT_SINGLE -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_pi_spigot_single.cpp -o ./ref_app/bin/app_benchmark_pi_spigot_single.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_soft_double_h2f1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ auto app::benchmark::run_soft_double_h2f1() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_CRC -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_crc.cpp -o ./ref_app/bin/app_benchmark_crc.exe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ auto app::benchmark::run_trapezoid_integral() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
bool result_is_ok { true };
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_wide_decimal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ auto app::benchmark::run_wide_decimal() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_WIDE_DECIMAL -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_wide_decimal.cpp -o ./ref_app/bin/app_benchmark_wide_decimal.exe
Expand Down
2 changes: 2 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark_wide_integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ auto app::benchmark::run_wide_integer() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
auto main() -> int;

auto main() -> int
{
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_WIDE_INTEGER -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_wide_integer.cpp -o ./ref_app/bin/app_benchmark_wide_integer.exe
Expand Down
1 change: 1 addition & 0 deletions ref_app/target.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,7 @@
<None Include="target\build\test_app_benchmarks_avr.sh" />
<None Include="target\build\test_app_benchmarks_emulator.gdb" />
<None Include="target\build\test_app_benchmarks_riscv.sh" />
<None Include="target\build\test_app_benchmarks_rl78.sh" />
<None Include="target\build\test_app_benchmarks_stm32f446.sh" />
<None Include="target\micros\am335x\make\am335x.ld" />
<None Include="target\micros\am335x\make\am335x_files.gmk" />
Expand Down
3 changes: 3 additions & 0 deletions ref_app/target.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,9 @@
<None Include="target\micros\xtensa_esp32_s3_riscv_cop\startup\IntVectTable.S">
<Filter>micros\xtensa_esp32_s3_riscv_cop\startup</Filter>
</None>
<None Include="target\build\test_app_benchmarks_rl78.sh">
<Filter>build</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Target\Micros\AVR\Startup\int_vect.cpp">
Expand Down
Loading