Skip to content

Commit c012271

Browse files
committed
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.04.1 (tags/RELEASE_600/final)
1 parent 4ce8c4f commit c012271

7 files changed

Lines changed: 74 additions & 63 deletions

stan/math/opencl/prim/exp_mod_normal_cdf.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ return_type_t<T_y_cl, T_loc_cl, T_scale_cl, T_inv_scale_cl> exp_mod_normal_cdf(
119119
calc_if<!is_constant<T_scale_cl>::value>(sigma_deriv1),
120120
calc_if<!is_constant<T_inv_scale_cl>::value>(lambda_deriv1));
121121

122-
if(from_matrix_cl(any_y_neg_inf_cl).maxCoeff()){
122+
if (from_matrix_cl(any_y_neg_inf_cl).maxCoeff()) {
123123
return 0.0;
124124
}
125125

test/unit/math/opencl/rev/double_exponential_cdf_test.cpp

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ TEST(ProbDistributionsDoubleExponentialCdf, error_checking) {
5656
std::domain_error);
5757
}
5858

59-
auto double_exponential_cdf_functor = [](const auto& y, const auto& mu, const auto& sigma) {
60-
return stan::math::double_exponential_cdf(y, mu, sigma);
61-
};
59+
auto double_exponential_cdf_functor
60+
= [](const auto& y, const auto& mu, const auto& sigma) {
61+
return stan::math::double_exponential_cdf(y, mu, sigma);
62+
};
6263

6364
TEST(ProbDistributionsDoubleExponentialCdf, opencl_matches_cpu_small) {
6465
int N = 3;
@@ -71,11 +72,11 @@ TEST(ProbDistributionsDoubleExponentialCdf, opencl_matches_cpu_small) {
7172
Eigen::VectorXd sigma(N);
7273
sigma << 0.3, 0.8, 1.0;
7374

74-
stan::math::test::compare_cpu_opencl_prim_rev(double_exponential_cdf_functor, y, mu,
75-
sigma);
75+
stan::math::test::compare_cpu_opencl_prim_rev(double_exponential_cdf_functor,
76+
y, mu, sigma);
7677
stan::math::test::compare_cpu_opencl_prim_rev(
77-
double_exponential_cdf_functor, y.transpose().eval(), mu.transpose().eval(),
78-
sigma.transpose().eval());
78+
double_exponential_cdf_functor, y.transpose().eval(),
79+
mu.transpose().eval(), sigma.transpose().eval());
7980
}
8081

8182
TEST(ProbDistributionsDoubleExponentialCdf, opencl_broadcast_y) {
@@ -87,8 +88,8 @@ TEST(ProbDistributionsDoubleExponentialCdf, opencl_broadcast_y) {
8788
Eigen::VectorXd sigma(N);
8889
sigma << 0.3, 0.8, 1.0;
8990

90-
stan::math::test::test_opencl_broadcasting_prim_rev<0>(double_exponential_cdf_functor,
91-
y_scal, mu, sigma);
91+
stan::math::test::test_opencl_broadcasting_prim_rev<0>(
92+
double_exponential_cdf_functor, y_scal, mu, sigma);
9293
stan::math::test::test_opencl_broadcasting_prim_rev<0>(
9394
double_exponential_cdf_functor, y_scal, mu.transpose().eval(), sigma);
9495
}
@@ -102,8 +103,8 @@ TEST(ProbDistributionsDoubleExponentialCdf, opencl_broadcast_mu) {
102103
Eigen::VectorXd sigma(N);
103104
sigma << 0.3, 0.8, 1.0;
104105

105-
stan::math::test::test_opencl_broadcasting_prim_rev<1>(double_exponential_cdf_functor, y,
106-
mu_scal, sigma);
106+
stan::math::test::test_opencl_broadcasting_prim_rev<1>(
107+
double_exponential_cdf_functor, y, mu_scal, sigma);
107108
stan::math::test::test_opencl_broadcasting_prim_rev<1>(
108109
double_exponential_cdf_functor, y.transpose().eval(), mu_scal, sigma);
109110
}
@@ -117,8 +118,8 @@ TEST(ProbDistributionsDoubleExponentialCdf, opencl_broadcast_sigma) {
117118
mu << 0.3, 0.8, 1.0;
118119
double sigma_scal = 12.3;
119120

120-
stan::math::test::test_opencl_broadcasting_prim_rev<2>(double_exponential_cdf_functor, y,
121-
mu, sigma_scal);
121+
stan::math::test::test_opencl_broadcasting_prim_rev<2>(
122+
double_exponential_cdf_functor, y, mu, sigma_scal);
122123
stan::math::test::test_opencl_broadcasting_prim_rev<2>(
123124
double_exponential_cdf_functor, y.transpose().eval(), mu, sigma_scal);
124125
}
@@ -133,11 +134,11 @@ TEST(ProbDistributionsDoubleExponentialCdf, opencl_matches_cpu_big) {
133134
Eigen::Matrix<double, Eigen::Dynamic, 1> sigma
134135
= Eigen::Array<double, Eigen::Dynamic, 1>::Random(N, 1).abs();
135136

136-
stan::math::test::compare_cpu_opencl_prim_rev(double_exponential_cdf_functor, y, mu,
137-
sigma);
137+
stan::math::test::compare_cpu_opencl_prim_rev(double_exponential_cdf_functor,
138+
y, mu, sigma);
138139
stan::math::test::compare_cpu_opencl_prim_rev(
139-
double_exponential_cdf_functor, y.transpose().eval(), mu.transpose().eval(),
140-
sigma.transpose().eval());
140+
double_exponential_cdf_functor, y.transpose().eval(),
141+
mu.transpose().eval(), sigma.transpose().eval());
141142
}
142143

143144
#endif

test/unit/math/opencl/rev/double_exponential_lccdf_test.cpp

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,21 @@ TEST(ProbDistributionsDoubleExponentialLccdf, error_checking) {
4848
EXPECT_THROW(stan::math::double_exponential_lccdf(y_cl, mu_cl, sigma_size_cl),
4949
std::invalid_argument);
5050

51-
EXPECT_THROW(stan::math::double_exponential_lccdf(y_value_cl, mu_cl, sigma_cl),
52-
std::domain_error);
53-
EXPECT_THROW(stan::math::double_exponential_lccdf(y_cl, mu_value_cl, sigma_cl),
54-
std::domain_error);
55-
EXPECT_THROW(stan::math::double_exponential_lccdf(y_cl, mu_cl, sigma_value_cl),
56-
std::domain_error);
51+
EXPECT_THROW(
52+
stan::math::double_exponential_lccdf(y_value_cl, mu_cl, sigma_cl),
53+
std::domain_error);
54+
EXPECT_THROW(
55+
stan::math::double_exponential_lccdf(y_cl, mu_value_cl, sigma_cl),
56+
std::domain_error);
57+
EXPECT_THROW(
58+
stan::math::double_exponential_lccdf(y_cl, mu_cl, sigma_value_cl),
59+
std::domain_error);
5760
}
5861

59-
auto double_exponential_lccdf_functor = [](const auto& y, const auto& mu, const auto& sigma) {
60-
return stan::math::double_exponential_lccdf(y, mu, sigma);
61-
};
62+
auto double_exponential_lccdf_functor
63+
= [](const auto& y, const auto& mu, const auto& sigma) {
64+
return stan::math::double_exponential_lccdf(y, mu, sigma);
65+
};
6266

6367
TEST(ProbDistributionsDoubleExponentialLccdf, opencl_matches_cpu_small) {
6468
int N = 3;
@@ -71,11 +75,11 @@ TEST(ProbDistributionsDoubleExponentialLccdf, opencl_matches_cpu_small) {
7175
Eigen::VectorXd sigma(N);
7276
sigma << 0.3, 0.8, 1.0;
7377

74-
stan::math::test::compare_cpu_opencl_prim_rev(double_exponential_lccdf_functor, y, mu,
75-
sigma);
7678
stan::math::test::compare_cpu_opencl_prim_rev(
77-
double_exponential_lccdf_functor, y.transpose().eval(), mu.transpose().eval(),
78-
sigma.transpose().eval());
79+
double_exponential_lccdf_functor, y, mu, sigma);
80+
stan::math::test::compare_cpu_opencl_prim_rev(
81+
double_exponential_lccdf_functor, y.transpose().eval(),
82+
mu.transpose().eval(), sigma.transpose().eval());
7983
}
8084

8185
TEST(ProbDistributionsDoubleExponentialLccdf, opencl_broadcast_y) {
@@ -87,8 +91,8 @@ TEST(ProbDistributionsDoubleExponentialLccdf, opencl_broadcast_y) {
8791
Eigen::VectorXd sigma(N);
8892
sigma << 0.3, 0.8, 1.0;
8993

90-
stan::math::test::test_opencl_broadcasting_prim_rev<0>(double_exponential_lccdf_functor,
91-
y_scal, mu, sigma);
94+
stan::math::test::test_opencl_broadcasting_prim_rev<0>(
95+
double_exponential_lccdf_functor, y_scal, mu, sigma);
9296
stan::math::test::test_opencl_broadcasting_prim_rev<0>(
9397
double_exponential_lccdf_functor, y_scal, mu.transpose().eval(), sigma);
9498
}
@@ -102,8 +106,8 @@ TEST(ProbDistributionsDoubleExponentialLccdf, opencl_broadcast_mu) {
102106
Eigen::VectorXd sigma(N);
103107
sigma << 0.3, 0.8, 1.0;
104108

105-
stan::math::test::test_opencl_broadcasting_prim_rev<1>(double_exponential_lccdf_functor, y,
106-
mu_scal, sigma);
109+
stan::math::test::test_opencl_broadcasting_prim_rev<1>(
110+
double_exponential_lccdf_functor, y, mu_scal, sigma);
107111
stan::math::test::test_opencl_broadcasting_prim_rev<1>(
108112
double_exponential_lccdf_functor, y.transpose().eval(), mu_scal, sigma);
109113
}
@@ -117,8 +121,8 @@ TEST(ProbDistributionsDoubleExponentialLccdf, opencl_broadcast_sigma) {
117121
mu << 0.3, 0.8, 1.0;
118122
double sigma_scal = 12.3;
119123

120-
stan::math::test::test_opencl_broadcasting_prim_rev<2>(double_exponential_lccdf_functor, y,
121-
mu, sigma_scal);
124+
stan::math::test::test_opencl_broadcasting_prim_rev<2>(
125+
double_exponential_lccdf_functor, y, mu, sigma_scal);
122126
stan::math::test::test_opencl_broadcasting_prim_rev<2>(
123127
double_exponential_lccdf_functor, y.transpose().eval(), mu, sigma_scal);
124128
}
@@ -133,10 +137,10 @@ TEST(ProbDistributionsDoubleExponentialLccdf, opencl_matches_cpu_big) {
133137
Eigen::Matrix<double, Eigen::Dynamic, 1> sigma
134138
= Eigen::Array<double, Eigen::Dynamic, 1>::Random(N, 1).abs();
135139

136-
stan::math::test::compare_cpu_opencl_prim_rev(double_exponential_lccdf_functor, y, mu,
137-
sigma);
138140
stan::math::test::compare_cpu_opencl_prim_rev(
139-
double_exponential_lccdf_functor, y.transpose().eval(), mu.transpose().eval(),
140-
sigma.transpose().eval());
141+
double_exponential_lccdf_functor, y, mu, sigma);
142+
stan::math::test::compare_cpu_opencl_prim_rev(
143+
double_exponential_lccdf_functor, y.transpose().eval(),
144+
mu.transpose().eval(), sigma.transpose().eval());
141145
}
142146
#endif

test/unit/math/opencl/rev/double_exponential_lcdf_test.cpp

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ TEST(ProbDistributionsDoubleExponentialLcdf, error_checking) {
5656
std::domain_error);
5757
}
5858

59-
auto double_exponential_lcdf_functor = [](const auto& y, const auto& mu, const auto& sigma) {
60-
return stan::math::double_exponential_lcdf(y, mu, sigma);
61-
};
59+
auto double_exponential_lcdf_functor
60+
= [](const auto& y, const auto& mu, const auto& sigma) {
61+
return stan::math::double_exponential_lcdf(y, mu, sigma);
62+
};
6263

6364
TEST(ProbDistributionsDoubleExponentialLcdf, opencl_matches_cpu_small) {
6465
int N = 3;
@@ -71,11 +72,11 @@ TEST(ProbDistributionsDoubleExponentialLcdf, opencl_matches_cpu_small) {
7172
Eigen::VectorXd sigma(N);
7273
sigma << 0.3, 0.8, 1.0;
7374

74-
stan::math::test::compare_cpu_opencl_prim_rev(double_exponential_lcdf_functor, y, mu,
75-
sigma);
75+
stan::math::test::compare_cpu_opencl_prim_rev(double_exponential_lcdf_functor,
76+
y, mu, sigma);
7677
stan::math::test::compare_cpu_opencl_prim_rev(
77-
double_exponential_lcdf_functor, y.transpose().eval(), mu.transpose().eval(),
78-
sigma.transpose().eval());
78+
double_exponential_lcdf_functor, y.transpose().eval(),
79+
mu.transpose().eval(), sigma.transpose().eval());
7980
}
8081

8182
TEST(ProbDistributionsDoubleExponentialLcdf, opencl_broadcast_y) {
@@ -87,8 +88,8 @@ TEST(ProbDistributionsDoubleExponentialLcdf, opencl_broadcast_y) {
8788
Eigen::VectorXd sigma(N);
8889
sigma << 0.3, 0.8, 1.0;
8990

90-
stan::math::test::test_opencl_broadcasting_prim_rev<0>(double_exponential_lcdf_functor,
91-
y_scal, mu, sigma);
91+
stan::math::test::test_opencl_broadcasting_prim_rev<0>(
92+
double_exponential_lcdf_functor, y_scal, mu, sigma);
9293
stan::math::test::test_opencl_broadcasting_prim_rev<0>(
9394
double_exponential_lcdf_functor, y_scal, mu.transpose().eval(), sigma);
9495
}
@@ -102,8 +103,8 @@ TEST(ProbDistributionsDoubleExponentialLcdf, opencl_broadcast_mu) {
102103
Eigen::VectorXd sigma(N);
103104
sigma << 0.3, 0.8, 1.0;
104105

105-
stan::math::test::test_opencl_broadcasting_prim_rev<1>(double_exponential_lcdf_functor, y,
106-
mu_scal, sigma);
106+
stan::math::test::test_opencl_broadcasting_prim_rev<1>(
107+
double_exponential_lcdf_functor, y, mu_scal, sigma);
107108
stan::math::test::test_opencl_broadcasting_prim_rev<1>(
108109
double_exponential_lcdf_functor, y.transpose().eval(), mu_scal, sigma);
109110
}
@@ -117,8 +118,8 @@ TEST(ProbDistributionsDoubleExponentialLcdf, opencl_broadcast_sigma) {
117118
mu << 0.3, 0.8, 1.0;
118119
double sigma_scal = 12.3;
119120

120-
stan::math::test::test_opencl_broadcasting_prim_rev<2>(double_exponential_lcdf_functor, y,
121-
mu, sigma_scal);
121+
stan::math::test::test_opencl_broadcasting_prim_rev<2>(
122+
double_exponential_lcdf_functor, y, mu, sigma_scal);
122123
stan::math::test::test_opencl_broadcasting_prim_rev<2>(
123124
double_exponential_lcdf_functor, y.transpose().eval(), mu, sigma_scal);
124125
}
@@ -133,10 +134,10 @@ TEST(ProbDistributionsDoubleExponentialLcdf, opencl_matches_cpu_big) {
133134
Eigen::Matrix<double, Eigen::Dynamic, 1> sigma
134135
= Eigen::Array<double, Eigen::Dynamic, 1>::Random(N, 1).abs();
135136

136-
stan::math::test::compare_cpu_opencl_prim_rev(double_exponential_lcdf_functor, y, mu,
137-
sigma);
137+
stan::math::test::compare_cpu_opencl_prim_rev(double_exponential_lcdf_functor,
138+
y, mu, sigma);
138139
stan::math::test::compare_cpu_opencl_prim_rev(
139-
double_exponential_lcdf_functor, y.transpose().eval(), mu.transpose().eval(),
140-
sigma.transpose().eval());
140+
double_exponential_lcdf_functor, y.transpose().eval(),
141+
mu.transpose().eval(), sigma.transpose().eval());
141142
}
142143
#endif

test/unit/math/opencl/rev/exp_mod_normal_cdf_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ TEST(ProbDistributionsDoubleExpModNormalCdf, opencl_matches_cpu_small) {
104104
sigma.transpose().eval(), lambda.transpose().eval());
105105
}
106106

107-
TEST(ProbDistributionsDoubleExpModNormalCdf, opencl_matches_cpu_small_y_neg_inf) {
107+
TEST(ProbDistributionsDoubleExpModNormalCdf,
108+
opencl_matches_cpu_small_y_neg_inf) {
108109
int N = 3;
109110
int M = 2;
110111

test/unit/math/opencl/rev/exp_mod_normal_lccdf_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ TEST(ProbDistributionsDoubleExpModNormalLccdf, opencl_matches_cpu_small) {
104104
sigma.transpose().eval(), lambda.transpose().eval());
105105
}
106106

107-
TEST(ProbDistributionsDoubleExpModNormalLccdf, opencl_matches_cpu_small_y_pos_inf) {
107+
TEST(ProbDistributionsDoubleExpModNormalLccdf,
108+
opencl_matches_cpu_small_y_pos_inf) {
108109
int N = 3;
109110
int M = 2;
110111

@@ -124,7 +125,8 @@ TEST(ProbDistributionsDoubleExpModNormalLccdf, opencl_matches_cpu_small_y_pos_in
124125
sigma.transpose().eval(), lambda.transpose().eval());
125126
}
126127

127-
TEST(ProbDistributionsDoubleExpModNormalLccdf, opencl_matches_cpu_small_y_neg_inf) {
128+
TEST(ProbDistributionsDoubleExpModNormalLccdf,
129+
opencl_matches_cpu_small_y_neg_inf) {
128130
int N = 3;
129131
int M = 2;
130132

test/unit/math/opencl/rev/exp_mod_normal_lcdf_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ TEST(ProbDistributionsDoubleExpModNormalLcdf, opencl_matches_cpu_small) {
104104
sigma.transpose().eval(), lambda.transpose().eval());
105105
}
106106

107-
TEST(ProbDistributionsDoubleExpModNormalLcdf, opencl_matches_cpu_small_y_pos_inf) {
107+
TEST(ProbDistributionsDoubleExpModNormalLcdf,
108+
opencl_matches_cpu_small_y_pos_inf) {
108109
int N = 3;
109110
int M = 2;
110111

@@ -124,7 +125,8 @@ TEST(ProbDistributionsDoubleExpModNormalLcdf, opencl_matches_cpu_small_y_pos_inf
124125
sigma.transpose().eval(), lambda.transpose().eval());
125126
}
126127

127-
TEST(ProbDistributionsDoubleExpModNormalLcdf, opencl_matches_cpu_small_y_neg_inf) {
128+
TEST(ProbDistributionsDoubleExpModNormalLcdf,
129+
opencl_matches_cpu_small_y_neg_inf) {
128130
int N = 3;
129131
int M = 2;
130132

0 commit comments

Comments
 (0)