@@ -295,7 +295,7 @@ inline auto wiener_lcdf_unnorm(const T_y& y, const T_a& a, const T_t0& t0,
295295 auto sw_val = to_ref (as_value_column_array_or_scalar (sw_ref));
296296 auto st0_val = to_ref (as_value_column_array_or_scalar (st0_ref));
297297
298- if (!include_summand<propto, T_y, T_a, T_v, T_w, T_t0, T_sv, T_sw,
298+ if constexpr (!include_summand<propto, T_y, T_a, T_v, T_w, T_t0, T_sv, T_sw,
299299 T_st0>::value) {
300300 return ret_t (0 );
301301 }
@@ -446,7 +446,7 @@ inline auto wiener_lcdf_unnorm(const T_y& y, const T_a& a, const T_t0& t0,
446446 // computation of derivative for t and precision check in order to give
447447 // the value as deriv_t to edge1 and as -deriv_t to edge5
448448
449- if (!is_constant_all<T_y>::value || !is_constant_all<T_t0>::value) {
449+ if constexpr (!is_constant_all<T_y>::value || !is_constant_all<T_t0>::value) {
450450 T_partials_return deriv_t_7
451451 = internal::wiener7_integrate_cdf<
452452 GradientCalc::OFF, GradientCalc::OFF, GradientCalc::OFF,
@@ -458,15 +458,15 @@ inline auto wiener_lcdf_unnorm(const T_y& y, const T_a& a, const T_t0& t0,
458458 maximal_evaluations_hcubature, absolute_error_hcubature,
459459 relative_error_hcubature / 2 )
460460 / cdf;
461- if (!is_constant_all<T_y>::value) {
461+ if constexpr (!is_constant_all<T_y>::value) {
462462 partials<0 >(ops_partials)[i] = deriv_t_7;
463463 }
464- if (!is_constant_all<T_t0>::value) {
464+ if constexpr (!is_constant_all<T_t0>::value) {
465465 partials<2 >(ops_partials)[i] = -deriv_t_7;
466466 }
467467 }
468468 T_partials_return deriv;
469- if (!is_constant_all<T_a>::value) {
469+ if constexpr (!is_constant_all<T_a>::value) {
470470 partials<1 >(ops_partials)[i]
471471 = internal::wiener7_integrate_cdf (
472472 [&](auto &&... args) {
@@ -477,7 +477,7 @@ inline auto wiener_lcdf_unnorm(const T_y& y, const T_a& a, const T_t0& t0,
477477 relative_error_hcubature / 2 )
478478 / cdf;
479479 }
480- if (!is_constant_all<T_w>::value) {
480+ if constexpr (!is_constant_all<T_w>::value) {
481481 partials<3 >(ops_partials)[i]
482482 = internal::wiener7_integrate_cdf<GradientCalc::OFF,
483483 GradientCalc::ON>(
@@ -489,7 +489,7 @@ inline auto wiener_lcdf_unnorm(const T_y& y, const T_a& a, const T_t0& t0,
489489 relative_error_hcubature / 2 )
490490 / cdf;
491491 }
492- if (!is_constant_all<T_v>::value) {
492+ if constexpr (!is_constant_all<T_v>::value) {
493493 partials<4 >(ops_partials)[i]
494494 = internal::wiener7_integrate_cdf (
495495 [&](auto &&... args) {
@@ -500,7 +500,7 @@ inline auto wiener_lcdf_unnorm(const T_y& y, const T_a& a, const T_t0& t0,
500500 relative_error_hcubature / 2 )
501501 / cdf;
502502 }
503- if (!is_constant_all<T_sv>::value) {
503+ if constexpr (!is_constant_all<T_sv>::value) {
504504 if (sv_value == 0 ) {
505505 partials<5 >(ops_partials)[i] = 0 ;
506506 } else {
@@ -516,7 +516,7 @@ inline auto wiener_lcdf_unnorm(const T_y& y, const T_a& a, const T_t0& t0,
516516 / cdf;
517517 }
518518 }
519- if (!is_constant_all<T_sw>::value) {
519+ if constexpr (!is_constant_all<T_sw>::value) {
520520 if (sw_value == 0 ) {
521521 partials<6 >(ops_partials)[i] = 0 ;
522522 } else {
@@ -544,7 +544,7 @@ inline auto wiener_lcdf_unnorm(const T_y& y, const T_a& a, const T_t0& t0,
544544 partials<6 >(ops_partials)[i] = deriv;
545545 }
546546 }
547- if (!is_constant_all<T_st0>::value) {
547+ if constexpr (!is_constant_all<T_st0>::value) {
548548 if (st0_value == 0 ) {
549549 partials<7 >(ops_partials)[i] = 0 ;
550550 } else if (y_value - (t0_value + st0_value) <= 0 ) {
0 commit comments