diff --git a/test/Jacobian/Functors.C b/test/Jacobian/Functors.C index bc80ea36c..001ac66ce 100644 --- a/test/Jacobian/Functors.C +++ b/test/Jacobian/Functors.C @@ -3,7 +3,6 @@ // RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-tbr %s -I%S/../../include -oFunctors.out // RUN: ./Functors.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -22,14 +21,14 @@ struct Experiment { // CHECK-NEXT: output[0] = this->x * i * i * j; // CHECK-NEXT: output[1] = this->y * i * j * j; // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[2UL] += this->y * 1 * j * j; - // CHECK-NEXT: jacobianMatrix[3UL] += this->y * i * 1 * j; - // CHECK-NEXT: jacobianMatrix[3UL] += this->y * i * j * 1; + // CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += this->y * 1 * j * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += this->y * i * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += this->y * i * j * 1; // CHECK-NEXT: } // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[0UL] += this->x * 1 * j * i; - // CHECK-NEXT: jacobianMatrix[0UL] += this->x * i * 1 * j; - // CHECK-NEXT: jacobianMatrix[1UL] += this->x * i * i * 1; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += this->x * 1 * j * i; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += this->x * i * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += this->x * i * i * 1; // CHECK-NEXT: } // CHECK-NEXT: } }; @@ -49,14 +48,14 @@ struct ExperimentConst { // CHECK-NEXT: output[0] = this->x * i * i * j; // CHECK-NEXT: output[1] = this->y * i * j * j; // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[2UL] += this->y * 1 * j * j; - // CHECK-NEXT: jacobianMatrix[3UL] += this->y * i * 1 * j; - // CHECK-NEXT: jacobianMatrix[3UL] += this->y * i * j * 1; + // CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += this->y * 1 * j * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += this->y * i * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += this->y * i * j * 1; // CHECK-NEXT: } // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[0UL] += this->x * 1 * j * i; - // CHECK-NEXT: jacobianMatrix[0UL] += this->x * i * 1 * j; - // CHECK-NEXT: jacobianMatrix[1UL] += this->x * i * i * 1; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += this->x * 1 * j * i; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += this->x * i * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += this->x * i * i * 1; // CHECK-NEXT: } // CHECK-NEXT: } }; @@ -80,14 +79,14 @@ struct ExperimentVolatile { // CHECK-NEXT: _t1 = this->y * i; // CHECK-NEXT: output[1] = this->y * i * j * j; // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[2UL] += this->y * 1 * j * j; - // CHECK-NEXT: jacobianMatrix[3UL] += _t1 * 1 * j; - // CHECK-NEXT: jacobianMatrix[3UL] += _t1 * j * 1; + // CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += this->y * 1 * j * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += _t1 * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += _t1 * j * 1; // CHECK-NEXT: } // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[0UL] += this->x * 1 * j * i; - // CHECK-NEXT: jacobianMatrix[0UL] += _t0 * 1 * j; - // CHECK-NEXT: jacobianMatrix[1UL] += _t0 * i * 1; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += this->x * 1 * j * i; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += _t0 * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += _t0 * i * 1; // CHECK-NEXT: } // CHECK-NEXT: } }; @@ -111,14 +110,14 @@ struct ExperimentConstVolatile { // CHECK-NEXT: _t1 = this->y * i; // CHECK-NEXT: output[1] = this->y * i * j * j; // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[2UL] += this->y * 1 * j * j; - // CHECK-NEXT: jacobianMatrix[3UL] += _t1 * 1 * j; - // CHECK-NEXT: jacobianMatrix[3UL] += _t1 * j * 1; + // CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += this->y * 1 * j * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += _t1 * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += _t1 * j * 1; // CHECK-NEXT: } // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[0UL] += this->x * 1 * j * i; - // CHECK-NEXT: jacobianMatrix[0UL] += _t0 * 1 * j; - // CHECK-NEXT: jacobianMatrix[1UL] += _t0 * i * 1; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += this->x * 1 * j * i; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += _t0 * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += _t0 * i * 1; // CHECK-NEXT: } // CHECK-NEXT: } }; @@ -140,14 +139,14 @@ namespace outer { // CHECK-NEXT: output[0] = this->x * i * i * j; // CHECK-NEXT: output[1] = this->y * i * j * j; // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[2UL] += this->y * 1 * j * j; - // CHECK-NEXT: jacobianMatrix[3UL] += this->y * i * 1 * j; - // CHECK-NEXT: jacobianMatrix[3UL] += this->y * i * j * 1; + // CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += this->y * 1 * j * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += this->y * i * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += this->y * i * j * 1; // CHECK-NEXT: } // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[0UL] += this->x * 1 * j * i; - // CHECK-NEXT: jacobianMatrix[0UL] += this->x * i * 1 * j; - // CHECK-NEXT: jacobianMatrix[1UL] += this->x * i * i * 1; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += this->x * 1 * j * i; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += this->x * i * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += this->x * i * i * 1; // CHECK-NEXT: } // CHECK-NEXT: } }; @@ -161,14 +160,14 @@ namespace outer { // CHECK-NEXT: output[0] = i * i * j; // CHECK-NEXT: output[1] = i * j * j; // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[2UL] += 1 * j * j; - // CHECK-NEXT: jacobianMatrix[3UL] += i * 1 * j; - // CHECK-NEXT: jacobianMatrix[3UL] += i * j * 1; + // CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += 1 * j * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += i * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += i * j * 1; // CHECK-NEXT: } // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[0UL] += 1 * j * i; - // CHECK-NEXT: jacobianMatrix[0UL] += i * 1 * j; - // CHECK-NEXT: jacobianMatrix[1UL] += i * i * 1; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += 1 * j * i; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += i * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += i * i * 1; // CHECK-NEXT: } // CHECK-NEXT: } } @@ -210,14 +209,14 @@ int main() { // CHECK-NEXT: output[0] = i * i * j; // CHECK-NEXT: output[1] = i * j * j; // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[2UL] += 1 * j * j; - // CHECK-NEXT: jacobianMatrix[3UL] += i * 1 * j; - // CHECK-NEXT: jacobianMatrix[3UL] += i * j * 1; + // CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += 1 * j * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += i * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += i * j * 1; // CHECK-NEXT: } // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[0UL] += 1 * j * i; - // CHECK-NEXT: jacobianMatrix[0UL] += i * 1 * j; - // CHECK-NEXT: jacobianMatrix[1UL] += i * i * 1; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += 1 * j * i; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += i * 1 * j; + // CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += i * i * 1; // CHECK-NEXT: } // CHECK-NEXT: } @@ -230,14 +229,14 @@ int main() { // CHECK-NEXT: output[0] = x * i * i * jj; // CHECK-NEXT: output[1] = y * i * jj * jj; // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[2UL] += y * 1 * jj * jj; - // CHECK-NEXT: jacobianMatrix[3UL] += y * i * 1 * jj; - // CHECK-NEXT: jacobianMatrix[3UL] += y * i * jj * 1; + // CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += y * 1 * jj * jj; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += y * i * 1 * jj; + // CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += y * i * jj * 1; // CHECK-NEXT: } // CHECK-NEXT: { - // CHECK-NEXT: jacobianMatrix[0UL] += x * 1 * jj * i; - // CHECK-NEXT: jacobianMatrix[0UL] += x * i * 1 * jj; - // CHECK-NEXT: jacobianMatrix[1UL] += x * i * i * 1; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += x * 1 * jj * i; + // CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += x * i * 1 * jj; + // CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += x * i * i * 1; // CHECK-NEXT: } // CHECK-NEXT: } @@ -282,4 +281,4 @@ int main() { TEST(E_NNS); // CHECK-EXEC: {756.00, 294.00, 405.00, 630.00}, {756.00, 294.00, 405.00, 630.00} TEST(E_NNS_Again); // CHECK-EXEC: {756.00, 294.00, 405.00, 630.00}, {756.00, 294.00, 405.00, 630.00} TEST(lambdaWithCapture); // CHECK-EXEC: {756.00, 294.00, 405.00, 630.00}, {756.00, 294.00, 405.00, 630.00} -} \ No newline at end of file +}