Skip to content

Commit cf46f37

Browse files
committed
Mismatched parentheses
1 parent 33b6e77 commit cf46f37

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

stan/math/rev/functor/coupled_ode_system.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ struct coupled_ode_system_impl<false, F, T_y0, Args...> {
126126
y_vars.coeffRef(n) = z[n];
127127

128128
Eigen::Matrix<var, Eigen::Dynamic, 1> f_y_t_vars
129-
= math::apply(([&](auto&&... args) { return f_(t, y_vars, msgs_, args...); },
129+
= math::apply([&](auto&&... args) { return f_(t, y_vars, msgs_, args...); },
130130
local_args_tuple_);
131131

132132
check_size_match("coupled_ode_system", "dy_dt", f_y_t_vars.size(), "states",
@@ -141,15 +141,15 @@ struct coupled_ode_system_impl<false, F, T_y0, Args...> {
141141
// memset was faster than Eigen setZero
142142
memset(args_adjoints_.data(), 0, sizeof(double) * num_args_vars);
143143

144-
math::apply((
144+
math::apply(
145145
[&](auto&&... args) {
146146
accumulate_adjoints(args_adjoints_.data(), args...);
147147
},
148148
local_args_tuple_);
149149

150150
// The vars here do not live on the nested stack so must be zero'd
151151
// separately
152-
math::apply(([&](auto&&... args) { zero_adjoints(args...); }, local_args_tuple_);
152+
math::apply([&](auto&&... args) { zero_adjoints(args...); }, local_args_tuple_);
153153

154154
// No need to zero adjoints after last sweep
155155
if (i + 1 < N_) {

stan/math/rev/functor/cvodes_integrator.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class cvodes_integrator {
104104
const Eigen::VectorXd y_vec = Eigen::Map<const Eigen::VectorXd>(y, N_);
105105

106106
Eigen::VectorXd dy_dt_vec
107-
= math::apply(([&](auto&&... args) { return f_(t, y_vec, msgs_, args...); },
107+
= math::apply([&](auto&&... args) { return f_(t, y_vec, msgs_, args...); },
108108
value_of_args_tuple_);
109109

110110
check_size_match("cvodes_integrator", "dy_dt", dy_dt_vec.size(), "states",
@@ -122,7 +122,7 @@ class cvodes_integrator {
122122
Eigen::MatrixXd Jfy;
123123

124124
auto f_wrapped = [&](const Eigen::Matrix<var, Eigen::Dynamic, 1>& y) {
125-
return math::apply(([&](auto&&... args) { return f_(t, y, msgs_, args...); },
125+
return math::apply([&](auto&&... args) { return f_(t, y, msgs_, args...); },
126126
value_of_args_tuple_);
127127
};
128128

@@ -212,7 +212,7 @@ class cvodes_integrator {
212212

213213
// Code from: https://stackoverflow.com/a/17340003 . Should probably do
214214
// something better
215-
math::apply((
215+
math::apply(
216216
[&](auto&&... args) {
217217
std::vector<int> unused_temp{
218218
0, (check_finite(function_name, "ode parameters and data", args),
@@ -327,7 +327,7 @@ class cvodes_integrator {
327327
}
328328
}
329329

330-
y.emplace_back(math::apply((
330+
y.emplace_back(math::apply(
331331
[&](auto&&... args) {
332332
return ode_store_sensitivities(f_, coupled_state_, y0_, t0_,
333333
ts_[n], msgs_, args...);

stan/math/rev/functor/ode_adams.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ode_adams_tol_impl(const char* function_name, const F& f, const T_y0& y0,
5555
long int max_num_steps, // NOLINT(runtime/int)
5656
std::ostream* msgs, const T_Args&... args) {
5757
const auto& args_ref_tuple = std::make_tuple(to_ref(args)...);
58-
return math::apply((
58+
return math::apply(
5959
[&](const auto&... args_refs) {
6060
cvodes_integrator<CV_ADAMS, F, T_y0, T_t0, T_ts, ref_type_t<T_Args>...>
6161
integrator(function_name, f, y0, t0, ts, relative_tolerance,

stan/math/rev/functor/ode_bdf.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ ode_bdf_tol_impl(const char* function_name, const F& f, const T_y0& y0,
5656
long int max_num_steps, // NOLINT(runtime/int)
5757
std::ostream* msgs, const T_Args&... args) {
5858
const auto& args_ref_tuple = std::make_tuple(to_ref(args)...);
59-
return math::apply((
59+
return math::apply(
6060
[&](const auto&... args_refs) {
6161
cvodes_integrator<CV_BDF, F, T_y0, T_t0, T_ts, ref_type_t<T_Args>...>
6262
integrator(function_name, f, y0, t0, ts, relative_tolerance,

stan/math/rev/functor/reduce_sum.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ struct reduce_sum_impl<ReduceFunction, require_var_t<ReturnType>, ReturnType,
113113
// scope. In this case no need for zeroing adjoints, since the
114114
// fresh copy has all adjoints set to zero.
115115
local_args_tuple_scope_.stack_.execute([&]() {
116-
math::apply((
116+
math::apply(
117117
[&](auto&&... args) {
118118
local_args_tuple_scope_.args_tuple_holder_ = std::make_unique<
119119
typename scoped_args_tuple::args_tuple_t>(
@@ -140,7 +140,7 @@ struct reduce_sum_impl<ReduceFunction, require_var_t<ReturnType>, ReturnType,
140140
}
141141

142142
// Perform calculation
143-
var sub_sum_v = math::apply((
143+
var sub_sum_v = math::apply(
144144
[&](auto&&... args) {
145145
return ReduceFunction()(local_sub_slice, r.begin(), r.end() - 1,
146146
&msgs_, args...);
@@ -158,7 +158,7 @@ struct reduce_sum_impl<ReduceFunction, require_var_t<ReturnType>, ReturnType,
158158
std::move(local_sub_slice));
159159

160160
// Accumulate adjoints of shared_arguments
161-
math::apply((
161+
math::apply(
162162
[&](auto&&... args) {
163163
accumulate_adjoints(args_adjoints_.data(), args...);
164164
},

0 commit comments

Comments
 (0)