Skip to content

Commit

Permalink
Fix Jacobian/testUtility test
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailMihov committed Mar 19, 2024
1 parent fabce83 commit 048a5f7
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions test/Jacobian/testUtility.C
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-tbr %s -I%S/../../include -otestUtility.out
// RUN: ./testUtility.out | FileCheck -check-prefix=CHECK-EXEC %s
// CHECK-NOT: {{.*error|warning|note:.*}}
// XFAIL: target={{i586.*}}

#include "clad/Differentiator/Differentiator.h"

Expand All @@ -25,16 +24,16 @@ void fn_mul(double i, double j, double *res) {
//CHECK-NEXT: res[1] = j * j;
//CHECK-NEXT: res[2] = i * j;
//CHECK-NEXT: {
//CHECK-NEXT: jacobianMatrix[4UL] += 1 * j;
//CHECK-NEXT: jacobianMatrix[5UL] += i * 1;
//CHECK-NEXT: jacobianMatrix[{{4U|4UL}}] += 1 * j;
//CHECK-NEXT: jacobianMatrix[{{5U|5UL}}] += i * 1;
//CHECK-NEXT: }
//CHECK-NEXT: {
//CHECK-NEXT: jacobianMatrix[3UL] += 1 * j;
//CHECK-NEXT: jacobianMatrix[3UL] += j * 1;
//CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += 1 * j;
//CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += j * 1;
//CHECK-NEXT: }
//CHECK-NEXT: {
//CHECK-NEXT: jacobianMatrix[0UL] += 1 * i;
//CHECK-NEXT: jacobianMatrix[0UL] += i * 1;
//CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += 1 * i;
//CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += i * 1;
//CHECK-NEXT: }
//CHECK-NEXT:}

Expand All @@ -50,23 +49,23 @@ void f_1(double x, double y, double z, double output[]) {
//CHECK-NEXT: output[1] = x * y * x + y * x * x;
//CHECK-NEXT: output[2] = z * x * 10 - y * z;
//CHECK-NEXT: {
//CHECK-NEXT: jacobianMatrix[8UL] += 1 * 10 * x;
//CHECK-NEXT: jacobianMatrix[6UL] += z * 1 * 10;
//CHECK-NEXT: jacobianMatrix[7UL] += -1 * z;
//CHECK-NEXT: jacobianMatrix[8UL] += y * -1;
//CHECK-NEXT: jacobianMatrix[{{8U|8UL}}] += 1 * 10 * x;
//CHECK-NEXT: jacobianMatrix[{{6U|6UL}}] += z * 1 * 10;
//CHECK-NEXT: jacobianMatrix[{{7U|7UL}}] += -1 * z;
//CHECK-NEXT: jacobianMatrix[{{8U|8UL}}] += y * -1;
//CHECK-NEXT: }
//CHECK-NEXT: {
//CHECK-NEXT: jacobianMatrix[3UL] += 1 * x * y;
//CHECK-NEXT: jacobianMatrix[4UL] += x * 1 * x;
//CHECK-NEXT: jacobianMatrix[3UL] += x * y * 1;
//CHECK-NEXT: jacobianMatrix[4UL] += 1 * x * x;
//CHECK-NEXT: jacobianMatrix[3UL] += y * 1 * x;
//CHECK-NEXT: jacobianMatrix[3UL] += y * x * 1;
//CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += 1 * x * y;
//CHECK-NEXT: jacobianMatrix[{{4U|4UL}}] += x * 1 * x;
//CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += x * y * 1;
//CHECK-NEXT: jacobianMatrix[{{4U|4UL}}] += 1 * x * x;
//CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += y * 1 * x;
//CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += y * x * 1;
//CHECK-NEXT: }
//CHECK-NEXT: {
//CHECK-NEXT: jacobianMatrix[0UL] += 1 * x * x;
//CHECK-NEXT: jacobianMatrix[0UL] += x * 1 * x;
//CHECK-NEXT: jacobianMatrix[0UL] += x * x * 1;
//CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += 1 * x * x;
//CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += x * 1 * x;
//CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += x * x * 1;
//CHECK-NEXT: }
//CHECK-NEXT:}

Expand Down

0 comments on commit 048a5f7

Please sign in to comment.