Skip to content

Commit

Permalink
Fix member ref base type
Browse files Browse the repository at this point in the history
- was incorrectly calling genfunc.execute() instead of genfunc
- Fixes #313
  • Loading branch information
aaronj0 committed Feb 24, 2024
1 parent ce3d193 commit a1edd5e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/NthDerivative/CustomDerivatives.C
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,20 @@ float test_exp_darg0(float x);
float test_exp_d2arg0(float x);

int main() {
auto fn1 = clad::differentiate<2>(test_sin);
printf("Result is = %f\n", fn1.execute(0.5)); // CHECK-EXEC: Result is = -0.479426
clad::differentiate<2>(test_sin);
printf("Result is = %f\n", test_sin_d2arg0(0.5)); // CHECK-EXEC: Result is = -0.479426

auto fn2 = clad::differentiate<2>(test_cos);
printf("Result is = %f\n", fn2.execute(1.0)); // CHECK-EXEC: Result is = -0.540302
clad::differentiate<2>(test_cos);
printf("Result is = %f\n", test_cos_d2arg0(1.0)); // CHECK-EXEC: Result is = -0.540302

auto fn3 = clad::differentiate<2>(test_trig, "x");
printf("Result is = %f\n", fn3.execute(0.5, 1.0, 1, 2)); // CHECK-EXEC: Result is = -2.364220
clad::differentiate<2>(test_trig, "x");
printf("Result is = %f\n", test_trig_d2arg0(0.5, 1.0, 1, 2)); // CHECK-EXEC: Result is = -2.364220

auto fn4 = clad::differentiate<2>(test_trig, "y");
printf("Result is = %f\n", fn4.execute(1.0, 0.5, 2, 1)); // CHECK-EXEC: Result is = -0.060237
clad::differentiate<2>(test_trig, "y");
printf("Result is = %f\n", test_trig_d2arg1(1.0, 0.5, 2, 1)); // CHECK-EXEC: Result is = -0.060237

auto fn5 = clad::differentiate<2>(test_exp);
printf("Result is = %f\n", fn5.execute(2)); // CHECK-EXEC: Result is = 982.766663
clad::differentiate<2>(test_exp);
printf("Result is = %f\n", test_exp_d2arg0(2)); // CHECK-EXEC: Result is = 982.766663

}

Expand Down

0 comments on commit a1edd5e

Please sign in to comment.