I am using 'Cmdstan ‘2.30.1’ (cmdstanr version ‘0.5.2’) as backend with brms (version ‘2.17.3’). During compilation, following warnings are shown but model compiles successfully and samples as expected.
&, const double&>::recursive_reducer::args_tuple_' [-Wreorder]
stan/lib/stan_math/stan/math/rev/functor/reduce_sum.hpp:78:5: warning: when initialized here [-Wreorder]
recursive_reducer(recursive_reducer& other, tbb::split)
I guess these warnings are harmless but still I want to resolve the issue. I would really appreciate your help.
I understand the concern, but can assure you this warning is harmless.
The reorder warnings (i.e., -Wreorder) occur when the declaration of member variables is in a different order than their initialization. The reason it’s a warning is that the calls are executed in order or declaration, not in the order they’re written in a C++ constructor.
const size_t num_vars_per_term_;
const size_t num_vars_shared_terms_; // Number of vars in shared arguments
double* sliced_partials_; // Points to adjoints of the partial calculations
but the constructor throwing the error initializes this way: