Skip to content

Commit 949ce3a

Browse files
committed
[Math] Fix signature of custom Clad pullbacks
The `clad::array_ref` is not a thing anymore, and we need to change the signature to C-style arrays to work.
1 parent ba2e00f commit 949ce3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

math/mathcore/inc/Math/CladDerivator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ ValueAndPushforward<T, T> Hypot_pushforward(T x, T y, T d_x, T d_y)
126126
}
127127

128128
template <typename T, typename U>
129-
void Hypot_pullback(T x, T y, U p, clad::array_ref<T> d_x, clad::array_ref<T> d_y)
129+
void Hypot_pullback(T x, T y, U p, T *d_x, T *d_y)
130130
{
131131
T h = ::TMath::Hypot(x, y);
132132
*d_x += x / h * p;
@@ -162,7 +162,7 @@ ValueAndPushforward<T, T> Power_pushforward(T x, U y, T d_x, U d_y)
162162
}
163163

164164
template <typename T, typename U, typename V>
165-
void Power_pullback(T x, U y, V p, clad::array_ref<T> d_x, clad::array_ref<U> d_y)
165+
void Power_pullback(T x, U y, V p, T *d_x, U *d_y)
166166
{
167167
auto t = pow_pushforward(x, y, 1, 0);
168168
*d_x += t.pushforward * p;

0 commit comments

Comments
 (0)