We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41f138f commit de50d88Copy full SHA for de50d88
156 files changed
stan/math/fwd/fun/hypergeometric_pFq.hpp
@@ -25,13 +25,11 @@ namespace math {
25
* @param[in] z Scalar z argument
26
* @return Generalized hypergeometric function
27
*/
28
-template <typename Ta, typename Tb, typename Tz,
29
- typename FvarT = return_type_t<Ta, Tb, Tz>,
30
- bool grad_a = is_autodiff_v<Ta>,
31
- bool grad_b = is_autodiff_v<Tb>,
32
- bool grad_z = is_autodiff_v<Tz>,
33
- require_all_vector_t<Ta, Tb>* = nullptr,
34
- require_fvar_t<FvarT>* = nullptr>
+template <
+ typename Ta, typename Tb, typename Tz,
+ typename FvarT = return_type_t<Ta, Tb, Tz>, bool grad_a = is_autodiff_v<Ta>,
+ bool grad_b = is_autodiff_v<Tb>, bool grad_z = is_autodiff_v<Tz>,
+ require_all_vector_t<Ta, Tb>* = nullptr, require_fvar_t<FvarT>* = nullptr>
35
inline FvarT hypergeometric_pFq(Ta&& a, Tb&& b, Tz&& z) {
36
auto&& a_ref = to_ref(as_column_vector_or_scalar(a));
37
auto&& b_ref = to_ref(as_column_vector_or_scalar(b));
stan/math/opencl/kernel_generator/multi_result_kernel.hpp
@@ -77,13 +77,13 @@ struct multi_result_kernel_internal {
77
int expression_rows = expression.rows();
78
int expression_cols = expression.cols();
79
if constexpr (is_colwise_reduction<T_current_expression>::value
80
- && expression_cols == -1) {
+ && expression_cols == -1) {
81
expression_cols = n_cols;
82
expression_rows = expression.thread_rows();
83
expression_rows = internal::colwise_reduction_wgs_rows(
84
expression_rows < 0 ? n_rows : expression_rows, expression_cols);
85
} else if constexpr (is_reduction_2d<T_current_expression>::value
86
87
expression_rows = internal::colwise_reduction_wgs_rows(n_rows, n_cols);
88
if (expression_rows == 0) {
89
expression_cols = 0;
stan/math/opencl/prim/bernoulli_logit_glm_lpmf.hpp
@@ -79,7 +79,8 @@ return_type_t<T_x_cl, T_alpha_cl, T_beta_cl> bernoulli_logit_glm_lpmf(
if (N == 0) {
return 0;
}
- if constexpr (!include_summand<propto, T_x_cl, T_alpha_cl, T_beta_cl>::value) {
+ if constexpr (!include_summand<propto, T_x_cl, T_alpha_cl,
+ T_beta_cl>::value) {
stan/math/opencl/prim/bernoulli_logit_lpmf.hpp
@@ -72,8 +72,7 @@ return_type_t<T_prob_cl> bernoulli_logit_lpmf(const T_n_cl& n,
72
matrix_cl<double> deriv_cl;
73
74
results(logp_cl, deriv_cl, check_n_bounded, check_theta_not_nan)
75
- = expressions(logp_expr,
76
- calc_if<is_autodiff_v<T_prob_cl>>(deriv_expr),
+ = expressions(logp_expr, calc_if<is_autodiff_v<T_prob_cl>>(deriv_expr),
n_bounded_expr, theta_not_nan_expr);
T_partials_return logp = sum(from_matrix_cl(logp_cl));
stan/math/opencl/prim/bernoulli_lpmf.hpp
@@ -68,8 +68,7 @@ return_type_t<T_prob_cl> bernoulli_lpmf(const T_n_cl& n,
68
69
70
results(logp_cl, deriv_cl, check_n_bounded, check_theta_bounded)
71
n_bounded_expr, theta_bounded_expr);
logp = sum(from_matrix_cl(logp_cl));
stan/math/opencl/prim/beta_proportion_lpdf.hpp
@@ -103,8 +103,7 @@ return_type_t<T_y_cl, T_loc_cl, T_prec_cl> beta_proportion_lpdf(
103
results(check_y_bounded, check_mu_bounded, check_kappa_positive_finite,
104
logp_cl, y_deriv_cl, mu_deriv_cl, kappa_deriv_cl)
105
= expressions(y_bounded_expr, mu_bounded_expr, kappa_positive_finite,
106
- logp_expr,
107
- calc_if<is_autodiff_v<T_y_cl>>(y_deriv_expr),
+ logp_expr, calc_if<is_autodiff_v<T_y_cl>>(y_deriv_expr),
108
calc_if<is_autodiff_v<T_loc_cl>>(mu_deriv_expr),
109
calc_if<is_autodiff_v<T_prec_cl>>(kappa_deriv_expr));
110
stan/math/opencl/prim/binomial_logit_glm_lpmf.hpp
@@ -51,7 +51,8 @@ return_type_t<T_x_cl, T_alpha_cl, T_beta_cl> binomial_logit_glm_lpmf(
51
if (N_instances == 0 || N_attributes == 0) {
52
53
54
55
56
57
58
stan/math/opencl/prim/cauchy_cdf.hpp
@@ -83,11 +83,10 @@ return_type_t<T_y_cl, T_loc_cl, T_scale_cl> cauchy_cdf(
results(check_y_not_nan, check_mu_finite, check_sigma_positive_finite,
any_y_neg_inf_cl, P_cl, mu_deriv_cl, sigma_deriv_cl)
- = expressions(
- y_not_nan_expr, mu_finite_expr, sigma_positive_finite_expr,
- any_y_neg_inf, P_expr,
- calc_if<is_any_autodiff_v<T_y_cl, T_loc_cl>>(mu_deriv_tmp),
90
- calc_if<is_autodiff_v<T_scale_cl>>(sigma_deriv_tmp));
+ = expressions(y_not_nan_expr, mu_finite_expr, sigma_positive_finite_expr,
+ any_y_neg_inf, P_expr,
+ calc_if<is_any_autodiff_v<T_y_cl, T_loc_cl>>(mu_deriv_tmp),
+ calc_if<is_autodiff_v<T_scale_cl>>(sigma_deriv_tmp));
91
92
if (from_matrix_cl(any_y_neg_inf_cl).maxCoeff()) {
93
return 0.0;
stan/math/opencl/prim/cauchy_lccdf.hpp
@@ -80,8 +80,7 @@ return_type_t<T_y_cl, T_loc_cl, T_scale_cl> cauchy_lccdf(
ccdf_log_cl, y_deriv_cl, mu_deriv_cl, sigma_deriv_cl)
= expressions(y_not_nan_expr, mu_finite_expr, sigma_positive_finite_expr,
- ccdf_log_expr,
- calc_if<is_autodiff_v<T_y_cl>>(-rep_deriv),
+ ccdf_log_expr, calc_if<is_autodiff_v<T_y_cl>>(-rep_deriv),
calc_if<is_autodiff_v<T_loc_cl>>(rep_deriv),
calc_if<is_autodiff_v<T_scale_cl>>(sigma_deriv));
stan/math/opencl/prim/cauchy_lcdf.hpp
@@ -80,8 +80,7 @@ return_type_t<T_y_cl, T_loc_cl, T_scale_cl> cauchy_lcdf(
cdf_log_cl, mu_deriv_cl, sigma_deriv_cl)
- cdf_log_expr,
- calc_if<is_autodiff_v<T_y_cl>>(rep_deriv),
+ cdf_log_expr, calc_if<is_autodiff_v<T_y_cl>>(rep_deriv),
calc_if<is_autodiff_v<T_loc_cl>>(-rep_deriv),
0 commit comments