Skip to content

Commit

Permalink
regenerate with dust (0.15.2) and odin.dust (0.3.13)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwhittles committed Oct 15, 2024
1 parent 64d6c1d commit 359bebe
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions R/dust.R
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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) {
Expand Down
9 changes: 5 additions & 4 deletions inst/dust/model-targeted-vax.cpp
Original file line number Diff line number Diff line change
@@ -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 <typename real_type, typename container>
__host__ __device__ real_type odin_sum1(const container x, size_t from, size_t to);
template <typename real_type, typename container>
Expand Down Expand Up @@ -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<int>(N), name);
}
}
}
Expand All @@ -935,8 +936,8 @@ void user_check_array_dim(cpp11::sexp x, const char *name,
cpp11::integers dim = cpp11::as_cpp<cpp11::integers>(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<int>(i + 1), name, dim_expected[i]);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_odin.R
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
11 changes: 6 additions & 5 deletions src/model-targeted-vax.cpp
Original file line number Diff line number Diff line change
@@ -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.hpp>

[[cpp11::register]]
Expand Down Expand Up @@ -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 <dust/r/dust.hpp>

// Generated by odin.dust (version 0.3.11) - do not edit
// Generated by odin.dust (version 0.3.13) - do not edit
template <typename real_type, typename container>
__host__ __device__ real_type odin_sum1(const container x, size_t from, size_t to);
template <typename real_type, typename container>
Expand Down Expand Up @@ -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<int>(N), name);
}
}
}
Expand All @@ -1009,8 +1010,8 @@ void user_check_array_dim(cpp11::sexp x, const char *name,
cpp11::integers dim = cpp11::as_cpp<cpp11::integers>(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<int>(i + 1), name, dim_expected[i]);
}
}
}
Expand Down

0 comments on commit 359bebe

Please sign in to comment.