Skip to content

Commit 36777ab

Browse files
committed
[Jenkins] auto-formatting by clang-format version 5.0.0-3~16.04.1 (tags/RELEASE_500/final)
1 parent 73181b4 commit 36777ab

12 files changed

Lines changed: 51 additions & 29 deletions

‎stan/math/rev/core/operator_greater_than.hpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ inline bool operator>(Var1&& a, Var2&& b) {
4040
* @param b Second value.
4141
* @return True if first variable's value is greater than second value.
4242
*/
43-
template <typename Var, typename Arith, require_var_t<Var>..., require_arithmetic_t<Arith>...>
43+
template <typename Var, typename Arith, require_var_t<Var>...,
44+
require_arithmetic_t<Arith>...>
4445
inline bool operator>(Var&& a, Arith b) {
4546
return a.val() > b;
4647
}
@@ -55,7 +56,8 @@ inline bool operator>(Var&& a, Arith b) {
5556
* @param b Second variable.
5657
* @return True if first value is greater than second variable's value.
5758
*/
58-
template <typename Arith, typename Var, require_arithmetic_t<Arith>..., require_var_t<Var>...>
59+
template <typename Arith, typename Var, require_arithmetic_t<Arith>...,
60+
require_var_t<Var>...>
5961
inline bool operator>(Arith a, Var&& b) {
6062
return a > b.val();
6163
}

‎stan/math/rev/core/operator_greater_than_or_equal.hpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ inline bool operator>=(Var1&& a, Var2&& b) {
4343
* @return True if first variable's value is greater than or equal
4444
* to second value.
4545
*/
46-
template <typename Var, typename Arith, require_var_t<Var>..., require_arithmetic_t<Arith>...>
46+
template <typename Var, typename Arith, require_var_t<Var>...,
47+
require_arithmetic_t<Arith>...>
4748
inline bool operator>=(Var&& a, Arith b) {
4849
return a.val() >= b;
4950
}

‎stan/math/rev/core/operator_less_than.hpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ inline bool operator<(Var1&& a, Var2&& b) {
3939
* @param b Second value.
4040
* @return True if first variable's value is less than second value.
4141
*/
42-
template <typename Var, typename Arith, require_var_t<Var>..., require_arithmetic_t<Arith>...>
42+
template <typename Var, typename Arith, require_var_t<Var>...,
43+
require_arithmetic_t<Arith>...>
4344
inline bool operator<(Var&& a, Arith b) {
4445
return a.val() < b;
4546
}
@@ -54,7 +55,8 @@ inline bool operator<(Var&& a, Arith b) {
5455
* @param b Second variable.
5556
* @return True if first value is less than second variable's value.
5657
*/
57-
template <typename Arith, typename Var, require_arithmetic_t<Arith>..., require_var_t<Var>...>
58+
template <typename Arith, typename Var, require_arithmetic_t<Arith>...,
59+
require_var_t<Var>...>
5860
inline bool operator<(Arith a, Var&& b) {
5961
return a < b.val();
6062
}

‎stan/math/rev/core/operator_less_than_or_equal.hpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ inline bool operator<=(Var1&& a, Var2&& b) {
4242
* @return True if first variable's value is less than or equal to
4343
* the second value.
4444
*/
45-
template <typename Var, typename Arith, require_var_t<Var>..., require_arithmetic_t<Arith>...>
45+
template <typename Var, typename Arith, require_var_t<Var>...,
46+
require_arithmetic_t<Arith>...>
4647
inline bool operator<=(Var&& a, Arith b) {
4748
return a.val() <= b;
4849
}
@@ -58,7 +59,8 @@ inline bool operator<=(Var&& a, Arith b) {
5859
* @return True if first value is less than or equal to the second
5960
* variable's value.
6061
*/
61-
template <typename Arith, typename Var, require_arithmetic_t<Arith>..., require_var_t<Var>...>
62+
template <typename Arith, typename Var, require_arithmetic_t<Arith>...,
63+
require_var_t<Var>...>
6264
inline bool operator<=(Arith a, Var&& b) {
6365
return a <= b.val();
6466
}

‎stan/math/rev/core/operator_logical_and.hpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ inline bool operator&&(Var1&& x, Var2&& y) {
3333
* @return conjunction of first argument's value and second
3434
* argument
3535
*/
36-
template <typename Var, typename Arith, require_var_t<Var>..., require_arithmetic_t<Arith>...>
36+
template <typename Var, typename Arith, require_var_t<Var>...,
37+
require_arithmetic_t<Arith>...>
3738
inline bool operator&&(Var&& x, Arith y) {
3839
return x.val() && y;
3940
}
@@ -49,7 +50,8 @@ inline bool operator&&(Var&& x, Arith y) {
4950
* @return conjunction of first argument and second argument's
5051
* value
5152
*/
52-
template <typename Arith, typename Var, require_arithmetic_t<Arith>..., require_var_t<Var>...>
53+
template <typename Arith, typename Var, require_arithmetic_t<Arith>...,
54+
require_var_t<Var>...>
5355
inline bool operator&&(Arith x, Var&& y) {
5456
return x && y.val();
5557
}

‎stan/math/rev/core/operator_logical_or.hpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ inline bool operator||(Var1&& x, Var2&& y) {
3333
* @return disjunction of first argument's value and second
3434
* argument
3535
*/
36-
template <typename Var, typename Arith, require_var_t<Var>..., require_arithmetic_t<Arith>...>
36+
template <typename Var, typename Arith, require_var_t<Var>...,
37+
require_arithmetic_t<Arith>...>
3738
inline bool operator||(Var&& x, Arith y) {
3839
return x.val() || y;
3940
}
@@ -49,7 +50,8 @@ inline bool operator||(Var&& x, Arith y) {
4950
* @return disjunction of first argument and the second
5051
* argument's value
5152
*/
52-
template <typename Arith, typename Var, require_arithmetic_t<Arith>..., require_var_t<Var>...>
53+
template <typename Arith, typename Var, require_arithmetic_t<Arith>...,
54+
require_var_t<Var>...>
5355
inline bool operator||(Arith x, Var&& y) {
5456
return x || y.val();
5557
}

‎stan/math/rev/core/operator_multiplication.hpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ inline var operator*(Var1&& a, Var2&& b) {
9797
* @param b Scalar operand.
9898
* @return Variable result of multiplying operands.
9999
*/
100-
template <typename Var, typename Arith, require_var_t<Var>..., require_arithmetic_t<Arith>...>
100+
template <typename Var, typename Arith, require_var_t<Var>...,
101+
require_arithmetic_t<Arith>...>
101102
inline var operator*(Var&& a, Arith b) {
102103
if (b == 1.0) {
103104
return a;
@@ -118,7 +119,8 @@ inline var operator*(Var&& a, Arith b) {
118119
* @param b Variable operand.
119120
* @return Variable result of multiplying the operands.
120121
*/
121-
template <typename Arith, typename Var, require_arithmetic_t<Arith>..., require_var_t<Var>...>
122+
template <typename Arith, typename Var, require_arithmetic_t<Arith>...,
123+
require_var_t<Var>...>
122124
inline var operator*(Arith a, Var&& b) {
123125
if (a == 1.0) {
124126
return b;

‎stan/math/rev/core/operator_not_equal.hpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ inline bool operator!=(Var1&& a, Var2&& b) {
4242
* @return True if the first variable's value is not the same as the
4343
* second value.
4444
*/
45-
template <typename Var, typename Arith, require_var_t<Var>..., require_arithmetic_t<Arith>...>
45+
template <typename Var, typename Arith, require_var_t<Var>...,
46+
require_arithmetic_t<Arith>...>
4647
inline bool operator!=(Var&& a, Arith b) {
4748
return a.val() != b;
4849
}
@@ -58,7 +59,8 @@ inline bool operator!=(Var&& a, Arith b) {
5859
* @return True if the first value is not the same as the
5960
* second variable's value.
6061
*/
61-
template <typename Arith, typename Var, require_arithmetic_t<Arith>..., require_var_t<Var>...>
62+
template <typename Arith, typename Var, require_arithmetic_t<Arith>...,
63+
require_var_t<Var>...>
6264
inline bool operator!=(Arith a, Var&& b) {
6365
return a != b.val();
6466
}

‎stan/math/rev/core/operator_subtraction.hpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ inline var operator-(Var1&& a, Var2&& b) {
111111
* @param b Second scalar operand.
112112
* @return Result of subtracting the scalar from the variable.
113113
*/
114-
template <typename Var, typename Arith, require_var_t<Var>..., require_arithmetic_t<Arith>...>
114+
template <typename Var, typename Arith, require_var_t<Var>...,
115+
require_arithmetic_t<Arith>...>
115116
inline var operator-(Var&& a, Arith b) {
116117
if (b == 0.0) {
117118
return a;
@@ -132,7 +133,8 @@ inline var operator-(Var&& a, Arith b) {
132133
* @param b Second variable operand.
133134
* @return Result of sutracting a variable from a scalar.
134135
*/
135-
template <typename Arith, typename Var, require_arithmetic_t<Arith>..., require_var_t<Var>...>
136+
template <typename Arith, typename Var, require_arithmetic_t<Arith>...,
137+
require_var_t<Var>...>
136138
inline var operator-(Arith a, Var&& b) {
137139
return var(new internal::subtract_dv_vari(a, b.vi_));
138140
}

‎stan/math/rev/core/precomputed_gradients.hpp‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ class precomputed_gradients_vari : public vari {
4949
* don't match.
5050
*/
5151
template <typename Arith, typename VecVar, typename VecArith,
52-
require_arithmetic_t<Arith>...,
53-
require_vector_like_vt<is_var, VecVar>...,
54-
require_vector_like_vt<std::is_arithmetic, VecArith>...>
52+
require_arithmetic_t<Arith>...,
53+
require_vector_like_vt<is_var, VecVar>...,
54+
require_vector_like_vt<std::is_arithmetic, VecArith>...>
5555
precomputed_gradients_vari(Arith val, VecVar&& vars, VecArith&& gradients)
5656
: vari(val),
5757
size_(vars.size()),
@@ -94,11 +94,14 @@ class precomputed_gradients_vari : public vari {
9494
* gradients provided.
9595
*/
9696
template <typename Arith, typename VecVar, typename VecArith,
97-
require_arithmetic_t<Arith>...,
98-
require_vector_like_vt<is_var, VecVar>...,
99-
require_vector_like_vt<std::is_arithmetic, VecArith>...>
100-
inline auto precomputed_gradients(Arith value, VecVar&& operands, VecArith&& gradients) {
101-
return var(new precomputed_gradients_vari(value, std::forward<VecVar>(operands), std::forward<VecArith>(gradients)));
97+
require_arithmetic_t<Arith>...,
98+
require_vector_like_vt<is_var, VecVar>...,
99+
require_vector_like_vt<std::is_arithmetic, VecArith>...>
100+
inline auto precomputed_gradients(Arith value, VecVar&& operands,
101+
VecArith&& gradients) {
102+
return var(new precomputed_gradients_vari(value,
103+
std::forward<VecVar>(operands),
104+
std::forward<VecArith>(gradients)));
102105
}
103106
} // namespace math
104107
} // namespace stan

0 commit comments

Comments
 (0)