From e51100b24362210067a5d38bfc1707ebc1628e1c Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 2 Mar 2020 13:58:26 +0100 Subject: [PATCH] Release 0.6 (also for Windows). --- Directory.Build.props | 3 +++ Makefile.am | 9 +++++---- build.config | 14 -------------- lol | 2 +- src/expression.h | 4 ++-- src/lolremez.vcxproj | 2 +- src/matrix.h | 2 +- src/solver.cpp | 10 ++-------- src/solver.h | 4 +++- 9 files changed, 18 insertions(+), 32 deletions(-) delete mode 100644 build.config diff --git a/Directory.Build.props b/Directory.Build.props index 8577d01..fa5119e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,6 +6,9 @@ v141 + + 8.1 + Level3 diff --git a/Makefile.am b/Makefile.am index f011da4..a54c8e4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,10 @@ -EXTRA_DIST = $(lol_headers) bootstrap README.md \ - .travis.yml lolremez.sln build.config \ - .gitignore .gitattributes .gitmodules +lol_files := $(filter %.h %.ipp %.hpp, $(shell find $(srcdir)/lol/include -type f)) +git_files = .gitignore .gitattributes .gitmodules +vs_files = lolremez.sln Directory.Build.props -lol_headers := $(filter %.h %.ipp %.hpp, $(shell find $(srcdir)/lol/include -type f)) +EXTRA_DIST = bootstrap README.md .travis.yml \ + $(lol_files) $(git_files) $(vs_files) SUBDIRS = src diff --git a/build.config b/build.config deleted file mode 100644 index ecdb370..0000000 --- a/build.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - no - no - no - no - no - no - - - diff --git a/lol b/lol index 71d9bc1..4b81463 160000 --- a/lol +++ b/lol @@ -1 +1 @@ -Subproject commit 71d9bc1ec83979000547c5134a45d1ee8cb4b55e +Subproject commit 4b8146301538df5a7fc6f2d6906a56c7b9dc5103 diff --git a/src/expression.h b/src/expression.h index 9ff08b5..f6bcb35 100644 --- a/src/expression.h +++ b/src/expression.h @@ -469,7 +469,7 @@ struct expression::action } } - that->m_ops.push_back(std::make_tuple(id::constant, that->m_constants.size())); + that->m_ops.push_back(std::make_tuple(id::constant, (int)that->m_constants.size())); that->m_constants.push_back(val); that->m_ops.push_back(std::make_tuple(id::pow, -1)); } @@ -487,7 +487,7 @@ struct expression::action that->m_ops.push_back(std::make_tuple(id::y, -1)); else { - that->m_ops.push_back(std::make_tuple(id::constant, that->m_constants.size())); + that->m_ops.push_back(std::make_tuple(id::constant, (int)that->m_constants.size())); if (in.string() == "e") that->m_constants.push_back(lol::real::R_E()); else if (in.string() == "pi" || in.string() == "π") diff --git a/src/lolremez.vcxproj b/src/lolremez.vcxproj index 937e7ae..e3e8459 100644 --- a/src/lolremez.vcxproj +++ b/src/lolremez.vcxproj @@ -37,7 +37,7 @@ - PACKAGE_VERSION="0.4";%(PreprocessorDefinitions) + PACKAGE_VERSION="0.6";%(PreprocessorDefinitions) diff --git a/src/matrix.h b/src/matrix.h index da30f97..3d9771d 100644 --- a/src/matrix.h +++ b/src/matrix.h @@ -61,7 +61,7 @@ class array2d template struct linear_system : public array2d { - inline linear_system(int n) + inline linear_system(size_t n) { assert(n > 0); this->resize(n, n); diff --git a/src/solver.cpp b/src/solver.cpp index 4fae242..38d2df0 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -218,10 +218,7 @@ void remez_solver::remez_step() error += system[m_order + 1][i] * fxn[i]; if (show_stats) - { - using std::printf; - printf(" -:- timing for inversion: %f ms\n", t.get() * 1000.f); - } + std::cout << " -:- timing for inversion: " << (t.get() * 1000.f) << " ms\n"; } /* @@ -272,10 +269,7 @@ void remez_solver::find_zeros() } if (show_stats) - { - using std::printf; - printf(" -:- timing for zeros: %f ms\n", t.get() * 1000.f); - } + std::cout << " -:- timing for zeros: " << (t.get() * 1000.f) << " ms\n"; } diff --git a/src/solver.h b/src/solver.h index a1b6795..822eb02 100644 --- a/src/solver.h +++ b/src/solver.h @@ -19,8 +19,10 @@ #include #include +#include -#include +#include +#include #include "expression.h"