Skip to content

Commit

Permalink
Merge pull request #585 from ckormanyos/chapter16_08
Browse files Browse the repository at this point in the history
Fix #584 via repair and upgrade example chapter16 08
  • Loading branch information
ckormanyos authored Dec 12, 2024
2 parents 8cc0ce3 + f9f2008 commit 04a3d44
Show file tree
Hide file tree
Showing 21 changed files with 641 additions and 455 deletions.
4 changes: 2 additions & 2 deletions examples/chapter04_04/target/micros/avr/make/avr_flags.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# ------------------------------------------------------------------------------

ifneq ($(MAKE),make)
GCC_VERSION = 13.2.0
GCC_VERSION = 14.2.0
endif
GCC_TARGET = avr
GCC_PREFIX = avr
Expand All @@ -24,7 +24,7 @@ TGT_ALLFLAGS = -O2
-finline-limit=32 \
-fsigned-char

ifeq ($(GCC_VERSION),13.2.0)
ifeq ($(GCC_VERSION),14.2.0)
TGT_ALLFLAGS := $(TGT_ALLFLAGS) \
-mdouble=32 \
-mlong-double=64
Expand Down
34 changes: 31 additions & 3 deletions examples/chapter16_08/chapter16_08.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>$(SolutionDir)\src;$(SolutionDir)\src\mcal\win32;C:\boost\boost_1_85_0;$(IncludePath)</IncludePath>
<IncludePath>$(SolutionDir)\src;$(SolutionDir)\src\mcal\win32;C:\boost\boost_1_86_0;$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(SolutionDir)\src;$(SolutionDir)\src\mcal\win32;C:\boost\boost_1_85_0;$(IncludePath)</IncludePath>
<IncludePath>$(SolutionDir)\src;$(SolutionDir)\src\mcal\win32;C:\boost\boost_1_86_0;$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
</PropertyGroup>
Expand Down Expand Up @@ -246,15 +246,27 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\util\STL\impl\avr\avr_hardware_random_device.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\util\STL\impl\cmath_impl_gamma.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\util\STL\impl\cmath_impl_hyperbolic.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\math\test\math_test_independent_test_system_base.h" />
<ClInclude Include="src\math\test\math_test_independent_test_system_boost.h" />
<ClInclude Include="src\math\test\math_test_independent_test_system_mathlink.h" />
<ClInclude Include="src\math\test\math_test_independent_test_system_none.h" />
<ClInclude Include="src\math\wide_integer\miller_rabin\miller_rabin_digits.h" />
<ClInclude Include="src\math\wide_integer\uintwide_t.h" />
<ClInclude Include="src\math\wide_integer\miller_rabin\miller_rabin_base.h" />
<ClInclude Include="src\math\wide_integer\miller_rabin\miller_rabin_single.h" />
<ClInclude Include="src\math\wide_integer\miller_rabin\miller_rabin_state.h" />
<ClInclude Include="src\mcal\avr\mcal_benchmark.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
Expand Down Expand Up @@ -492,6 +504,14 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="src\util\STL\cinttypes">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="src\util\STL\ciso646">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="src\util\STL\climits">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
Expand Down Expand Up @@ -568,6 +588,10 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="src\util\STL\stdfloat">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="src\util\STL\string">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
Expand All @@ -588,6 +612,10 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="src\util\STL\version">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="src\util\STL_C++XX_stdfloat\cstdfloat" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
135 changes: 78 additions & 57 deletions examples/chapter16_08/chapter16_08.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,17 @@
<ClCompile Include="src\mcal\win32\mcal_math_independent_test_system.cpp">
<Filter>src\mcal\win32</Filter>
</ClCompile>
<ClCompile Include="src\util\STL\impl\avr\avr_hardware_random_device.cpp">
<Filter>src\util\STL\impl\avr</Filter>
</ClCompile>
<ClCompile Include="src\util\STL\impl\cmath_impl_gamma.cpp">
<Filter>src\util\STL\impl</Filter>
</ClCompile>
<ClCompile Include="src\util\STL\impl\cmath_impl_hyperbolic.cpp">
<Filter>src\util\STL\impl</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\util\STL\impl\avr\avr_atomic.h">
<Filter>src\util\STL\impl\avr</Filter>
</ClInclude>
<ClInclude Include="src\os\os.h">
<Filter>src\os</Filter>
</ClInclude>
Expand All @@ -212,18 +218,6 @@
<ClInclude Include="src\os\os_task_control_block.h">
<Filter>src\os</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\impl\stl_local_constexpr.h">
<Filter>src\util\STL\impl</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\impl\stl_local_noexcept.h">
<Filter>src\util\STL\impl</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\impl\allocator_impl.h">
<Filter>src\util\STL\impl</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\time.h">
<Filter>src\util\STL</Filter>
</ClInclude>
<ClInclude Include="src\util\STL_C++XX_stdfloat\stdfloat.h">
<Filter>src\util\STL_C++XX_stdfloat</Filter>
</ClInclude>
Expand Down Expand Up @@ -464,9 +458,6 @@
<ClInclude Include="src\math\wide_integer\miller_rabin\miller_rabin_base.h">
<Filter>src\math\wide_integer\miller_rabin</Filter>
</ClInclude>
<ClInclude Include="src\math\wide_integer\miller_rabin\miller_rabin_single.h">
<Filter>src\math\wide_integer\miller_rabin</Filter>
</ClInclude>
<ClInclude Include="src\math\wide_integer\miller_rabin\miller_rabin_state.h">
<Filter>src\math\wide_integer\miller_rabin</Filter>
</ClInclude>
Expand Down Expand Up @@ -521,126 +512,156 @@
<ClInclude Include="src\mcal_led\mcal_led_boolean_state_base.h">
<Filter>src\mcal_led</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\impl\alloc_traits.h">
<ClInclude Include="src\math\test\math_test_independent_test_system_mathlink.h">
<Filter>src\math\test</Filter>
</ClInclude>
<ClInclude Include="src\math\wide_integer\miller_rabin\miller_rabin_digits.h">
<Filter>src\math\wide_integer\miller_rabin</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\impl\avr\avr_atomic.h">
<Filter>src\util\STL\impl\avr</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\impl\allocator_impl.h">
<Filter>src\util\STL\impl</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\impl\ptr_traits.h">
<Filter>src\util\STL\impl</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\impl\stl_local_constexpr.h">
<Filter>src\util\STL\impl</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\impl\stl_local_noexcept.h">
<Filter>src\util\STL\impl</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\impl\xcmath_impl.h">
<Filter>src\util\STL\impl</Filter>
</ClInclude>
<ClInclude Include="src\math\test\math_test_independent_test_system_mathlink.h">
<Filter>src\math\test</Filter>
<ClInclude Include="src\util\STL\impl\alloc_traits.h">
<Filter>src\util\STL\impl</Filter>
</ClInclude>
<ClInclude Include="src\util\STL\time.h">
<Filter>src\util\STL</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="src\util\STL\algorithm">
<None Include="src\util\STL_C++XX_stdfloat\cstdfloat">
<Filter>src\util\STL_C++XX_stdfloat</Filter>
</None>
<None Include="src\util\STL\initializer_list">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\array">
<None Include="src\util\STL\iterator">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\atomic">
<None Include="src\util\STL\limits">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\basic_string">
<None Include="src\util\STL\memory">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\cmath">
<None Include="src\util\STL\numeric">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\complex">
<None Include="src\util\STL\random">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\cstddef">
<None Include="src\util\STL\ratio">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\cstdint">
<None Include="src\util\STL\span">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\initializer_list">
<None Include="src\util\STL\stdexcept">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\iterator">
<None Include="src\util\STL\stdfloat">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\limits">
<None Include="src\util\STL\string">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\memory">
<None Include="src\util\STL\tuple">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\numeric">
<None Include="src\util\STL\type_traits">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\string">
<None Include="src\util\STL\utility">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\tuple">
<None Include="src\util\STL\vector">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\utility">
<None Include="src\util\STL\version">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\vector">
<None Include="src\util\STL\algorithm">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\ratio">
<None Include="src\util\STL\any">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\chrono">
<None Include="src\util\STL\array">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\ctime">
<None Include="src\util\STL\atomic">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\cfloat">
<None Include="src\util\STL\basic_string">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\climits">
<None Include="src\util\STL\bitset">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\cstdbool">
<None Include="src\util\STL\cassert">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\cstdlib">
<None Include="src\util\STL\cerrno">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\functional">
<None Include="src\util\STL\cfloat">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\type_traits">
<None Include="src\util\STL\charconv">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL_C++XX_stdfloat\cstdfloat">
<Filter>src\util\STL_C++XX_stdfloat</Filter>
<None Include="src\util\STL\chrono">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\any">
<None Include="src\util\STL\cinttypes">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\random">
<None Include="src\util\STL\ciso646">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\span">
<None Include="src\util\STL\climits">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\charconv">
<None Include="src\util\STL\cmath">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\bitset">
<None Include="src\util\STL\complex">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\cassert">
<None Include="src\util\STL\cstdbool">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\cerrno">
<None Include="src\util\STL\cstddef">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\cstdint">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\cstdlib">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\cstring">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\stdexcept">
<None Include="src\util\STL\ctime">
<Filter>src\util\STL</Filter>
</None>
<None Include="src\util\STL\functional">
<Filter>src\util\STL</Filter>
</None>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

namespace WIDE_INTEGER_NAMESPACE { namespace math { namespace test {

class independent_test_system_base : private util::noncopyable
class independent_test_system_base : private ::util::noncopyable
{
public:
virtual ~independent_test_system_base() noexcept { }
virtual ~independent_test_system_base() noexcept = default;

virtual bool is_prime(const char* const pstr_prime_candidate) const = 0;

protected:
independent_test_system_base() noexcept { }
independent_test_system_base() noexcept = default;
};

} // namespace test
Expand Down
Loading

0 comments on commit 04a3d44

Please sign in to comment.