From 359bebe3693b08d6dbe8dec6da96fe10fb1ca89a Mon Sep 17 00:00:00 2001 From: Lilith Whittles Date: Tue, 15 Oct 2024 14:48:02 +0100 Subject: [PATCH] regenerate with dust (0.15.2) and odin.dust (0.3.13) --- R/dust.R | 4 ++-- inst/dust/model-targeted-vax.cpp | 9 +++++---- scripts/generate_odin.R | 4 ++-- src/model-targeted-vax.cpp | 11 ++++++----- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/R/dust.R b/R/dust.R index 27c9fb4..8ba0e4b 100644 --- a/R/dust.R +++ b/R/dust.R @@ -1,4 +1,4 @@ -## Generated by dust (version 0.15.2) - do not edit +## Generated by dust (version 0.15.3) - do not edit model_targeted_vax <- R6::R6Class( "dust", cloneable = FALSE, @@ -292,7 +292,7 @@ model_targeted_vax <- R6::R6Class( } )) class(model_targeted_vax) <- c("dust_generator", class(model_targeted_vax)) -## Generated by odin.dust (version 0.3.11) - do not edit +## Generated by odin.dust (version 0.3.13) - do not edit model_targeted_vax$set("public", "transform_variables", function(y) { info <- self$info() set_dim <- function(x, dimx) { diff --git a/inst/dust/model-targeted-vax.cpp b/inst/dust/model-targeted-vax.cpp index 2ceed98..a2d06d3 100644 --- a/inst/dust/model-targeted-vax.cpp +++ b/inst/dust/model-targeted-vax.cpp @@ -1,4 +1,4 @@ -// Generated by odin.dust (version 0.3.11) - do not edit +// Generated by odin.dust (version 0.3.13) - do not edit template __host__ __device__ real_type odin_sum1(const container x, size_t from, size_t to); template @@ -924,7 +924,8 @@ void user_check_array_rank(cpp11::sexp x, const char *name) { } else if (N == 2) { cpp11::stop("Expected a matrix for '%s'", name); } else { - cpp11::stop("Expected an array of rank %d for '%s'", N, name); + cpp11::stop("Expected an array of rank %d for '%s'", + static_cast(N), name); } } } @@ -935,8 +936,8 @@ void user_check_array_dim(cpp11::sexp x, const char *name, cpp11::integers dim = cpp11::as_cpp(x.attr("dim")); for (size_t i = 0; i < N; ++i) { if (dim[(int)i] != dim_expected[i]) { - Rf_error("Incorrect size of dimension %zu of '%s' (expected %d)", - i + 1, name, dim_expected[i]); + Rf_error("Incorrect size of dimension %d of '%s' (expected %d)", + static_cast(i + 1), name, dim_expected[i]); } } } diff --git a/scripts/generate_odin.R b/scripts/generate_odin.R index 32f0585..e0ca48f 100644 --- a/scripts/generate_odin.R +++ b/scripts/generate_odin.R @@ -1,6 +1,6 @@ #!/usr/bin/env Rscript -if (packageVersion("odin.dust") < "0.2.29") { - stop("Please upgrade odin.dust to at least 0.2.29") +if (packageVersion("odin.dust") < "0.3.13") { + stop("Please upgrade odin.dust to at least 0.3.13") } withr::with_options( diff --git a/src/model-targeted-vax.cpp b/src/model-targeted-vax.cpp index b173a8c..1d36746 100644 --- a/src/model-targeted-vax.cpp +++ b/src/model-targeted-vax.cpp @@ -1,4 +1,4 @@ -// Generated by dust (version 0.15.2) - do not edit +// Generated by dust (version 0.15.3) - do not edit #include [[cpp11::register]] @@ -72,7 +72,7 @@ void dust_cpu_model_targeted_vax_set_stochastic_schedule(SEXP ptr, SEXP time); SEXP dust_cpu_model_targeted_vax_ode_statistics(SEXP ptr); #include -// Generated by odin.dust (version 0.3.11) - do not edit +// Generated by odin.dust (version 0.3.13) - do not edit template __host__ __device__ real_type odin_sum1(const container x, size_t from, size_t to); template @@ -998,7 +998,8 @@ void user_check_array_rank(cpp11::sexp x, const char *name) { } else if (N == 2) { cpp11::stop("Expected a matrix for '%s'", name); } else { - cpp11::stop("Expected an array of rank %d for '%s'", N, name); + cpp11::stop("Expected an array of rank %d for '%s'", + static_cast(N), name); } } } @@ -1009,8 +1010,8 @@ void user_check_array_dim(cpp11::sexp x, const char *name, cpp11::integers dim = cpp11::as_cpp(x.attr("dim")); for (size_t i = 0; i < N; ++i) { if (dim[(int)i] != dim_expected[i]) { - Rf_error("Incorrect size of dimension %zu of '%s' (expected %d)", - i + 1, name, dim_expected[i]); + Rf_error("Incorrect size of dimension %d of '%s' (expected %d)", + static_cast(i + 1), name, dim_expected[i]); } } }