Loading CMakeLists.txt +5 −2 Original line number Diff line number Diff line Loading @@ -3,12 +3,15 @@ # cmake_minimum_required (VERSION 3.1) project (cppduals VERSION 0.5.1 VERSION 0.5.2 LANGUAGES C CXX ) include (GNUInstallDirs) set (CMAKE_CXX_STANDARD 11 CACHE STRING "Which C++ standard to test against.") if (NOT CMAKE_CXX_STANDARD) set (CMAKE_CXX_STANDARD 14 CACHE STRING "Which C++ standard to test against.") endif() message (STATUS "CXX_STANDARD: ${CMAKE_CXX_STANDARD}") set (CMAKE_CXX_STANDARD_REQUIRED ON) set (CMAKE_DISABLE_IN_SOURCE_BUILD ON) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) Loading README.md +11 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,17 @@ thus licensed under [MPL-2](http://www.mozilla.org/MPL/2.0/FAQ.html) . ChangeLog ========= v0.5.2 ====== - change optional libfmt print support to fmt 7.1.3 (from 6.x) - change default build standard to c++14. v0.5.1 ====== - packaging cleanup v0.5.0 ====== Loading duals/arch/NEON/ComplexDual.h +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ // // Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr> // Copyright (C) 2010 Konstantinos Margaritis <markos@freevec.org> // Copyright (C) 2021 Michael Tesch <tesch1@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed Loading duals/dual +21 −18 Original line number Diff line number Diff line Loading @@ -1254,12 +1254,13 @@ struct fmt::formatter<duals::dual<T>,Char> : public fmt::formatter<T,Char> { typedef fmt::formatter<T,Char> base; enum style { expr, star, pair } style_ = expr; internal::dynamic_format_specs<Char> specs_; fmt::detail::dynamic_format_specs<Char> specs_; FMT_CONSTEXPR auto parse(format_parse_context & ctx) -> decltype(ctx.begin()) { using handler_type = internal::dynamic_specs_handler<format_parse_context>; auto type = internal::type_constant<T, Char>::value; internal::specs_checker<handler_type> handler(handler_type(specs_, ctx), type); using handler_type = fmt::detail::dynamic_specs_handler<format_parse_context>; auto type = fmt::detail::type_constant<T, Char>::value; fmt::detail::specs_checker<handler_type> handler(handler_type(specs_, ctx), type); auto it = ctx.begin(); if (it != ctx.end()) switch (*it) { case '$': style_ = style::expr; ctx.advance_to(++it); break; case '*': style_ = style::star; ctx.advance_to(++it); break; Loading Loading @@ -1326,18 +1327,20 @@ struct fmt::formatter<std::complex<T>,Char> : public fmt::formatter<T,Char> { typedef fmt::formatter<T,Char> base; enum style { expr, star, pair } style_ = expr; internal::dynamic_format_specs<Char> specs_; fmt::detail::dynamic_format_specs<Char> specs_; FMT_CONSTEXPR auto parse(format_parse_context & ctx) -> decltype(ctx.begin()) { using handler_type = internal::dynamic_specs_handler<format_parse_context>; auto type = internal::type_constant<T, Char>::value; internal::specs_checker<handler_type> handler(handler_type(specs_, ctx), type); using handler_type = fmt::detail::dynamic_specs_handler<format_parse_context>; auto type = fmt::detail::type_constant<T, Char>::value; fmt::detail::specs_checker<handler_type> handler(handler_type(specs_, ctx), type); auto it = ctx.begin(); if (it != ctx.end()) { switch (*it) { case '$': style_ = style::expr; ctx.advance_to(++it); break; case '*': style_ = style::star; ctx.advance_to(++it); break; case ',': style_ = style::pair; ctx.advance_to(++it); break; default: break; } } parse_format_specs(ctx.begin(), ctx.end(), handler); //todo: fixup alignment return base::parse(ctx); Loading tests/test_eigen.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -448,11 +448,12 @@ TEST(measure, norm) { b = 3; Rt d(1); MatrixD x; x << d; x.array() = d; MatrixD a = (MatrixD() << 1,2,3, 4,5+5_ef,6, 7,8,9).finished(); //typename MatrixD::Index index; EXPECT_EQ(a.sum(), 45 + 5_ef); EXPECT_EQ(x.sum(), 9); EXPECT_NEAR(rpart(a.norm()), 16.8819430161341337282, 1e-5); EXPECT_NEAR(rpart(a.mean()), 5, 1e-5); EXPECT_NEAR(dpart(a.mean()), 0.555555555555555, 1e-5); Loading Loading
CMakeLists.txt +5 −2 Original line number Diff line number Diff line Loading @@ -3,12 +3,15 @@ # cmake_minimum_required (VERSION 3.1) project (cppduals VERSION 0.5.1 VERSION 0.5.2 LANGUAGES C CXX ) include (GNUInstallDirs) set (CMAKE_CXX_STANDARD 11 CACHE STRING "Which C++ standard to test against.") if (NOT CMAKE_CXX_STANDARD) set (CMAKE_CXX_STANDARD 14 CACHE STRING "Which C++ standard to test against.") endif() message (STATUS "CXX_STANDARD: ${CMAKE_CXX_STANDARD}") set (CMAKE_CXX_STANDARD_REQUIRED ON) set (CMAKE_DISABLE_IN_SOURCE_BUILD ON) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) Loading
README.md +11 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,17 @@ thus licensed under [MPL-2](http://www.mozilla.org/MPL/2.0/FAQ.html) . ChangeLog ========= v0.5.2 ====== - change optional libfmt print support to fmt 7.1.3 (from 6.x) - change default build standard to c++14. v0.5.1 ====== - packaging cleanup v0.5.0 ====== Loading
duals/arch/NEON/ComplexDual.h +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ // // Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr> // Copyright (C) 2010 Konstantinos Margaritis <markos@freevec.org> // Copyright (C) 2021 Michael Tesch <tesch1@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed Loading
duals/dual +21 −18 Original line number Diff line number Diff line Loading @@ -1254,12 +1254,13 @@ struct fmt::formatter<duals::dual<T>,Char> : public fmt::formatter<T,Char> { typedef fmt::formatter<T,Char> base; enum style { expr, star, pair } style_ = expr; internal::dynamic_format_specs<Char> specs_; fmt::detail::dynamic_format_specs<Char> specs_; FMT_CONSTEXPR auto parse(format_parse_context & ctx) -> decltype(ctx.begin()) { using handler_type = internal::dynamic_specs_handler<format_parse_context>; auto type = internal::type_constant<T, Char>::value; internal::specs_checker<handler_type> handler(handler_type(specs_, ctx), type); using handler_type = fmt::detail::dynamic_specs_handler<format_parse_context>; auto type = fmt::detail::type_constant<T, Char>::value; fmt::detail::specs_checker<handler_type> handler(handler_type(specs_, ctx), type); auto it = ctx.begin(); if (it != ctx.end()) switch (*it) { case '$': style_ = style::expr; ctx.advance_to(++it); break; case '*': style_ = style::star; ctx.advance_to(++it); break; Loading Loading @@ -1326,18 +1327,20 @@ struct fmt::formatter<std::complex<T>,Char> : public fmt::formatter<T,Char> { typedef fmt::formatter<T,Char> base; enum style { expr, star, pair } style_ = expr; internal::dynamic_format_specs<Char> specs_; fmt::detail::dynamic_format_specs<Char> specs_; FMT_CONSTEXPR auto parse(format_parse_context & ctx) -> decltype(ctx.begin()) { using handler_type = internal::dynamic_specs_handler<format_parse_context>; auto type = internal::type_constant<T, Char>::value; internal::specs_checker<handler_type> handler(handler_type(specs_, ctx), type); using handler_type = fmt::detail::dynamic_specs_handler<format_parse_context>; auto type = fmt::detail::type_constant<T, Char>::value; fmt::detail::specs_checker<handler_type> handler(handler_type(specs_, ctx), type); auto it = ctx.begin(); if (it != ctx.end()) { switch (*it) { case '$': style_ = style::expr; ctx.advance_to(++it); break; case '*': style_ = style::star; ctx.advance_to(++it); break; case ',': style_ = style::pair; ctx.advance_to(++it); break; default: break; } } parse_format_specs(ctx.begin(), ctx.end(), handler); //todo: fixup alignment return base::parse(ctx); Loading
tests/test_eigen.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -448,11 +448,12 @@ TEST(measure, norm) { b = 3; Rt d(1); MatrixD x; x << d; x.array() = d; MatrixD a = (MatrixD() << 1,2,3, 4,5+5_ef,6, 7,8,9).finished(); //typename MatrixD::Index index; EXPECT_EQ(a.sum(), 45 + 5_ef); EXPECT_EQ(x.sum(), 9); EXPECT_NEAR(rpart(a.norm()), 16.8819430161341337282, 1e-5); EXPECT_NEAR(rpart(a.mean()), 5, 1e-5); EXPECT_NEAR(dpart(a.mean()), 0.555555555555555, 1e-5); Loading