Skip to content

Commit

Permalink
Add regex for osx
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronj0 committed Feb 27, 2024
1 parent a1edd5e commit ebcc253
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test/NthDerivative/CustomDerivatives.C
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// RUN: ./CustomDerivative.out | FileCheck -check-prefix=CHECK-EXEC %s
#include "clad/Differentiator/Differentiator.h"
#include "clad/Differentiator/BuiltinDerivatives.h"
#include "../TestUtils.h"

extern "C" int printf(const char* fmt, ...);

Expand Down Expand Up @@ -124,8 +125,8 @@ float test_exp(float x) {
// CHECK-NEXT:}

// CHECK: clad::ValueAndPushforward<ValueAndPushforward<float, float>, ValueAndPushforward<float, float> > exp_pushforward_pushforward(float x, float d_x, float _d_x, float _d_d_x) {
// CHECK-NEXT: ValueAndPushforward<float, float> _t0 = clad::custom_derivatives::std::exp_pushforward(x, _d_x);
// CHECK-NEXT: ValueAndPushforward<float, float> _t1 = clad::custom_derivatives::std::exp_pushforward(x, _d_x);
// CHECK-NEXT: {{(clad::)?}}ValueAndPushforward<float, float> _t0 = clad::custom_derivatives{{(::std)?}}::exp_pushforward(x, _d_x);
// CHECK-NEXT: {{(clad::)?}}ValueAndPushforward<float, float> _t1 = clad::custom_derivatives{{(::std)?}}::exp_pushforward(x, _d_x);
// CHECK-NEXT: float &_t2 = _t1.value;
// CHECK-NEXT: return {{[{][{]}}_t0.value, _t2 * d_x}, {_t0.pushforward, _t1.pushforward * d_x + _t2 * _d_d_x{{[}][}]}};
// CHECK-NEXT:}
Expand All @@ -135,8 +136,8 @@ float test_exp(float x) {
// CHECK-NEXT: float _d__d_x = 0;
// CHECK-NEXT: float _d_x0 = 1;
// CHECK-NEXT: clad::ValueAndPushforward<ValueAndPushforward<float, float>, ValueAndPushforward<float, float> > _t0 = exp_pushforward_pushforward(x * x, _d_x0 * x + x * _d_x0, _d_x * x + x * _d_x, _d__d_x * x + _d_x0 * _d_x + _d_x * _d_x0 + x * _d__d_x);
// CHECK-NEXT: ValueAndPushforward<float, float> _d__t0 = _t0.pushforward;
// CHECK-NEXT: ValueAndPushforward<float, float> _t00 = _t0.value;
// CHECK-NEXT: {{(clad::)?}}ValueAndPushforward<float, float> _d__t0 = _t0.pushforward;
// CHECK-NEXT: {{(clad::)?}}ValueAndPushforward<float, float> _t00 = _t0.value;
// CHECK-NEXT: return _d__t0.pushforward;
// CHECK-NEXT:}

Expand All @@ -163,7 +164,4 @@ int main() {
clad::differentiate<2>(test_exp);
printf("Result is = %f\n", test_exp_d2arg0(2)); // CHECK-EXEC: Result is = 982.766663

}



}

0 comments on commit ebcc253

Please sign in to comment.