Skip to content

Commit

Permalink
Merge pull request #157 from rsetienne/develop
Browse files Browse the repository at this point in the history
v4.3.4
  • Loading branch information
rsetienne authored Mar 16, 2023
2 parents a19c458 + 13a4fe8 commit 22d2737
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 10 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Package: DAISIE
Type: Package
Title: Dynamical Assembly of Islands by Speciation, Immigration and Extinction
Version: 4.3.3
Date: 2023-03-10
Depends: R (>= 4.1.0)
Version: 4.3.4
Date: 2023-03-16
Depends: R (>= 4.2.0)
biocViews:
Imports:
deSolve,
Expand Down Expand Up @@ -111,6 +111,7 @@ Description: Simulates and computes the (maximum) likelihood of a dynamical
extinction. See e.g. Valente et al. 2015. Ecology Letters 18: 844-852,
<DOI:10.1111/ele.12461>.
NeedsCompilation: yes
SystemRequirements: C++17
Encoding: UTF-8
VignetteBuilder: knitr
URL: https://github.com/rsetienne/DAISIE
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# DAISIE 4.3.4

* Require C++17 via `CXX_STD` flag on Makevars[.win].
* Add SystemRequirements: C++17 to DESCRIPTION as for that standard
"Writing R Extensions" requires it be explicitly stated.
* Depends on R (>= 4.2.0) due to C++17 requirement on Windows due to Rtools 4.0,
which is used for R 4.0-4.1. Toolchain for Rtools 4.0 is gcc 8.3 but "GCC 9.1
was the first release with non-experimental C++17 support". as per
https://gcc.gnu.org/.

# DAISIE 4.3.3

* Address problem detected by valgrind: unitialized member variable
Expand Down
3 changes: 1 addition & 2 deletions src/DAISIE_CS.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// [[Rcpp::plugins(cpp14)]]
// [[Rcpp::depends(BH)]]


//' @export daisie_odeint_cs

#include "config.h"
Expand All @@ -16,7 +15,7 @@ namespace {
// maximal number of steps the solver is executing.
// prevents odeint from getting stuckle
// at-hoc - 'solution'.
static constexpr int default_max_cs_steps = 1'000'000;
static constexpr int default_max_cs_steps = 1000000;
static int max_cs_steps = default_max_cs_steps;

// step-size factor for adams_bashforth_moulton integration
Expand Down
3 changes: 3 additions & 0 deletions src/DAISIE_IW.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
//' @export daisie_odeint_iw

// [[Rcpp::plugins(cpp14)]]
// [[Rcpp::plugins(openmp)]]
// [[Rcpp::depends(BH)]]
// [[Rcpp::depends(RcppEigen)]]

#include "config.h"
#include "DAISIE_odeint.h"
Expand Down
5 changes: 2 additions & 3 deletions src/DAISIE_odeint.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <stdexcept>
#include <memory>


using namespace Rcpp;
using namespace boost::numeric::odeint;

Expand Down Expand Up @@ -45,7 +44,6 @@ class padded_vector_view

namespace daisie_odeint {


extern double abm_factor;


Expand Down Expand Up @@ -89,6 +87,7 @@ namespace daisie_odeint {
{
if (!J_) {
// once-only, generic evaluation

J_ = std::make_unique<matrix_t<double>>(J.size1(), J.size2());
auto single = vector_t<double>(x.size(), 0);
auto dxdt = vector_t<double>(x.size());
Expand All @@ -106,7 +105,7 @@ namespace daisie_odeint {

RHS& rhs_;
std::unique_ptr<matrix_t<double>> J_;
};
};

}

Expand Down
2 changes: 1 addition & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CXX_STD = CXX14
CXX_STD = CXX17
PKG_CPPFLAGS = -D_HAS_AUTO_PTR_ETC=0
2 changes: 1 addition & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CXX_STD = CXX14
CXX_STD = CXX17
PKG_CPPFLAGS = -D_HAS_AUTO_PTR_ETC=0

0 comments on commit 22d2737

Please sign in to comment.