We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This thread uncovered the bug: https://discourse.mc-stan.org/t/custom-c-using-cmdstanr/19528/9 This code works, but replacing allow_undefined with allow-defined results in the custom header not being included (I believe)
library(cmdstanr) model_code <- " functions { real my_fun(real r); } transformed data { real s = my_fun(0.0); } parameters { real y; } model { y ~ normal(0, 1); } " stan_file <- write_stan_file(model_code, basename = "test.stan") hpp_code <- " #include <iostream> namespace test_model_namespace { double my_fun(double r, std::ostream* = nullptr) { return r+1.0; } } " hpp_file <- "test.hpp" write(hpp_code, file = hpp_file) mod <- cmdstan_model(stan_file,include_paths=getwd(), cpp_options=list(USER_HEADER=file.path(getwd(), hpp_file)), stanc_options = list("allow_undefined") ) fit <- mod$sample()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This thread uncovered the bug: https://discourse.mc-stan.org/t/custom-c-using-cmdstanr/19528/9
This code works, but replacing allow_undefined with allow-defined results in the custom header not being included (I believe)
The text was updated successfully, but these errors were encountered: