Skip to content

Commit 59fafbe

Browse files
authored
Merge pull request #1917 from andrjohns/feature/scalar_binary_complex
Extend binary vectorisation to complex inputs
2 parents 93898d0 + 7a44645 commit 59fafbe

70 files changed

Lines changed: 250 additions & 24 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

stan/math/fwd/functor.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef STAN_MATH_FWD_FUNCTOR_HPP
22
#define STAN_MATH_FWD_FUNCTOR_HPP
33

4+
#include <stan/math/fwd/functor/apply_scalar_unary.hpp>
45
#include <stan/math/fwd/functor/gradient.hpp>
56
#include <stan/math/fwd/functor/hessian.hpp>
67
#include <stan/math/fwd/functor/jacobian.hpp>

stan/math/fwd/meta/apply_scalar_unary.hpp renamed to stan/math/fwd/functor/apply_scalar_unary.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#ifndef STAN_MATH_FWD_META_APPLY_SCALAR_UNARY_HPP
2-
#define STAN_MATH_FWD_META_APPLY_SCALAR_UNARY_HPP
1+
#ifndef STAN_MATH_FWD_FUNCTOR_APPLY_SCALAR_UNARY_HPP
2+
#define STAN_MATH_FWD_FUNCTOR_APPLY_SCALAR_UNARY_HPP
33

4-
#include <stan/math/prim/meta/apply_scalar_unary.hpp>
4+
#include <stan/math/prim/functor/apply_scalar_unary.hpp>
55
#include <stan/math/fwd/core/fvar.hpp>
66

77
namespace stan {

stan/math/fwd/meta.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef STAN_MATH_FWD_META_HPP
22
#define STAN_MATH_FWD_META_HPP
33

4-
#include <stan/math/fwd/meta/apply_scalar_unary.hpp>
54
#include <stan/math/fwd/meta/is_fvar.hpp>
65
#include <stan/math/fwd/meta/partials_type.hpp>
76
#include <stan/math/fwd/meta/operands_and_partials.hpp>

stan/math/prim/fun/Phi.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <stan/math/prim/fun/erf.hpp>
88
#include <stan/math/prim/fun/erfc.hpp>
99
#include <stan/math/prim/fun/Phi.hpp>
10+
#include <stan/math/prim/functor/apply_scalar_unary.hpp>
1011

1112
namespace stan {
1213
namespace math {

stan/math/prim/fun/Phi_approx.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <stan/math/prim/meta.hpp>
55
#include <stan/math/prim/fun/inv_logit.hpp>
6+
#include <stan/math/prim/functor/apply_scalar_unary.hpp>
67
#include <cmath>
78

89
namespace stan {

stan/math/prim/fun/acos.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include <stan/math/prim/fun/isfinite.hpp>
1111
#include <stan/math/prim/fun/isnan.hpp>
1212
#include <stan/math/prim/fun/polar.hpp>
13+
#include <stan/math/prim/functor/apply_scalar_unary.hpp>
14+
#include <stan/math/prim/functor/apply_vector_unary.hpp>
1315
#include <cmath>
1416
#include <complex>
1517

stan/math/prim/fun/acosh.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <stan/math/prim/fun/is_nan.hpp>
99
#include <stan/math/prim/fun/log.hpp>
1010
#include <stan/math/prim/fun/sqrt.hpp>
11+
#include <stan/math/prim/functor/apply_scalar_unary.hpp>
1112
#include <cmath>
1213
#include <complex>
1314

stan/math/prim/fun/asin.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <stan/math/prim/fun/Eigen.hpp>
99
#include <stan/math/prim/fun/i_times.hpp>
1010
#include <stan/math/prim/fun/value_of_rec.hpp>
11+
#include <stan/math/prim/functor/apply_scalar_unary.hpp>
12+
#include <stan/math/prim/functor/apply_vector_unary.hpp>
1113
#include <cmath>
1214
#include <complex>
1315

stan/math/prim/fun/asinh.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <stan/math/prim/fun/polar.hpp>
1414
#include <stan/math/prim/fun/sqrt.hpp>
1515
#include <stan/math/prim/fun/value_of_rec.hpp>
16+
#include <stan/math/prim/functor/apply_scalar_unary.hpp>
1617
#include <cmath>
1718
#include <complex>
1819

stan/math/prim/fun/atan.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include <stan/math/prim/fun/atanh.hpp>
77
#include <stan/math/prim/fun/Eigen.hpp>
88
#include <stan/math/prim/fun/i_times.hpp>
9+
#include <stan/math/prim/functor/apply_scalar_unary.hpp>
10+
#include <stan/math/prim/functor/apply_vector_unary.hpp>
911
#include <cmath>
1012
#include <complex>
1113

0 commit comments

Comments
 (0)