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
35 changes: 33 additions & 2 deletions .github/workflows/real-time-cpp-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ jobs:
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 'Query rl78-unknown-elf-g++ version'
echo
rl78-unknown-elf-g++ -v
echo
echo 'Build avr benchmarks'
echo 'Build rl78-unknown-elf-g++ benchmarks'
echo
./target/build/test_app_benchmarks_rl78.sh ${{ matrix.standard }}
working-directory: ./ref_app/
Expand Down Expand Up @@ -198,6 +198,37 @@ jobs:
- name: benchmark_builds-stm32f446
run: ./target/build/test_app_benchmarks_stm32f446.sh ${{ matrix.standard }}
working-directory: ./ref_app/
benchmark_builds-v850:
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-v850-unknown-elf/releases/download/v14.2.0/gcc-14.2.0-v850-unknown-elf.tar.gz
tar -xzf gcc-14.2.0-v850-unknown-elf.tar.gz -C ${{ runner.workspace }}
- name: benchmark_builds-v850
run: |
echo
echo 'Add v850-unknown-elf-g++ path'
echo
PATH="${{ runner.workspace }}/gcc-14.2.0-v850-unknown-elf/bin:$PATH"
echo 'Query v850-unknown-elf-g++ version'
echo
v850-unknown-elf-g++ -v
echo
echo 'Build v850-unknown-elf-g++ benchmarks'
echo
./target/build/test_app_benchmarks_v850.sh ${{ matrix.standard }}
working-directory: ./ref_app/
benchmark_single-stm32f446:
runs-on: ubuntu-latest
defaults:
Expand Down
10 changes: 10 additions & 0 deletions ref_app/src/app/benchmark/app_benchmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
#ifndef APP_BENCHMARK_2018_10_02_H
#define APP_BENCHMARK_2018_10_02_H

#if defined(ATTRIBUTE)
#undef ATTRIBUTE
#endif

#if defined(_MSC_VER)
#define ATTRIBUTE(a)
#else
#define ATTRIBUTE(a) __attribute__((a))
#endif

#define APP_BENCHMARK_TYPE_NONE 0
#define APP_BENCHMARK_TYPE_COMPLEX 1
#define APP_BENCHMARK_TYPE_CRC 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ extern "C"
}
}

auto main() -> int;
ATTRIBUTE(used) auto main() -> int;

auto main() -> int
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ auto app::benchmark::run_boost_math_cbrt_tgamma() -> bool
}

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

auto main() -> int
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ auto app::benchmark::run_boost_math_cbrt_cyl_bessel_j() -> bool
}

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

auto main() -> int
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ auto app::benchmark::run_boost_multiprecision_cbrt() -> bool
}

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

auto main() -> int
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ extern "C"
}
}

auto main() -> int;
ATTRIBUTE(used) auto main() -> int;

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_complex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ auto app::benchmark::run_complex() -> bool
}

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

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_crc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ extern "C"
}
}

auto main() -> int;
ATTRIBUTE(used) auto main() -> int;

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_detail.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{
const numeric_type ratio { a / b };

const numeric_type closeness { fabs(numeric_type { 1 - ratio }) };
const numeric_type closeness { fabs(static_cast<numeric_type>(1 - ratio )) };

result_is_ok = (closeness < tol);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ auto my_hardware_random_device_generator() -> unsigned int
}

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

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_fast_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ auto app::benchmark::run_fast_math() -> bool
}

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

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ auto app::benchmark::run_filter() -> bool
}

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

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_fixed_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ auto app::benchmark::run_fixed_point() -> bool
}

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

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ bool app::benchmark::run_float()
}

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

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ auto app::benchmark::run_hash() -> bool
}

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

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_hash_sha256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ auto app::benchmark::run_hash_sha256() -> bool
}

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

auto main() -> int
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ 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;
ATTRIBUTE(used) auto main() -> int;

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_none.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ auto app::benchmark::run_none() -> bool
}

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

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_pi_agm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ auto app::benchmark::run_pi_agm() -> bool
}

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

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_pi_spigot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ auto app::benchmark::run_pi_spigot() -> bool
}

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

auto main() -> int
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ auto app::benchmark::run_pi_spigot_single() -> bool
}

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

auto main() -> int
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ auto app::benchmark::run_soft_double_h2f1() -> bool
}

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

auto main() -> int
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ auto app::benchmark::run_trapezoid_integral() -> bool
}

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

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_wide_decimal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ auto app::benchmark::run_wide_decimal() -> bool
}

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

auto main() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/app/benchmark/app_benchmark_wide_integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ auto app::benchmark::run_wide_integer() -> bool
}

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

auto main() -> int
{
Expand Down
6 changes: 3 additions & 3 deletions ref_app/src/mcal/host/mcal_irq.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2007 - 2023.
// Copyright Christopher Kormanyos 2007 - 2025.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand All @@ -16,8 +16,8 @@

auto init(const config_type*) -> void;

inline auto enable_all () -> void { }
inline auto disable_all() -> void { }
inline auto enable_all () noexcept -> void { }
inline auto disable_all() noexcept -> void { }
} // namespace irq
} // namespace mcal

Expand Down
1 change: 1 addition & 0 deletions ref_app/target.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,7 @@
<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\build\test_app_benchmarks_v850.sh" />
<None Include="target\micros\am335x\make\am335x.ld" />
<None Include="target\micros\am335x\make\am335x_files.gmk" />
<None Include="target\micros\am335x\make\am335x_flags.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 @@ -687,6 +687,9 @@
<None Include="target\build\test_app_benchmarks_rl78.sh">
<Filter>build</Filter>
</None>
<None Include="target\build\test_app_benchmarks_v850.sh">
<Filter>build</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Target\Micros\AVR\Startup\int_vect.cpp">
Expand Down
Loading