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
15 changes: 12 additions & 3 deletions .github/workflows/real-time-cpp-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,20 @@ jobs:
fetch-depth: '0'
- name: update-tools
run: |
wget --no-check-certificate https://github.com/ckormanyos/avr-gcc-build/releases/download/v14.2.0/gcc-14.2.0-avr.tar.gz
tar -xzf gcc-14.2.0-avr.tar.gz -C ${{ runner.workspace }}
wget --no-check-certificate https://github.com/ckormanyos/avr-gcc-build/releases/download/v15.1.0/gcc-15.1.0-avr.tar.gz
tar -xzf gcc-15.1.0-avr.tar.gz -C ${{ runner.workspace }}
- name: benchmark_builds-avr
run: |
PATH="${{ runner.workspace }}/gcc-14.2.0-avr/bin:$PATH"
echo
echo 'Add avr-g++ path'
echo
PATH="${{ runner.workspace }}/gcc-15.1.0-avr/bin:$PATH"
echo 'Query avr-g++ version'
echo
avr-g++ -v
echo
echo 'Build avr benchmarks'
echo
./target/build/test_app_benchmarks_avr.sh ${{ matrix.standard }}
working-directory: ./ref_app/
benchmark_builds-stm32f446:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ extern "C"
}
}

int main()
auto main() -> int
{
auto result_is_ok = true;

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)
int main()
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,7 +129,7 @@ auto app::benchmark::run_boost_math_cbrt_cyl_bessel_j() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
int main()
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,7 +90,7 @@ auto app::benchmark::run_boost_multiprecision_cbrt() -> bool
}

#if defined(APP_BENCHMARK_STANDALONE_MAIN)
int main()
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,7 +135,7 @@ extern "C"
}
}

int main()
auto main() -> int
{
auto result_is_ok = true;

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)
int main()
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: 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"
}
}

int main()
auto main() -> int
{
auto result_is_ok = true;

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)
int main()
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: 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)
int main()
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: 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)
int main()
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: 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)
int main()
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: 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)
int main()
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: 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)
int main()
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: 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)
int main()
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
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)
int main()
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: 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)
int main()
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: 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)
int main()
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: 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)
int main()
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
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)
int main()
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
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)
int main()
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
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)
int main()
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: 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)
int main()
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
3 changes: 2 additions & 1 deletion ref_app/target/micros/am335x/startup/crt0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ namespace crt
void init_ctors();
}

extern "C" int main ();
asm(".extern main");

extern "C" void __initial_stack_pointer();
extern "C" void __my_startup () __attribute__((section(".startup"), used, noinline));

Expand Down
2 changes: 1 addition & 1 deletion ref_app/target/micros/atmega2560/make/atmega2560_flags.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
GCC_TARGET = avr
GCC_PREFIX = avr

GCC_VERSION = 14.2.0
GCC_VERSION = 15.1.0

TGT_SUFFIX = elf

Expand Down
2 changes: 1 addition & 1 deletion ref_app/target/micros/atmega4809/make/atmega4809_flags.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
GCC_TARGET = avr
GCC_PREFIX = avr

GCC_VERSION = 14.2.0
GCC_VERSION = 15.1.0

TGT_SUFFIX = elf

Expand Down
2 changes: 1 addition & 1 deletion ref_app/target/micros/avr/make/avr_flags.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
GCC_TARGET = avr
GCC_PREFIX = avr

GCC_VERSION = 14.2.0
GCC_VERSION = 15.1.0

TGT_SUFFIX = elf

Expand Down
2 changes: 0 additions & 2 deletions ref_app/target/micros/rpi_pico2_rp2350/startup/crt0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ namespace crt
auto init_ctors() -> void;
}

extern "C" auto main() -> int __attribute__((used));

extern "C" auto __my_startup() -> void __attribute__((section(".startup"), used, noinline));
extern "C" auto __main () -> void __attribute__((section(".startup"), used, noinline));
extern "C" auto __main_core0() -> void __attribute__((section(".startup"), used, noinline));
Expand Down
2 changes: 0 additions & 2 deletions ref_app/target/micros/xtensa_esp32_s3/startup/crt0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ extern "C"
{
asm(".extern main");

extern auto main() -> int;

auto __my_startup() -> void __attribute__((used, noinline));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include <array>

extern "C" auto main() -> int;
auto main() -> int;

namespace
{
Expand Down Expand Up @@ -63,7 +63,7 @@ namespace
);
}

extern "C" auto main() -> int
auto main() -> int
{
mcal::gpt::init(nullptr);

Expand Down