From ecf44c81f438fdd57fcb7ecf45345a6de7ad4899 Mon Sep 17 00:00:00 2001 From: Mihail Mihov Date: Tue, 19 Mar 2024 22:19:26 +0200 Subject: [PATCH] Fix tests on i586 --- test/Arrays/ArrayInputsReverseMode.C | 35 ++-- test/Arrays/ArrayInputsVectorForwardMode.C | 30 ++-- test/Arrays/Arrays.C | 5 +- test/ErrorEstimation/LoopsAndArrays.C | 9 +- test/ErrorEstimation/LoopsAndArraysExec.C | 11 +- test/FirstDerivative/BasicArithmeticMulDiv.C | 7 +- test/ForwardMode/VectorMode.C | 118 ++++++------- test/ForwardMode/VectorModeInterface.C | 26 +-- test/Gradient/Assignments.C | 5 +- test/Gradient/FunctionCalls.C | 11 +- test/Gradient/Gradients.C | 9 +- test/Gradient/Loops.C | 169 +++++++++---------- test/Gradient/Pointers.C | 4 +- test/Gradient/Switch.C | 83 +++++---- test/Gradient/SwitchInit.C | 13 +- test/Gradient/TestTypeConversion.C | 3 +- test/Gradient/UserDefinedTypes.C | 10 +- test/Hessian/Arrays.C | 16 +- test/Hessian/BuiltinDerivatives.C | 15 +- test/Hessian/Functors.C | 34 ++-- test/Hessian/Hessians.C | 27 ++- test/Hessian/NestedFunctionCalls.C | 5 +- test/Hessian/Pointers.C | 5 +- test/Hessian/TemplateFunctors.C | 9 +- test/Hessian/constexprTest.C | 11 +- test/Hessian/testhessUtility.C | 13 +- test/Jacobian/FunctionCalls.C | 11 +- test/Jacobian/Functors.C | 99 ++++++----- test/Jacobian/Jacobian.C | 61 ++++--- test/Jacobian/Pointers.C | 7 +- test/Jacobian/TemplateFunctors.C | 23 ++- test/Jacobian/constexprTest.C | 41 +++-- test/Jacobian/testUtility.C | 39 +++-- test/Misc/RunDemos.C | 9 +- 34 files changed, 472 insertions(+), 501 deletions(-) diff --git a/test/Arrays/ArrayInputsReverseMode.C b/test/Arrays/ArrayInputsReverseMode.C index 4fd6b6611..d16e3da42 100644 --- a/test/Arrays/ArrayInputsReverseMode.C +++ b/test/Arrays/ArrayInputsReverseMode.C @@ -5,7 +5,6 @@ //CHECK-NOT: {{.*error|warning|note:.*}} // XFAIL: asserts -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -19,7 +18,7 @@ double addArr(const double *arr, int n) { //CHECK: void addArr_pullback(const double *arr, int n, double _d_y, double *_d_arr, int *_d_n) { //CHECK-NEXT: double _d_ret = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -67,7 +66,7 @@ float func(float* a, float* b) { //CHECK: void func_grad(float *a, float *b, float *_d_a, float *_d_b) { //CHECK-NEXT: float _d_sum = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -120,7 +119,7 @@ float func2(float* a) { //CHECK: void func2_grad(float *a, float *_d_a) { //CHECK-NEXT: float _d_sum = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -153,7 +152,7 @@ float func3(float* a, float* b) { //CHECK: void func3_grad(float *a, float *b, float *_d_a, float *_d_b) { //CHECK-NEXT: float _d_sum = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -190,9 +189,9 @@ double func4(double x) { } //CHECK: void func4_grad(double x, double *_d_x) { -//CHECK-NEXT: clad::array _d_arr(3UL); +//CHECK-NEXT: clad::array _d_arr({{3U|3UL}}); //CHECK-NEXT: double _d_sum = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -239,12 +238,12 @@ double func5(int k) { //CHECK: void func5_grad(int k, int *_d_k) { //CHECK-NEXT: int _d_n = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; //CHECK-NEXT: double _d_sum = 0; -//CHECK-NEXT: unsigned long _t2; +//CHECK-NEXT: unsigned {{int|long}} _t2; //CHECK-NEXT: int _d_i0 = 0; //CHECK-NEXT: int i0 = 0; //CHECK-NEXT: clad::tape _t3 = {}; @@ -300,12 +299,12 @@ double func6(double seed) { //CHECK: void func6_grad(double seed, double *_d_seed) { //CHECK-NEXT: double _d_sum = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape > _t1 = {}; -//CHECK-NEXT: clad::array _d_arr(3UL); -//CHECK-NEXT: clad::array arr(3UL); +//CHECK-NEXT: clad::array _d_arr({{3U|3UL}}); +//CHECK-NEXT: clad::array arr({{3U|3UL}}); //CHECK-NEXT: clad::tape _t2 = {}; //CHECK-NEXT: double sum = 0; //CHECK-NEXT: _t0 = 0; @@ -365,12 +364,12 @@ double func7(double *params) { //CHECK: void func7_grad(double *params, double *_d_params) { //CHECK-NEXT: double _d_out = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: std::size_t _d_i = 0; //CHECK-NEXT: std::size_t i = 0; //CHECK-NEXT: clad::tape > _t1 = {}; -//CHECK-NEXT: clad::array _d_paramsPrime(1UL); -//CHECK-NEXT: clad::array paramsPrime(1UL); +//CHECK-NEXT: clad::array _d_paramsPrime({{1U|1UL}}); +//CHECK-NEXT: clad::array paramsPrime({{1U|1UL}}); //CHECK-NEXT: clad::tape _t2 = {}; //CHECK-NEXT: double out = 0.; //CHECK-NEXT: _t0 = 0; @@ -484,8 +483,8 @@ double func9(double i, double j) { //CHECK: void func9_grad(double i, double j, double *_d_i, double *_d_j) { -//CHECK-NEXT: clad::array _d_arr(5UL); -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: clad::array _d_arr({{5U|5UL}}); +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_idx = 0; //CHECK-NEXT: int idx = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -549,7 +548,7 @@ double func10(double *arr, int n) { //CHECK: void func10_grad_0(double *arr, int n, double *_d_arr) { //CHECK-NEXT: int _d_n = 0; //CHECK-NEXT: double _d_res = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; diff --git a/test/Arrays/ArrayInputsVectorForwardMode.C b/test/Arrays/ArrayInputsVectorForwardMode.C index 98230abbd..50f25739d 100644 --- a/test/Arrays/ArrayInputsVectorForwardMode.C +++ b/test/Arrays/ArrayInputsVectorForwardMode.C @@ -12,11 +12,11 @@ double multiply(const double *arr) { } // CHECK: void multiply_dvec(const double *arr, clad::array_ref _d_arr) { -// CHECK-NEXT: unsigned long indepVarCount = _d_arr.size(); -// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, 0UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_arr.size(); +// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL}}); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, (_d_vector_arr[0]) * arr[1] + arr[0] * (_d_vector_arr[1]))); -// CHECK-NEXT: _d_arr = _d_vector_return.slice(0UL, _d_arr.size()); +// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL}}, _d_arr.size()); // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -26,11 +26,11 @@ double divide(double *arr) { } // CHECK: void divide_dvec(double *arr, clad::array_ref _d_arr) { -// CHECK-NEXT: unsigned long indepVarCount = _d_arr.size(); -// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, 0UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_arr.size(); +// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL}}); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, ((_d_vector_arr[0]) * arr[1] - arr[0] * (_d_vector_arr[1])) / (arr[1] * arr[1]))); -// CHECK-NEXT: _d_arr = _d_vector_return.slice(0UL, _d_arr.size()); +// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL}}, _d_arr.size()); // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -44,8 +44,8 @@ double addArr(const double *arr, int n) { } // CHECK: void addArr_dvec_0(const double *arr, int n, clad::array_ref _d_arr) { -// CHECK-NEXT: unsigned long indepVarCount = _d_arr.size(); -// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, 0UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_arr.size(); +// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL}}); // CHECK-NEXT: clad::array _d_vector_n = clad::zero_vector(indepVarCount); // CHECK-NEXT: clad::array _d_vector_ret(clad::array(indepVarCount, 0)); // CHECK-NEXT: double ret = 0; @@ -58,7 +58,7 @@ double addArr(const double *arr, int n) { // CHECK-NEXT: } // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, _d_vector_ret)); -// CHECK-NEXT: _d_arr = _d_vector_return.slice(0UL, _d_arr.size()); +// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL}}, _d_arr.size()); // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -76,11 +76,11 @@ double maskedSum(const double *arr, int n, int *signedMask, double alpha, double } // CHECK: void maskedSum_dvec_0_3_4(const double *arr, int n, int *signedMask, double alpha, double beta, clad::array_ref _d_arr, double *_d_alpha, double *_d_beta) { -// CHECK-NEXT: unsigned long indepVarCount = _d_arr.size() + 2UL; -// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, 0UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_arr.size() + {{2U|2UL}}; +// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL}}); // CHECK-NEXT: clad::array _d_vector_n = clad::zero_vector(indepVarCount); // CHECK-NEXT: clad::array _d_vector_alpha = clad::one_hot_vector(indepVarCount, _d_arr.size()); -// CHECK-NEXT: clad::array _d_vector_beta = clad::one_hot_vector(indepVarCount, _d_arr.size() + 1UL); +// CHECK-NEXT: clad::array _d_vector_beta = clad::one_hot_vector(indepVarCount, _d_arr.size() + {{1U|1UL}}); // CHECK-NEXT: clad::array _d_vector_ret(clad::array(indepVarCount, 0)); // CHECK-NEXT: double ret = 0; // CHECK-NEXT: { @@ -97,9 +97,9 @@ double maskedSum(const double *arr, int n, int *signedMask, double alpha, double // CHECK-NEXT: } // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, _d_vector_ret)); -// CHECK-NEXT: _d_arr = _d_vector_return.slice(0UL, _d_arr.size()); +// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL}}, _d_arr.size()); // CHECK-NEXT: *_d_alpha = _d_vector_return[_d_arr.size()]; -// CHECK-NEXT: *_d_beta = _d_vector_return[_d_arr.size() + 1UL]; +// CHECK-NEXT: *_d_beta = _d_vector_return[_d_arr.size() + {{1U|1UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -142,4 +142,4 @@ int main() { printf("Result (d_alpha, d_beta) = (%.2f, %.2f)\n", dalpha, dbeta); // CHECK-EXEC: Result (d_alpha, d_beta) = (4.00, -2.00) return 0; -} \ No newline at end of file +} diff --git a/test/Arrays/Arrays.C b/test/Arrays/Arrays.C index bd78df8b5..05e694c76 100644 --- a/test/Arrays/Arrays.C +++ b/test/Arrays/Arrays.C @@ -4,7 +4,6 @@ // RUN: ./Arrays.out | FileCheck -check-prefix=CHECK-EXEC %s //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" #include @@ -93,8 +92,8 @@ double const_dot_product(double x, double y, double z) { //CHECK-NEXT: } //CHECK: void const_dot_product_grad(double x, double y, double z, double *_d_x, double *_d_y, double *_d_z) { -//CHECK-NEXT: clad::array _d_vars(3UL); -//CHECK-NEXT: clad::array _d_consts(3UL); +//CHECK-NEXT: clad::array _d_vars({{3U|3UL}}); +//CHECK-NEXT: clad::array _d_consts({{3U|3UL}}); //CHECK-NEXT: double vars[3] = {x, y, z}; //CHECK-NEXT: double consts[3] = {1, 2, 3}; //CHECK-NEXT: goto _label0; diff --git a/test/ErrorEstimation/LoopsAndArrays.C b/test/ErrorEstimation/LoopsAndArrays.C index cac8ffb0a..5ef6ff9b5 100644 --- a/test/ErrorEstimation/LoopsAndArrays.C +++ b/test/ErrorEstimation/LoopsAndArrays.C @@ -1,6 +1,5 @@ // RUN: %cladclang -I%S/../../include -oLoopsAndArrays.out %s 2>&1 | FileCheck %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -17,7 +16,7 @@ float func(float* p, int n) { //CHECK: void func_grad(float *p, int n, float *_d_p, int *_d_n, double &_final_error) { //CHECK-NEXT: float _d_sum = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -60,7 +59,7 @@ float func2(float x) { //CHECK: void func2_grad(float x, float *_d_x, double &_final_error) { //CHECK-NEXT: float _d_z = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -108,7 +107,7 @@ float func3(float x, float y) { } //CHECK: void func3_grad(float x, float y, float *_d_x, float *_d_y, double &_final_error) { -//CHECK-NEXT: clad::array _d_arr(3UL); +//CHECK-NEXT: clad::array _d_arr({{3U|3UL}}); //CHECK-NEXT: double _t0; //CHECK-NEXT: double _t1; //CHECK-NEXT: double _t2; @@ -161,7 +160,7 @@ float func4(float x[10], float y[10]) { //CHECK: void func4_grad(float x[10], float y[10], float *_d_x, float *_d_y, double &_final_error) { //CHECK-NEXT: float _d_sum = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: unsigned long x_size = 0; diff --git a/test/ErrorEstimation/LoopsAndArraysExec.C b/test/ErrorEstimation/LoopsAndArraysExec.C index 64ad175e1..b65d54e2f 100644 --- a/test/ErrorEstimation/LoopsAndArraysExec.C +++ b/test/ErrorEstimation/LoopsAndArraysExec.C @@ -2,7 +2,6 @@ // RUN: ./LoopsAndArraysExec.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -18,7 +17,7 @@ double runningSum(float* f, int n) { //CHECK: void runningSum_grad(float *f, int n, float *_d_f, int *_d_n, double &_final_error) { //CHECK-NEXT: double _d_sum = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -62,10 +61,10 @@ double mulSum(float* a, float* b, int n) { //CHECK: void mulSum_grad(float *a, float *b, int n, float *_d_a, float *_d_b, int *_d_n, double &_final_error) { //CHECK-NEXT: double _d_sum = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; -//CHECK-NEXT: clad::tape _t1 = {}; +//CHECK-NEXT: clad::tape _t1 = {}; //CHECK-NEXT: clad::tape _t2 = {}; //CHECK-NEXT: int _d_j = 0; //CHECK-NEXT: int j = 0; @@ -76,7 +75,7 @@ double mulSum(float* a, float* b, int n) { //CHECK-NEXT: _t0 = 0; //CHECK-NEXT: for (i = 0; i < n; i++) { //CHECK-NEXT: _t0++; -//CHECK-NEXT: clad::push(_t1, 0UL); +//CHECK-NEXT: clad::push(_t1, {{0U|0UL}}); //CHECK-NEXT: for (clad::push(_t2, j) , j = 0; j < n; j++) { //CHECK-NEXT: clad::back(_t1)++; //CHECK-NEXT: clad::push(_t3, sum); @@ -125,7 +124,7 @@ double divSum(float* a, float* b, int n) { //CHECK: void divSum_grad(float *a, float *b, int n, float *_d_a, float *_d_b, int *_d_n, double &_final_error) { //CHECK-NEXT: double _d_sum = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; diff --git a/test/FirstDerivative/BasicArithmeticMulDiv.C b/test/FirstDerivative/BasicArithmeticMulDiv.C index 1362708c3..b02506b36 100644 --- a/test/FirstDerivative/BasicArithmeticMulDiv.C +++ b/test/FirstDerivative/BasicArithmeticMulDiv.C @@ -2,7 +2,6 @@ // RUN: ./BasicArithmeticMulDiv.out | FileCheck -check-prefix=CHECK-EXEC %s //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -116,9 +115,9 @@ double m_11(double x) { // CHECK-NEXT: double _d_x = 1; // CHECK-NEXT: const size_t _d_maxN = 0; // CHECK-NEXT: const size_t maxN = 53; -// CHECK-NEXT: bool _t0 = maxN < 64UL; -// CHECK-NEXT: const size_t _d_m = _t0 ? _d_maxN : 0UL; -// CHECK-NEXT: const size_t m = _t0 ? maxN : 64UL; +// CHECK-NEXT: bool _t0 = maxN < {{64U|64UL}}; +// CHECK-NEXT: const size_t _d_m = _t0 ? _d_maxN : {{0U|0UL}}; +// CHECK-NEXT: const size_t m = _t0 ? maxN : {{64U|64UL}}; // CHECK-NEXT: return _d_x * m + x * _d_m; // CHECK-NEXT: } diff --git a/test/ForwardMode/VectorMode.C b/test/ForwardMode/VectorMode.C index 17be014da..7a743e1db 100644 --- a/test/ForwardMode/VectorMode.C +++ b/test/ForwardMode/VectorMode.C @@ -14,15 +14,15 @@ double f1(double x, double y) { void f1_dvec(double x, double y, double *_d_x, double *_d_y); // CHECK: void f1_dvec(double x, double y, double *_d_x, double *_d_y) { -// CHECK-NEXT: unsigned long indepVarCount = 2UL; -// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, 0UL); -// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, 1UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{2U|2UL}}; +// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); +// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); // CHECK-NEXT: double _t0 = x * y; // CHECK-NEXT: double _t1 = (x + y + 1); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, (_d_vector_x * y + x * _d_vector_y) * _t1 + _t0 * (_d_vector_x + _d_vector_y + 0))); -// CHECK-NEXT: *_d_x = _d_vector_return[0UL]; -// CHECK-NEXT: *_d_y = _d_vector_return[1UL]; +// CHECK-NEXT: *_d_x = _d_vector_return[{{0U|0UL}}]; +// CHECK-NEXT: *_d_y = _d_vector_return[{{1U|1UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -37,17 +37,17 @@ double f2(double x, double y) { void f2_dvec(double x, double y, double *_d_x, double *_d_y); // CHECK: void f2_dvec(double x, double y, double *_d_x, double *_d_y) { -// CHECK-NEXT: unsigned long indepVarCount = 2UL; -// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, 0UL); -// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, 1UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{2U|2UL}}; +// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); +// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); // CHECK-NEXT: clad::array _d_vector_temp1(clad::array(indepVarCount, _d_vector_x * y + x * _d_vector_y)); // CHECK-NEXT: double temp1 = x * y; // CHECK-NEXT: clad::array _d_vector_temp2(clad::array(indepVarCount, _d_vector_x + _d_vector_y + 0)); // CHECK-NEXT: double temp2 = x + y + 1; // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, _d_vector_temp1 * temp2 + temp1 * _d_vector_temp2)); -// CHECK-NEXT: *_d_x = _d_vector_return[0UL]; -// CHECK-NEXT: *_d_y = _d_vector_return[1UL]; +// CHECK-NEXT: *_d_x = _d_vector_return[{{0U|0UL}}]; +// CHECK-NEXT: *_d_y = _d_vector_return[{{1U|1UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -63,9 +63,9 @@ double f3(double x, double y) { void f3_dvec(double x, double y, double *_d_x, double *_d_y); // CHECK: void f3_dvec(double x, double y, double *_d_x, double *_d_y) { -// CHECK-NEXT: unsigned long indepVarCount = 2UL; -// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, 0UL); -// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, 1UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{2U|2UL}}; +// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); +// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); // CHECK-NEXT: if (y < 0) { // CHECK-NEXT: _d_vector_y = - _d_vector_y; // CHECK-NEXT: y = -y; @@ -74,8 +74,8 @@ void f3_dvec(double x, double y, double *_d_x, double *_d_y); // CHECK-NEXT: y += 1; // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, _d_vector_x * y + x * _d_vector_y)); -// CHECK-NEXT: *_d_x = _d_vector_return[0UL]; -// CHECK-NEXT: *_d_y = _d_vector_return[1UL]; +// CHECK-NEXT: *_d_x = _d_vector_return[{{0U|0UL}}]; +// CHECK-NEXT: *_d_y = _d_vector_return[{{1U|1UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -94,9 +94,9 @@ double f4(double lower, double upper) { void f4_dvec(double lower, double upper, double *_d_lower, double *_d_upper); // CHECK: void f4_dvec(double lower, double upper, double *_d_lower, double *_d_upper) { -// CHECK-NEXT: unsigned long indepVarCount = 2UL; -// CHECK-NEXT: clad::array _d_vector_lower = clad::one_hot_vector(indepVarCount, 0UL); -// CHECK-NEXT: clad::array _d_vector_upper = clad::one_hot_vector(indepVarCount, 1UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{2U|2UL}}; +// CHECK-NEXT: clad::array _d_vector_lower = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); +// CHECK-NEXT: clad::array _d_vector_upper = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); // CHECK-NEXT: clad::array _d_vector_sum(clad::array(indepVarCount, 0)); // CHECK-NEXT: double sum = 0; // CHECK-NEXT: clad::array _d_vector_num_points(clad::array(indepVarCount, 0)); @@ -114,8 +114,8 @@ void f4_dvec(double lower, double upper, double *_d_lower, double *_d_upper); // CHECK-NEXT: } // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, _d_vector_sum)); -// CHECK-NEXT: *_d_lower = _d_vector_return[0UL]; -// CHECK-NEXT: *_d_upper = _d_vector_return[1UL]; +// CHECK-NEXT: *_d_lower = _d_vector_return[{{0U|0UL}}]; +// CHECK-NEXT: *_d_upper = _d_vector_return[{{1U|1UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -126,70 +126,70 @@ double f5(double x, double y, double z) { // all // CHECK: void f5_dvec(double x, double y, double z, double *_d_x, double *_d_y, double *_d_z) { -// CHECK-NEXT: unsigned long indepVarCount = 3UL; -// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, 0UL); -// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, 1UL); -// CHECK-NEXT: clad::array _d_vector_z = clad::one_hot_vector(indepVarCount, 2UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{3U|3UL}}; +// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); +// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); +// CHECK-NEXT: clad::array _d_vector_z = clad::one_hot_vector(indepVarCount, {{2U|2UL}}); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, 0. * x + 1. * _d_vector_x + 0. * y + 2. * _d_vector_y + 0. * z + 3. * _d_vector_z)); -// CHECK-NEXT: *_d_x = _d_vector_return[0UL]; -// CHECK-NEXT: *_d_y = _d_vector_return[1UL]; -// CHECK-NEXT: *_d_z = _d_vector_return[2UL]; +// CHECK-NEXT: *_d_x = _d_vector_return[{{0U|0UL}}]; +// CHECK-NEXT: *_d_y = _d_vector_return[{{1U|1UL}}]; +// CHECK-NEXT: *_d_z = _d_vector_return[{{2U|2UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } // x, y // CHECK: void f5_dvec_0_1(double x, double y, double z, double *_d_x, double *_d_y) { -// CHECK-NEXT: unsigned long indepVarCount = 2UL; -// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, 0UL); -// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, 1UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{2U|2UL}}; +// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); +// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); // CHECK-NEXT: clad::array _d_vector_z = clad::zero_vector(indepVarCount); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, 0. * x + 1. * _d_vector_x + 0. * y + 2. * _d_vector_y + 0. * z + 3. * _d_vector_z)); -// CHECK-NEXT: *_d_x = _d_vector_return[0UL]; -// CHECK-NEXT: *_d_y = _d_vector_return[1UL]; +// CHECK-NEXT: *_d_x = _d_vector_return[{{0U|0UL}}]; +// CHECK-NEXT: *_d_y = _d_vector_return[{{1U|1UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } // x, z // CHECK: void f5_dvec_0_2(double x, double y, double z, double *_d_x, double *_d_z) { -// CHECK-NEXT: unsigned long indepVarCount = 2UL; -// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, 0UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{2U|2UL}}; +// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); // CHECK-NEXT: clad::array _d_vector_y = clad::zero_vector(indepVarCount); -// CHECK-NEXT: clad::array _d_vector_z = clad::one_hot_vector(indepVarCount, 1UL); +// CHECK-NEXT: clad::array _d_vector_z = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, 0. * x + 1. * _d_vector_x + 0. * y + 2. * _d_vector_y + 0. * z + 3. * _d_vector_z)); -// CHECK-NEXT: *_d_x = _d_vector_return[0UL]; -// CHECK-NEXT: *_d_z = _d_vector_return[1UL]; +// CHECK-NEXT: *_d_x = _d_vector_return[{{0U|0UL}}]; +// CHECK-NEXT: *_d_z = _d_vector_return[{{1U|1UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } // y, z // CHECK: void f5_dvec_1_2(double x, double y, double z, double *_d_y, double *_d_z) { -// CHECK-NEXT: unsigned long indepVarCount = 2UL; +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{2U|2UL}}; // CHECK-NEXT: clad::array _d_vector_x = clad::zero_vector(indepVarCount); -// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, 0UL); -// CHECK-NEXT: clad::array _d_vector_z = clad::one_hot_vector(indepVarCount, 1UL); +// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); +// CHECK-NEXT: clad::array _d_vector_z = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, 0. * x + 1. * _d_vector_x + 0. * y + 2. * _d_vector_y + 0. * z + 3. * _d_vector_z)); -// CHECK-NEXT: *_d_y = _d_vector_return[0UL]; -// CHECK-NEXT: *_d_z = _d_vector_return[1UL]; +// CHECK-NEXT: *_d_y = _d_vector_return[{{0U|0UL}}]; +// CHECK-NEXT: *_d_z = _d_vector_return[{{1U|1UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } // z // CHECK: void f5_dvec_2(double x, double y, double z, double *_d_z) { -// CHECK-NEXT: unsigned long indepVarCount = 1UL; +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{1U|1UL}}; // CHECK-NEXT: clad::array _d_vector_x = clad::zero_vector(indepVarCount); // CHECK-NEXT: clad::array _d_vector_y = clad::zero_vector(indepVarCount); -// CHECK-NEXT: clad::array _d_vector_z = clad::one_hot_vector(indepVarCount, 0UL); +// CHECK-NEXT: clad::array _d_vector_z = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, 0. * x + 1. * _d_vector_x + 0. * y + 2. * _d_vector_y + 0. * z + 3. * _d_vector_z)); -// CHECK-NEXT: *_d_z = _d_vector_return[0UL]; +// CHECK-NEXT: *_d_z = _d_vector_return[{{0U|0UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -200,7 +200,7 @@ double square(const double& x) { } // CHECK: clad::ValueAndPushforward > square_vector_pushforward(const double &x, const clad::array &_d_x) { -// CHECK-NEXT: unsigned long indepVarCount = _d_x.size(); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_x.size(); // CHECK-NEXT: clad::array _d_vector_z(clad::array(indepVarCount, _d_x * x + x * _d_x)); // CHECK-NEXT: double z = x * x; // CHECK-NEXT: return {z, _d_vector_z}; @@ -211,15 +211,15 @@ double f6(double x, double y) { } // CHECK: void f6_dvec(double x, double y, double *_d_x, double *_d_y) { -// CHECK-NEXT: unsigned long indepVarCount = 2UL; -// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, 0UL); -// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, 1UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{2U|2UL}}; +// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); +// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); // CHECK-NEXT: clad::ValueAndPushforward > _t0 = square_vector_pushforward(x, _d_vector_x); // CHECK-NEXT: clad::ValueAndPushforward > _t1 = square_vector_pushforward(y, _d_vector_y); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, _t0.pushforward + _t1.pushforward)); -// CHECK-NEXT: *_d_x = _d_vector_return[0UL]; -// CHECK-NEXT: *_d_y = _d_vector_return[1UL]; +// CHECK-NEXT: *_d_x = _d_vector_return[{{0U|0UL}}]; +// CHECK-NEXT: *_d_y = _d_vector_return[{{1U|1UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -233,7 +233,7 @@ double weighted_array_squared_sum(const double* arr, double w, int n) { } // CHECK: clad::ValueAndPushforward > weighted_array_squared_sum_vector_pushforward(const double *arr, double w, int n, clad::matrix &_d_arr, clad::array _d_w, clad::array _d_n) { -// CHECK-NEXT: unsigned long indepVarCount = _d_n.size(); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_n.size(); // CHECK-NEXT: clad::array _d_vector_sum(clad::array(indepVarCount, 0)); // CHECK-NEXT: double sum = 0; // CHECK-NEXT: { @@ -253,14 +253,14 @@ double f7(const double* arr, double w, int n) { } // CHECK: void f7_dvec_0_1(const double *arr, double w, int n, clad::array_ref _d_arr, double *_d_w) { -// CHECK-NEXT: unsigned long indepVarCount = _d_arr.size() + 1UL; -// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, 0UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_arr.size() + {{1U|1UL}}; +// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL}}); // CHECK-NEXT: clad::array _d_vector_w = clad::one_hot_vector(indepVarCount, _d_arr.size()); // CHECK-NEXT: clad::array _d_vector_n = clad::zero_vector(indepVarCount); // CHECK-NEXT: clad::ValueAndPushforward > _t0 = weighted_array_squared_sum_vector_pushforward(arr, w, n, _d_vector_arr, _d_vector_w, _d_vector_n); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, _t0.pushforward)); -// CHECK-NEXT: _d_arr = _d_vector_return.slice(0UL, _d_arr.size()); +// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL}}, _d_arr.size()); // CHECK-NEXT: *_d_w = _d_vector_return[_d_arr.size()]; // CHECK-NEXT: return; // CHECK-NEXT: } @@ -274,7 +274,7 @@ void sum_ref(double& res, int n, const double* arr) { } // CHECK: void sum_ref_vector_pushforward(double &res, int n, const double *arr, clad::array &_d_res, clad::array _d_n, clad::matrix &_d_arr) { -// CHECK-NEXT: unsigned long indepVarCount = _d_arr[0].size(); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_arr[0].size(); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_i(clad::array(indepVarCount, 0)); // CHECK-NEXT: for (int i = 0; i < n; ++i) { @@ -291,15 +291,15 @@ double f8(int n, const double* arr) { } // CHECK: void f8_dvec_1(int n, const double *arr, clad::array_ref _d_arr) { -// CHECK-NEXT: unsigned long indepVarCount = _d_arr.size(); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_arr.size(); // CHECK-NEXT: clad::array _d_vector_n = clad::zero_vector(indepVarCount); -// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, 0UL); +// CHECK-NEXT: clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL}}); // CHECK-NEXT: clad::array _d_vector_res(clad::array(indepVarCount, 0)); // CHECK-NEXT: double res = 0; // CHECK-NEXT: sum_ref_vector_pushforward(res, n, arr, _d_vector_res, _d_vector_n, _d_vector_arr); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, _d_vector_res)); -// CHECK-NEXT: _d_arr = _d_vector_return.slice(0UL, _d_arr.size()); +// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL}}, _d_arr.size()); // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } diff --git a/test/ForwardMode/VectorModeInterface.C b/test/ForwardMode/VectorModeInterface.C index bc597670b..916eaf41f 100644 --- a/test/ForwardMode/VectorModeInterface.C +++ b/test/ForwardMode/VectorModeInterface.C @@ -11,13 +11,13 @@ double f1(double x, double y) { } // CHECK: void f1_dvec(double x, double y, double *_d_x, double *_d_y) { -// CHECK-NEXT: unsigned long indepVarCount = 2UL; -// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, 0UL); -// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, 1UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{2U|2UL}}; +// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); +// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, _d_vector_x * y + x * _d_vector_y)); -// CHECK-NEXT: *_d_x = _d_vector_return[0UL]; -// CHECK-NEXT: *_d_y = _d_vector_return[1UL]; +// CHECK-NEXT: *_d_x = _d_vector_return[{{0U|0UL}}]; +// CHECK-NEXT: *_d_y = _d_vector_return[{{1U|1UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -29,13 +29,13 @@ double f2(double x, double y) { void f2_dvec(double x, double y, double *_d_x, double *_d_y); // CHECK: void f2_dvec(double x, double y, double *_d_x, double *_d_y) { -// CHECK-NEXT: unsigned long indepVarCount = 2UL; -// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, 0UL); -// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, 1UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{2U|2UL}}; +// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); +// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); // CHECK-NEXT: { // CHECK-NEXT: clad::array _d_vector_return(clad::array(indepVarCount, _d_vector_x + _d_vector_y)); -// CHECK-NEXT: *_d_x = _d_vector_return[0UL]; -// CHECK-NEXT: *_d_y = _d_vector_return[1UL]; +// CHECK-NEXT: *_d_x = _d_vector_return[{{0U|0UL}}]; +// CHECK-NEXT: *_d_y = _d_vector_return[{{1U|1UL}}]; // CHECK-NEXT: return; // CHECK-NEXT: } // CHECK-NEXT: } @@ -49,9 +49,9 @@ double f_try_catch(double x, double y) } // CHECK: void f_try_catch_dvec(double x, double y, double *_d_x, double *_d_y) { -// CHECK-NEXT: unsigned long indepVarCount = 2UL; -// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, 0UL); -// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, 1UL); +// CHECK-NEXT: unsigned {{int|long}} indepVarCount = {{2U|2UL}}; +// CHECK-NEXT: clad::array _d_vector_x = clad::one_hot_vector(indepVarCount, {{0U|0UL}}); +// CHECK-NEXT: clad::array _d_vector_y = clad::one_hot_vector(indepVarCount, {{1U|1UL}}); // CHECK-NEXT: try { // CHECK-NEXT: return x; // CHECK-NEXT: } catch (int) { diff --git a/test/Gradient/Assignments.C b/test/Gradient/Assignments.C index 7388f1e24..a2fafd760 100644 --- a/test/Gradient/Assignments.C +++ b/test/Gradient/Assignments.C @@ -3,7 +3,6 @@ // RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-tbr %s -I%S/../../include -oReverseAssignments.out // RUN: ./ReverseAssignments.out | FileCheck -check-prefix=CHECK-EXEC %s //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" #include @@ -281,7 +280,7 @@ double f7(double x, double y) { } //CHECK: void f7_grad(double x, double y, double *_d_x, double *_d_y) { -//CHECK-NEXT: clad::array _d_t(3UL); +//CHECK-NEXT: clad::array _d_t({{3U|3UL}}); //CHECK-NEXT: double _t0; //CHECK-NEXT: double _t1; //CHECK-NEXT: double _t2; @@ -373,7 +372,7 @@ double f8(double x, double y) { } //CHECK: void f8_grad(double x, double y, double *_d_x, double *_d_y) { -//CHECK-NEXT: clad::array _d_t(4UL); +//CHECK-NEXT: clad::array _d_t({{4U|4UL}}); //CHECK-NEXT: double _t0; //CHECK-NEXT: double _t1; //CHECK-NEXT: double _t2; diff --git a/test/Gradient/FunctionCalls.C b/test/Gradient/FunctionCalls.C index c8868b4a7..364b8be4f 100644 --- a/test/Gradient/FunctionCalls.C +++ b/test/Gradient/FunctionCalls.C @@ -4,7 +4,6 @@ // RUN: ./FunctionCalls.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -192,7 +191,7 @@ float sum(double* arr, int n) { // CHECK: void sum_pullback(double *arr, int n, float _d_y, double *_d_arr, int *_d_n) { // CHECK-NEXT: float _d_res = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_i = 0; // CHECK-NEXT: int i = 0; // CHECK-NEXT: clad::tape _t1 = {}; @@ -251,7 +250,7 @@ double fn4(double* arr, int n) { // CHECK: void fn4_grad(double *arr, int n, double *_d_arr, int *_d_n) { // CHECK-NEXT: double _d_res = 0; // CHECK-NEXT: double _t0; -// CHECK-NEXT: unsigned long _t1; +// CHECK-NEXT: unsigned {{int|long}} _t1; // CHECK-NEXT: int _d_i = 0; // CHECK-NEXT: int i = 0; // CHECK-NEXT: clad::tape _t2 = {}; @@ -643,8 +642,8 @@ double fn13(double* x, const double* w) { } // CHECK: void fn13_grad_0(double *x, const double *w, double *_d_x) { -// CHECK-NEXT: clad::array _d_wCopy(2UL); -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: clad::array _d_wCopy({{2U|2UL}}); +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: std::size_t _d_i = 0; // CHECK-NEXT: std::size_t i = 0; // CHECK-NEXT: clad::tape _t1 = {}; @@ -845,4 +844,4 @@ int main() { TEST2(fn15, 6, -2) // CHECK-EXEC: {1.00, 1.00} INIT(fn16); TEST2(fn16, 12, 8) // CHECK-EXEC: {8.00, 8.00} -} \ No newline at end of file +} diff --git a/test/Gradient/Gradients.C b/test/Gradient/Gradients.C index bd8cb39b2..16a464404 100644 --- a/test/Gradient/Gradients.C +++ b/test/Gradient/Gradients.C @@ -4,7 +4,6 @@ // RUN: ./Gradients.out | FileCheck -check-prefix=CHECK-EXEC %s //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" #include @@ -293,7 +292,7 @@ double f_cond4(double x, double y) { //CHECK: void f_cond4_grad(double x, double y, double *_d_x, double *_d_y) { //CHECK-NEXT: int _d_i = 0; -//CHECK-NEXT: clad::array _d_arr(2UL); +//CHECK-NEXT: clad::array _d_arr({{2U|2UL}}); //CHECK-NEXT: bool _cond0; //CHECK-NEXT: double _t0; //CHECK-NEXT: int i = 0; @@ -695,7 +694,7 @@ float running_sum(float* p, int n) { } // CHECK: void running_sum_grad(float *p, int n, float *_d_p, int *_d_n) { -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_i = 0; // CHECK-NEXT: int i = 0; // CHECK-NEXT: clad::tape _t1 = {}; @@ -769,8 +768,8 @@ double fn_template_non_type(double x) { // CHECK-NEXT: bool _cond0; // CHECK-NEXT: size_t _d_m = 0; // CHECK-NEXT: const size_t maxN = 53; -// CHECK-NEXT: _cond0 = maxN < 15UL; -// CHECK-NEXT: const size_t m = _cond0 ? maxN : 15UL; +// CHECK-NEXT: _cond0 = maxN < {{15U|15UL}}; +// CHECK-NEXT: const size_t m = _cond0 ? maxN : {{15U|15UL}}; // CHECK-NEXT: goto _label0; // CHECK-NEXT: _label0: // CHECK-NEXT: *_d_x += 1 * m; diff --git a/test/Gradient/Loops.C b/test/Gradient/Loops.C index 01d92f919..9d0b013a6 100644 --- a/test/Gradient/Loops.C +++ b/test/Gradient/Loops.C @@ -3,7 +3,6 @@ // RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-tbr %s -I%S/../../include -oReverseLoops.out // RUN: ./ReverseLoops.out | FileCheck -check-prefix=CHECK-EXEC %s //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" #include @@ -19,7 +18,7 @@ double f1(double x) { //CHECK: void f1_grad(double x, double *_d_x) { //CHECK-NEXT: double _d_t = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -53,10 +52,10 @@ double f2(double x) { //CHECK: void f2_grad(double x, double *_d_x) { //CHECK-NEXT: double _d_t = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; -//CHECK-NEXT: clad::tape _t1 = {}; +//CHECK-NEXT: clad::tape _t1 = {}; //CHECK-NEXT: clad::tape _t2 = {}; //CHECK-NEXT: int _d_j = 0; //CHECK-NEXT: int j = 0; @@ -65,7 +64,7 @@ double f2(double x) { //CHECK-NEXT: _t0 = 0; //CHECK-NEXT: for (i = 0; i < 3; i++) { //CHECK-NEXT: _t0++; -//CHECK-NEXT: clad::push(_t1, 0UL); +//CHECK-NEXT: clad::push(_t1, {{0U|0UL}}); //CHECK-NEXT: for (clad::push(_t2, j) , j = 0; j < 3; j++) { //CHECK-NEXT: clad::back(_t1)++; //CHECK-NEXT: clad::push(_t3, t); @@ -105,7 +104,7 @@ double f3(double x) { //CHECK: void f3_grad(double x, double *_d_x) { //CHECK-NEXT: double _d_t = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -150,7 +149,7 @@ double f4(double x) { //CHECK: void f4_grad(double x, double *_d_x) { //CHECK-NEXT: double _d_t = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -182,7 +181,7 @@ double f5(double x){ } // == x + 10 //CHECK: void f5_grad(double x, double *_d_x) { -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: _t0 = 0; @@ -210,7 +209,7 @@ double f_const_local(double x) { //CHECK: void f_const_local_grad(double x, double *_d_x) { //CHECK-NEXT: double _d_res = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -255,7 +254,7 @@ double f_sum(double *p, int n) { //CHECK: void f_sum_grad_0(double *p, int n, double *_d_p) { //CHECK-NEXT: int _d_n = 0; //CHECK-NEXT: double _d_s = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -297,7 +296,7 @@ double f_sum_squares(double *p, int n) { //CHECK: void f_sum_squares_grad_0(double *p, int n, double *_d_p) { //CHECK-NEXT: int _d_n = 0; //CHECK-NEXT: double _d_s = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -334,7 +333,7 @@ double f_log_gaus(double* x, double* p /*means*/, double n, double sigma) { //CHECK-NEXT: double _d_n = 0; //CHECK-NEXT: double _d_sigma = 0; //CHECK-NEXT: double _d_power = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -412,7 +411,7 @@ double f_const(const double a, const double b) { void f_const_grad(const double, const double, double*, double*); //CHECK: void f_const_grad(const double a, const double b, double *_d_a, double *_d_b) { //CHECK-NEXT: int _d_r = 0; -//CHECK-NEXT: unsigned long _t0; +//CHECK-NEXT: unsigned {{int|long}} _t0; //CHECK-NEXT: int _d_i = 0; //CHECK-NEXT: int i = 0; //CHECK-NEXT: clad::tape _t1 = {}; @@ -459,7 +458,7 @@ double f6 (double i, double j) { // CHECK: void f6_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: double _d_a = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_counter = 0; // CHECK-NEXT: int counter = 0; // CHECK-NEXT: clad::tape _t1 = {}; @@ -524,7 +523,7 @@ double fn7(double i, double j) { // CHECK: void fn7_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: double _d_a = 0; // CHECK-NEXT: int _d_counter = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: double a = 0; // CHECK-NEXT: int counter = 3; @@ -564,8 +563,8 @@ double fn8(double i, double j) { // CHECK: void fn8_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: double _d_a = 0; // CHECK-NEXT: int _d_counter = 0; -// CHECK-NEXT: unsigned long _t0; -// CHECK-NEXT: clad::tape _t1 = {}; +// CHECK-NEXT: unsigned {{int|long}} _t0; +// CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: clad::tape _t2 = {}; // CHECK-NEXT: double a = 0; // CHECK-NEXT: int counter = 3; @@ -573,7 +572,7 @@ double fn8(double i, double j) { // CHECK-NEXT: while (counter > 0) // CHECK-NEXT: { // CHECK-NEXT: _t0++; -// CHECK-NEXT: clad::push(_t1, 0UL); +// CHECK-NEXT: clad::push(_t1, {{0U|0UL}}); // CHECK-NEXT: do { // CHECK-NEXT: clad::back(_t1)++; // CHECK-NEXT: clad::push(_t2, a); @@ -622,9 +621,9 @@ double fn9(double i, double j) { // CHECK-NEXT: int _t0; // CHECK-NEXT: int _t1; // CHECK-NEXT: double _d_a = 0; -// CHECK-NEXT: unsigned long _t2; +// CHECK-NEXT: unsigned {{int|long}} _t2; // CHECK-NEXT: clad::tape _t3 = {}; -// CHECK-NEXT: clad::tape _t4 = {}; +// CHECK-NEXT: clad::tape _t4 = {}; // CHECK-NEXT: clad::tape _t5 = {}; // CHECK-NEXT: int counter, counter_again; // CHECK-NEXT: _t0 = counter; @@ -637,7 +636,7 @@ double fn9(double i, double j) { // CHECK-NEXT: _t2++; // CHECK-NEXT: clad::push(_t3, counter_again); // CHECK-NEXT: counter_again = 3; -// CHECK-NEXT: clad::push(_t4, 0UL); +// CHECK-NEXT: clad::push(_t4, {{0U|0UL}}); // CHECK-NEXT: while (counter_again--) // CHECK-NEXT: { // CHECK-NEXT: clad::back(_t4)++; @@ -700,7 +699,7 @@ double fn10(double i, double j) { // CHECK: void fn10_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: double _d_a = 0; // CHECK-NEXT: int _d_counter = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: int _d_b = 0; // CHECK-NEXT: int b = 0; @@ -765,7 +764,7 @@ double fn11(double i, double j) { // CHECK: void fn11_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: int _d_counter = 0; // CHECK-NEXT: double _d_a = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: clad::tape _t2 = {}; // CHECK-NEXT: int counter = 3; @@ -819,14 +818,14 @@ double fn12(double i, double j) { // CHECK: void fn12_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: int _d_counter = 0; // CHECK-NEXT: double _d_a = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: int _d_counter_again = 0; // CHECK-NEXT: int counter_again = 0; -// CHECK-NEXT: clad::tape _t2 = {}; +// CHECK-NEXT: clad::tape _t2 = {}; // CHECK-NEXT: clad::tape _t3 = {}; // CHECK-NEXT: clad::tape _t4 = {}; -// CHECK-NEXT: clad::tape _t5 = {}; +// CHECK-NEXT: clad::tape _t5 = {}; // CHECK-NEXT: clad::tape _t6 = {}; // CHECK-NEXT: clad::tape _t7 = {}; // CHECK-NEXT: int counter = 3; @@ -835,14 +834,14 @@ double fn12(double i, double j) { // CHECK-NEXT: do { // CHECK-NEXT: _t0++; // CHECK-NEXT: clad::push(_t1, counter_again) , counter_again = 3; -// CHECK-NEXT: clad::push(_t2, 0UL); +// CHECK-NEXT: clad::push(_t2, {{0U|0UL}}); // CHECK-NEXT: do { // CHECK-NEXT: clad::back(_t2)++; // CHECK-NEXT: clad::push(_t3, a); // CHECK-NEXT: a += i * i + j; // CHECK-NEXT: clad::push(_t4, counter_again); // CHECK-NEXT: counter_again -= 1; -// CHECK-NEXT: clad::push(_t5, 0UL); +// CHECK-NEXT: clad::push(_t5, {{0U|0UL}}); // CHECK-NEXT: do { // CHECK-NEXT: clad::back(_t5)++; // CHECK-NEXT: clad::push(_t6, a); @@ -914,7 +913,7 @@ double fn13(double i, double j) { // CHECK: void fn13_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: double _d_res = 0; // CHECK-NEXT: int _d_counter = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: int _d_k = 0; // CHECK-NEXT: int k = 0; @@ -993,10 +992,10 @@ double fn14(double i, double j) { // CHECK: void fn14_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: int _d_choice = 0; // CHECK-NEXT: double _d_res = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: clad::tape _t2 = {}; // CHECK-NEXT: clad::tape _t3 = {}; -// CHECK-NEXT: clad::tape _t4 = {}; +// CHECK-NEXT: clad::tape _t4 = {}; // CHECK-NEXT: clad::tape _t6 = {}; // CHECK-NEXT: clad::tape _t7 = {}; // CHECK-NEXT: clad::tape _t9 = {}; @@ -1013,7 +1012,7 @@ double fn14(double i, double j) { // CHECK-NEXT: clad::push(_t3, res); // CHECK-NEXT: res += i; // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t4, 1UL); +// CHECK-NEXT: clad::push(_t4, {{1U|1UL}}); // CHECK-NEXT: continue; // CHECK-NEXT: } // CHECK-NEXT: } @@ -1025,7 +1024,7 @@ double fn14(double i, double j) { // CHECK-NEXT: clad::push(_t7, res); // CHECK-NEXT: res += j; // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t4, 2UL); +// CHECK-NEXT: clad::push(_t4, {{2U|2UL}}); // CHECK-NEXT: continue; // CHECK-NEXT: } // CHECK-NEXT: } @@ -1037,13 +1036,13 @@ double fn14(double i, double j) { // CHECK-NEXT: clad::push(_t10, res); // CHECK-NEXT: res += i * j; // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t4, 3UL); +// CHECK-NEXT: clad::push(_t4, {{3U|3UL}}); // CHECK-NEXT: continue; // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: clad::push(_t9, _t8); // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t4, 4UL); +// CHECK-NEXT: clad::push(_t4, {{4U|4UL}}); // CHECK-NEXT: } // CHECK-NEXT: goto _label0; // CHECK-NEXT: _label0: @@ -1051,10 +1050,10 @@ double fn14(double i, double j) { // CHECK-NEXT: while (_t0) // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t4)) { -// CHECK-NEXT: case 4UL: +// CHECK-NEXT: case {{4U|4UL}}: // CHECK-NEXT: ; // CHECK-NEXT: if (clad::pop(_t9)) { -// CHECK-NEXT: case 3UL: +// CHECK-NEXT: case {{3U|3UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: res = clad::pop(_t10); @@ -1064,7 +1063,7 @@ double fn14(double i, double j) { // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: if (clad::pop(_t6)) { -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: res = clad::pop(_t7); @@ -1073,7 +1072,7 @@ double fn14(double i, double j) { // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: if (clad::pop(_t2)) { -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: res = clad::pop(_t3); @@ -1109,16 +1108,16 @@ double fn15(double i, double j) { // CHECK: void fn15_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: int _d_choice = 0; // CHECK-NEXT: double _d_res = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: clad::tape _t2 = {}; -// CHECK-NEXT: clad::tape _t3 = {}; +// CHECK-NEXT: clad::tape _t3 = {}; // CHECK-NEXT: clad::tape _t4 = {}; // CHECK-NEXT: int _d_another_choice = 0; // CHECK-NEXT: int another_choice = 0; -// CHECK-NEXT: clad::tape _t5 = {}; +// CHECK-NEXT: clad::tape _t5 = {}; // CHECK-NEXT: clad::tape _t7 = {}; // CHECK-NEXT: clad::tape _t8 = {}; -// CHECK-NEXT: clad::tape _t9 = {}; +// CHECK-NEXT: clad::tape _t9 = {}; // CHECK-NEXT: clad::tape _t11 = {}; // CHECK-NEXT: clad::tape _t12 = {}; // CHECK-NEXT: int choice = 5; @@ -1130,13 +1129,13 @@ double fn15(double i, double j) { // CHECK-NEXT: bool _t1 = choice > 2; // CHECK-NEXT: { // CHECK-NEXT: if (_t1) { -// CHECK-NEXT: clad::push(_t3, 1UL); +// CHECK-NEXT: clad::push(_t3, {{1U|1UL}}); // CHECK-NEXT: continue; // CHECK-NEXT: } // CHECK-NEXT: clad::push(_t2, _t1); // CHECK-NEXT: } // CHECK-NEXT: clad::push(_t4, another_choice) , another_choice = 3; -// CHECK-NEXT: clad::push(_t5, 0UL); +// CHECK-NEXT: clad::push(_t5, {{0U|0UL}}); // CHECK-NEXT: while (another_choice--) // CHECK-NEXT: { // CHECK-NEXT: clad::back(_t5)++; @@ -1146,7 +1145,7 @@ double fn15(double i, double j) { // CHECK-NEXT: clad::push(_t8, res); // CHECK-NEXT: res += i; // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t9, 1UL); +// CHECK-NEXT: clad::push(_t9, {{1U|1UL}}); // CHECK-NEXT: continue; // CHECK-NEXT: } // CHECK-NEXT: } @@ -1160,9 +1159,9 @@ double fn15(double i, double j) { // CHECK-NEXT: } // CHECK-NEXT: clad::push(_t11, _t10); // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t9, 2UL); +// CHECK-NEXT: clad::push(_t9, {{2U|2UL}}); // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t3, 2UL); +// CHECK-NEXT: clad::push(_t3, {{2U|2UL}}); // CHECK-NEXT: } // CHECK-NEXT: goto _label0; // CHECK-NEXT: _label0: @@ -1170,13 +1169,13 @@ double fn15(double i, double j) { // CHECK-NEXT: while (_t0) // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t3)) { -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: while (clad::back(_t5)) // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t9)) { -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: if (clad::pop(_t11)) { // CHECK-NEXT: { @@ -1186,7 +1185,7 @@ double fn15(double i, double j) { // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: if (clad::pop(_t7)) { -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: res = clad::pop(_t8); @@ -1204,7 +1203,7 @@ double fn15(double i, double j) { // CHECK-NEXT: another_choice = clad::pop(_t4); // CHECK-NEXT: } // CHECK-NEXT: if (clad::pop(_t2)) -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: } // CHECK-NEXT: _t0--; @@ -1231,12 +1230,12 @@ double fn16(double i, double j) { // CHECK: void fn16_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: int _d_counter = 0; // CHECK-NEXT: double _d_res = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_ii = 0; // CHECK-NEXT: int ii = 0; // CHECK-NEXT: clad::tape _t2 = {}; // CHECK-NEXT: clad::tape _t3 = {}; -// CHECK-NEXT: clad::tape _t4 = {}; +// CHECK-NEXT: clad::tape _t4 = {}; // CHECK-NEXT: clad::tape _t6 = {}; // CHECK-NEXT: clad::tape _t7 = {}; // CHECK-NEXT: clad::tape _t8 = {}; @@ -1251,7 +1250,7 @@ double fn16(double i, double j) { // CHECK-NEXT: clad::push(_t3, res); // CHECK-NEXT: res += i * j; // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t4, 1UL); +// CHECK-NEXT: clad::push(_t4, {{1U|1UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } // CHECK-NEXT: } @@ -1263,7 +1262,7 @@ double fn16(double i, double j) { // CHECK-NEXT: clad::push(_t7, res); // CHECK-NEXT: res += 2 * i; // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t4, 2UL); +// CHECK-NEXT: clad::push(_t4, {{2U|2UL}}); // CHECK-NEXT: continue; // CHECK-NEXT: } // CHECK-NEXT: } @@ -1271,14 +1270,14 @@ double fn16(double i, double j) { // CHECK-NEXT: } // CHECK-NEXT: clad::push(_t8, res); // CHECK-NEXT: res += i + j; -// CHECK-NEXT: clad::push(_t4, 3UL); +// CHECK-NEXT: clad::push(_t4, {{3U|3UL}}); // CHECK-NEXT: } // CHECK-NEXT: goto _label0; // CHECK-NEXT: _label0: // CHECK-NEXT: _d_res += 1; // CHECK-NEXT: for (; _t0; _t0--) // CHECK-NEXT: switch (clad::pop(_t4)) { -// CHECK-NEXT: case 3UL: +// CHECK-NEXT: case {{3U|3UL}}: // CHECK-NEXT: ; // CHECK-NEXT: --ii; // CHECK-NEXT: { @@ -1288,7 +1287,7 @@ double fn16(double i, double j) { // CHECK-NEXT: *_d_j += _r_d2; // CHECK-NEXT: } // CHECK-NEXT: if (clad::pop(_t6)) { -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: res = clad::pop(_t7); @@ -1297,7 +1296,7 @@ double fn16(double i, double j) { // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: if (clad::pop(_t2)) { -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: res = clad::pop(_t3); @@ -1332,18 +1331,18 @@ double fn17(double i, double j) { // CHECK: void fn17_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: int _d_counter = 0; // CHECK-NEXT: double _d_res = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_ii = 0; // CHECK-NEXT: int ii = 0; // CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: int _d_jj = 0; // CHECK-NEXT: int jj = 0; // CHECK-NEXT: clad::tape _t3 = {}; -// CHECK-NEXT: clad::tape _t4 = {}; -// CHECK-NEXT: clad::tape _t5 = {}; +// CHECK-NEXT: clad::tape _t4 = {}; +// CHECK-NEXT: clad::tape _t5 = {}; // CHECK-NEXT: clad::tape _t7 = {}; // CHECK-NEXT: clad::tape _t8 = {}; -// CHECK-NEXT: clad::tape _t9 = {}; +// CHECK-NEXT: clad::tape _t9 = {}; // CHECK-NEXT: clad::tape _t10 = {}; // CHECK-NEXT: int counter = 5; // CHECK-NEXT: double res = 0; @@ -1354,12 +1353,12 @@ double fn17(double i, double j) { // CHECK-NEXT: bool _t2 = ii < 2; // CHECK-NEXT: { // CHECK-NEXT: if (_t2) { -// CHECK-NEXT: clad::push(_t4, 1UL); +// CHECK-NEXT: clad::push(_t4, {{1U|1UL}}); // CHECK-NEXT: continue; // CHECK-NEXT: } // CHECK-NEXT: clad::push(_t3, _t2); // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t5, 0UL); +// CHECK-NEXT: clad::push(_t5, {{0U|0UL}}); // CHECK-NEXT: while (jj--) // CHECK-NEXT: { // CHECK-NEXT: clad::back(_t5)++; @@ -1369,12 +1368,12 @@ double fn17(double i, double j) { // CHECK-NEXT: clad::push(_t8, res); // CHECK-NEXT: res += i * j; // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t9, 1UL); +// CHECK-NEXT: clad::push(_t9, {{1U|1UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } // CHECK-NEXT: } else { // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t9, 2UL); +// CHECK-NEXT: clad::push(_t9, {{2U|2UL}}); // CHECK-NEXT: continue; // CHECK-NEXT: } // CHECK-NEXT: } @@ -1382,23 +1381,23 @@ double fn17(double i, double j) { // CHECK-NEXT: } // CHECK-NEXT: clad::push(_t10, res); // CHECK-NEXT: res += i * i * j * j; -// CHECK-NEXT: clad::push(_t9, 3UL); +// CHECK-NEXT: clad::push(_t9, {{3U|3UL}}); // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t4, 2UL); +// CHECK-NEXT: clad::push(_t4, {{2U|2UL}}); // CHECK-NEXT: } // CHECK-NEXT: goto _label0; // CHECK-NEXT: _label0: // CHECK-NEXT: _d_res += 1; // CHECK-NEXT: for (; _t0; _t0--) // CHECK-NEXT: switch (clad::pop(_t4)) { -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: --ii; // CHECK-NEXT: { // CHECK-NEXT: while (clad::back(_t5)) // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t9)) { -// CHECK-NEXT: case 3UL: +// CHECK-NEXT: case {{3U|3UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: res = clad::pop(_t10); @@ -1409,7 +1408,7 @@ double fn17(double i, double j) { // CHECK-NEXT: *_d_j += i * i * j * _r_d1; // CHECK-NEXT: } // CHECK-NEXT: if (clad::pop(_t7)) { -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: res = clad::pop(_t8); @@ -1418,7 +1417,7 @@ double fn17(double i, double j) { // CHECK-NEXT: *_d_j += i * _r_d0; // CHECK-NEXT: } // CHECK-NEXT: } else { -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: } // CHECK-NEXT: } @@ -1427,7 +1426,7 @@ double fn17(double i, double j) { // CHECK-NEXT: clad::pop(_t5); // CHECK-NEXT: } // CHECK-NEXT: if (clad::pop(_t3)) -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: _d_ii += _d_jj; @@ -1455,13 +1454,13 @@ double fn18(double i, double j) { // CHECK: void fn18_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: int _d_choice = 0; // CHECK-NEXT: double _d_res = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_counter = 0; // CHECK-NEXT: int counter = 0; // CHECK-NEXT: clad::tape _t2 = {}; // CHECK-NEXT: clad::tape _t3 = {}; // CHECK-NEXT: clad::tape _t5 = {}; -// CHECK-NEXT: clad::tape _t6 = {}; +// CHECK-NEXT: clad::tape _t6 = {}; // CHECK-NEXT: clad::tape _t7 = {}; // CHECK-NEXT: int choice = 5; // CHECK-NEXT: double res = 0; @@ -1477,13 +1476,13 @@ double fn18(double i, double j) { // CHECK-NEXT: bool _t4 = counter < 4; // CHECK-NEXT: { // CHECK-NEXT: if (_t4) { -// CHECK-NEXT: clad::push(_t6, 1UL); +// CHECK-NEXT: clad::push(_t6, {{1U|1UL}}); // CHECK-NEXT: continue; // CHECK-NEXT: } else { // CHECK-NEXT: clad::push(_t7, res); // CHECK-NEXT: res += 2 * i + 2 * j; // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t6, 2UL); +// CHECK-NEXT: clad::push(_t6, {{2U|2UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } // CHECK-NEXT: } @@ -1492,14 +1491,14 @@ double fn18(double i, double j) { // CHECK-NEXT: } // CHECK-NEXT: clad::push(_t2, _t1); // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t6, 3UL); +// CHECK-NEXT: clad::push(_t6, {{3U|3UL}}); // CHECK-NEXT: } // CHECK-NEXT: goto _label0; // CHECK-NEXT: _label0: // CHECK-NEXT: _d_res += 1; // CHECK-NEXT: for (; _t0; _t0--) // CHECK-NEXT: switch (clad::pop(_t6)) { -// CHECK-NEXT: case 3UL: +// CHECK-NEXT: case {{3U|3UL}}: // CHECK-NEXT: ; // CHECK-NEXT: --counter; // CHECK-NEXT: if (clad::pop(_t2)) { @@ -1508,10 +1507,10 @@ double fn18(double i, double j) { // CHECK-NEXT: *_d_i += _r_d0; // CHECK-NEXT: *_d_j += _r_d0; // CHECK-NEXT: } else if (clad::pop(_t5)) -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: else { -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: res = clad::pop(_t7); @@ -1535,7 +1534,7 @@ double fn19(double* arr, int n) { // CHECK: void fn19_grad_0(double *arr, int n, double *_d_arr) { // CHECK-NEXT: int _d_n = 0; // CHECK-NEXT: double _d_res = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_i = 0; // CHECK-NEXT: int i = 0; // CHECK-NEXT: clad::tape _t1 = {}; @@ -1582,7 +1581,7 @@ double f_loop_init_var(double lower, double upper) { // CHECK-NEXT: double _d_sum = 0; // CHECK-NEXT: double _d_num_points = 0; // CHECK-NEXT: double _d_interval = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: double _d_x = 0; // CHECK-NEXT: double x = 0; // CHECK-NEXT: clad::tape _t1 = {}; diff --git a/test/Gradient/Pointers.C b/test/Gradient/Pointers.C index 77eb776bc..5c594ca18 100644 --- a/test/Gradient/Pointers.C +++ b/test/Gradient/Pointers.C @@ -170,7 +170,7 @@ double pointerParam(const double* arr, size_t n) { // CHECK: void pointerParam_grad_0(const double *arr, size_t n, double *_d_arr) { // CHECK-NEXT: size_t _d_n = 0; // CHECK-NEXT: double _d_sum = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: size_t _d_i = 0; // CHECK-NEXT: size_t i = 0; // CHECK-NEXT: clad::tape _t1 = {}; @@ -619,4 +619,4 @@ int main() { d_x = 0; d_cStyleMemoryAlloc.execute(5, 7, &d_x); printf("%.2f\n", d_x); // CHECK-EXEC: 4.00 -} \ No newline at end of file +} diff --git a/test/Gradient/Switch.C b/test/Gradient/Switch.C index 7240cf387..d8a1d24e0 100644 --- a/test/Gradient/Switch.C +++ b/test/Gradient/Switch.C @@ -1,7 +1,6 @@ // RUN: %cladclang %s -I%S/../../include -oSwitch.out 2>&1 -lstdc++ -lm | FileCheck %s // RUN: ./Switch.out | FileCheck -check-prefix=CHECK-EXEC %s //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" #include "../TestUtils.h" @@ -24,7 +23,7 @@ double fn1(double i, double j) { // CHECK-NEXT: int _d_count = 0; // CHECK-NEXT: int _cond0; // CHECK-NEXT: double _t0; -// CHECK-NEXT: clad::tape _t1 = {}; +// CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: double _t2; // CHECK-NEXT: double _t3; // CHECK-NEXT: double _t4; @@ -39,7 +38,7 @@ double fn1(double i, double j) { // CHECK-NEXT: _t0 = res; // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t1, 1UL); +// CHECK-NEXT: clad::push(_t1, {{1U|1UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } // CHECK-NEXT: { @@ -59,7 +58,7 @@ double fn1(double i, double j) { // CHECK-NEXT: res += i * i * j * j; // CHECK-NEXT: _t4 = res; // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t1, 2UL); +// CHECK-NEXT: clad::push(_t1, {{2U|2UL}}); // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: goto _label0; @@ -67,7 +66,7 @@ double fn1(double i, double j) { // CHECK-NEXT: _d_res += 1; // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t1)) { -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -103,7 +102,7 @@ double fn1(double i, double j) { // CHECK-NEXT: if (1 == _cond0) // CHECK-NEXT: break; // CHECK-NEXT: } -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -140,7 +139,7 @@ double fn2(double i, double j) { // CHECK-NEXT: double _t0; // CHECK-NEXT: double _t1; // CHECK-NEXT: double _t2; -// CHECK-NEXT: clad::tape _t3 = {}; +// CHECK-NEXT: clad::tape _t3 = {}; // CHECK-NEXT: double _t4; // CHECK-NEXT: double _t5; // CHECK-NEXT: double _t6; @@ -159,7 +158,7 @@ double fn2(double i, double j) { // CHECK-NEXT: _t2 = res; // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t3, 1UL); +// CHECK-NEXT: clad::push(_t3, {{1U|1UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } // CHECK-NEXT: { @@ -173,7 +172,7 @@ double fn2(double i, double j) { // CHECK-NEXT: _t5 = res; // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t3, 2UL); +// CHECK-NEXT: clad::push(_t3, {{2U|2UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } // CHECK-NEXT: { @@ -181,7 +180,7 @@ double fn2(double i, double j) { // CHECK-NEXT: res += i + j; // CHECK-NEXT: _t6 = res; // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t3, 3UL); +// CHECK-NEXT: clad::push(_t3, {{3U|3UL}}); // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: goto _label0; @@ -189,7 +188,7 @@ double fn2(double i, double j) { // CHECK-NEXT: _d_res += 1; // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t3)) { -// CHECK-NEXT: case 3UL: +// CHECK-NEXT: case {{3U|3UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -201,7 +200,7 @@ double fn2(double i, double j) { // CHECK-NEXT: if (_cond0 != 0 && _cond0 != 1 && _cond0 != 2) // CHECK-NEXT: break; // CHECK-NEXT: } -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -222,7 +221,7 @@ double fn2(double i, double j) { // CHECK-NEXT: if (1 == _cond0) // CHECK-NEXT: break; // CHECK-NEXT: } -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -269,11 +268,11 @@ double fn3(double i, double j) { // CHECK: void fn3_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: double _d_res = 0; // CHECK-NEXT: int _d_counter = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: clad::tape _cond0 = {}; // CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: clad::tape _t2 = {}; -// CHECK-NEXT: clad::tape _t3 = {}; +// CHECK-NEXT: clad::tape _t3 = {}; // CHECK-NEXT: clad::tape _t4 = {}; // CHECK-NEXT: clad::tape _t5 = {}; // CHECK-NEXT: double res = 0; @@ -297,7 +296,7 @@ double fn3(double i, double j) { // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t3, 1UL); +// CHECK-NEXT: clad::push(_t3, {{1U|1UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } // CHECK-NEXT: { @@ -310,7 +309,7 @@ double fn3(double i, double j) { // CHECK-NEXT: res += i + j; // CHECK-NEXT: clad::push(_t5, res); // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t3, 2UL); +// CHECK-NEXT: clad::push(_t3, {{2U|2UL}}); // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: } @@ -322,7 +321,7 @@ double fn3(double i, double j) { // CHECK-NEXT: { // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t3)) { -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -344,7 +343,7 @@ double fn3(double i, double j) { // CHECK-NEXT: if (2 == clad::back(_cond0)) // CHECK-NEXT: break; // CHECK-NEXT: } -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -395,10 +394,10 @@ double fn4(double i, double j) { // CHECK: void fn4_grad(double i, double j, double *_d_i, double *_d_j) { // CHECK-NEXT: double _d_res = 0; // CHECK-NEXT: double _t0; -// CHECK-NEXT: clad::tape _t1 = {}; +// CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: int _d_counter = 0; // CHECK-NEXT: int counter = 0; -// CHECK-NEXT: unsigned long _t2; +// CHECK-NEXT: unsigned {{int|long}} _t2; // CHECK-NEXT: clad::tape _t3 = {}; // CHECK-NEXT: double res = 0; // CHECK-NEXT: { @@ -409,7 +408,7 @@ double fn4(double i, double j) { // CHECK-NEXT: _t0 = res; // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t1, 1UL); +// CHECK-NEXT: clad::push(_t1, {{1U|1UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } // CHECK-NEXT: { @@ -424,10 +423,10 @@ double fn4(double i, double j) { // CHECK-NEXT: res += i * j; // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t1, 2UL); +// CHECK-NEXT: clad::push(_t1, {{2U|2UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t1, 3UL); +// CHECK-NEXT: clad::push(_t1, {{3U|3UL}}); // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: goto _label0; @@ -435,9 +434,9 @@ double fn4(double i, double j) { // CHECK-NEXT: _d_res += 1; // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t1)) { -// CHECK-NEXT: case 3UL: +// CHECK-NEXT: case {{3U|3UL}}: // CHECK-NEXT: ; -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: while (_t2) // CHECK-NEXT: { @@ -455,7 +454,7 @@ double fn4(double i, double j) { // CHECK-NEXT: if (1 == 1) // CHECK-NEXT: break; // CHECK-NEXT: } -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -487,7 +486,7 @@ double fn5(double i, double j) { // CHECK-NEXT: int count = 0; // CHECK-NEXT: int _cond0; // CHECK-NEXT: double _t0; -// CHECK-NEXT: clad::tape _t1 = {}; +// CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: double res = 0; // CHECK-NEXT: { // CHECK-NEXT: count = 1; @@ -496,7 +495,7 @@ double fn5(double i, double j) { // CHECK-NEXT: case 1: // CHECK-NEXT: res += i * j; // CHECK-NEXT: _t0 = res; -// CHECK-NEXT: clad::push(_t1, 1UL); +// CHECK-NEXT: clad::push(_t1, {{1U|1UL}}); // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: goto _label0; @@ -504,7 +503,7 @@ double fn5(double i, double j) { // CHECK-NEXT: _d_res += 1; // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t1)) { -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: res = _t0; @@ -534,7 +533,7 @@ double fn6(double u, double v) { // CHECK-NEXT: int _t0; // CHECK-NEXT: int _cond0; // CHECK-NEXT: double _t1; -// CHECK-NEXT: clad::tape _t2 = {}; +// CHECK-NEXT: clad::tape _t2 = {}; // CHECK-NEXT: int res = 0; // CHECK-NEXT: double temp = 0; // CHECK-NEXT: { @@ -547,7 +546,7 @@ double fn6(double u, double v) { // CHECK-NEXT: temp = 1; // CHECK-NEXT: _t1 = temp; // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t2, 1UL); +// CHECK-NEXT: clad::push(_t2, {{1U|1UL}}); // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: goto _label0; @@ -555,7 +554,7 @@ double fn6(double u, double v) { // CHECK-NEXT: _d_res += 1; // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t2)) { -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -597,12 +596,12 @@ double fn7(double u, double v) { // CHECK: void fn7_grad(double u, double v, double *_d_u, double *_d_v) { // CHECK-NEXT: double _d_res = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_i = 0; // CHECK-NEXT: int i = 0; // CHECK-NEXT: clad::tape _cond0 = {}; // CHECK-NEXT: clad::tape _t1 = {}; -// CHECK-NEXT: clad::tape _t2 = {}; +// CHECK-NEXT: clad::tape _t2 = {}; // CHECK-NEXT: clad::tape _t3 = {}; // CHECK-NEXT: double res = 0; // CHECK-NEXT: _t0 = 0; @@ -622,7 +621,7 @@ double fn7(double u, double v) { // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t2, 1UL); +// CHECK-NEXT: clad::push(_t2, {{1U|1UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } // CHECK-NEXT: { @@ -634,10 +633,10 @@ double fn7(double u, double v) { // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t2, 2UL); +// CHECK-NEXT: clad::push(_t2, {{2U|2UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t2, 3UL); +// CHECK-NEXT: clad::push(_t2, {{3U|3UL}}); // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: } @@ -648,9 +647,9 @@ double fn7(double u, double v) { // CHECK-NEXT: --i; // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t2)) { -// CHECK-NEXT: case 3UL: +// CHECK-NEXT: case {{3U|3UL}}: // CHECK-NEXT: ; -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -665,7 +664,7 @@ double fn7(double u, double v) { // CHECK-NEXT: if (3 == clad::back(_cond0)) // CHECK-NEXT: break; // CHECK-NEXT: } -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -714,4 +713,4 @@ int main() { TEST_GRADIENT(fn6, 2, 3, 5, &result[0], &result[1]); // CHECK-EXEC: {5.00, 3.00} TEST_GRADIENT(fn7, 2, 3, 5, &result[0], &result[1]); // CHECK-EXEC: {3.00, 2.00} -} \ No newline at end of file +} diff --git a/test/Gradient/SwitchInit.C b/test/Gradient/SwitchInit.C index c0dba9e29..e75fe84c0 100644 --- a/test/Gradient/SwitchInit.C +++ b/test/Gradient/SwitchInit.C @@ -1,7 +1,6 @@ // RUN: %cladclang %s -I%S/../../include -std=c++17 -oSwitchInit.out 2>&1 -lstdc++ -lm | FileCheck %s // RUN: ./SwitchInit.out | FileCheck -check-prefix=CHECK-EXEC %s //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -23,7 +22,7 @@ double fn1(double i, double j) { // CHECK-NEXT: int count = 0; // CHECK-NEXT: int _cond0; // CHECK-NEXT: double _t0; -// CHECK-NEXT: clad::tape _t1 = {}; +// CHECK-NEXT: clad::tape _t1 = {}; // CHECK-NEXT: double _t2; // CHECK-NEXT: double _t3; // CHECK-NEXT: double _t4; @@ -38,7 +37,7 @@ double fn1(double i, double j) { // CHECK-NEXT: _t0 = res; // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: clad::push(_t1, 1UL); +// CHECK-NEXT: clad::push(_t1, {{1U|1UL}}); // CHECK-NEXT: break; // CHECK-NEXT: } // CHECK-NEXT: { @@ -58,7 +57,7 @@ double fn1(double i, double j) { // CHECK-NEXT: res += i * i * j * j; // CHECK-NEXT: _t4 = res; // CHECK-NEXT: } -// CHECK-NEXT: clad::push(_t1, 2UL); +// CHECK-NEXT: clad::push(_t1, {{2U|2UL}}); // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: goto _label0; @@ -66,7 +65,7 @@ double fn1(double i, double j) { // CHECK-NEXT: _d_res += 1; // CHECK-NEXT: { // CHECK-NEXT: switch (clad::pop(_t1)) { -// CHECK-NEXT: case 2UL: +// CHECK-NEXT: case {{2U|2UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -102,7 +101,7 @@ double fn1(double i, double j) { // CHECK-NEXT: if (1 == _cond0) // CHECK-NEXT: break; // CHECK-NEXT: } -// CHECK-NEXT: case 1UL: +// CHECK-NEXT: case {{1U|1UL}}: // CHECK-NEXT: ; // CHECK-NEXT: { // CHECK-NEXT: { @@ -131,4 +130,4 @@ int main() { clad::array_ref result_ref(result, 2); TEST_2(fn1, 3, 5); // CHECK-EXEC: {156.00, 100.00} -} \ No newline at end of file +} diff --git a/test/Gradient/TestTypeConversion.C b/test/Gradient/TestTypeConversion.C index 94697e027..716bf97e7 100644 --- a/test/Gradient/TestTypeConversion.C +++ b/test/Gradient/TestTypeConversion.C @@ -4,7 +4,6 @@ // RUN: ./TestTypeConversion.out | FileCheck -check-prefix=CHECK-EXEC %s //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" #include @@ -20,7 +19,7 @@ float fn_type_conversion(float z, int a) { void fn_type_conversion_grad(float z, int a, float *_d_z, int *_d_a); // CHECK: void fn_type_conversion_grad(float z, int a, float *_d_z, int *_d_a) { -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_i = 0; // CHECK-NEXT: int i = 0; // CHECK-NEXT: clad::tape _t1 = {}; diff --git a/test/Gradient/UserDefinedTypes.C b/test/Gradient/UserDefinedTypes.C index 538c06471..37e4fcde7 100644 --- a/test/Gradient/UserDefinedTypes.C +++ b/test/Gradient/UserDefinedTypes.C @@ -3,7 +3,7 @@ // RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-tbr %s -I%S/../../include -oUserDefinedTypes.out // RUN: ./UserDefinedTypes.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} + #include "clad/Differentiator/Differentiator.h" #include @@ -57,7 +57,7 @@ double sum(Tangent& t) { // CHECK: void sum_pullback(Tangent &t, double _d_y, Tangent *_d_t) { // CHECK-NEXT: double _d_res = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_i = 0; // CHECK-NEXT: int i = 0; // CHECK-NEXT: clad::tape _t1 = {}; @@ -88,7 +88,7 @@ double sum(double *data) { // CHECK: void sum_pullback(double *data, double _d_y, double *_d_data) { // CHECK-NEXT: double _d_res = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_i = 0; // CHECK-NEXT: int i = 0; // CHECK-NEXT: clad::tape _t1 = {}; @@ -360,7 +360,7 @@ double fn8(Tangent t, dcomplex c) { } // CHECK: void updateTo_pullback(double d, Tangent *_d_this, double *_d_d) { -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_i = 0; // CHECK-NEXT: int i = 0; // CHECK-NEXT: clad::tape _t1 = {}; @@ -411,7 +411,7 @@ double fn9(Tangent t, dcomplex c) { // CHECK: void fn9_grad(Tangent t, dcomplex c, Tangent *_d_t, dcomplex *_d_c) { // CHECK-NEXT: double _d_res = 0; -// CHECK-NEXT: unsigned long _t0; +// CHECK-NEXT: unsigned {{int|long}} _t0; // CHECK-NEXT: int _d_i = 0; // CHECK-NEXT: int i = 0; // CHECK-NEXT: clad::tape _t1 = {}; diff --git a/test/Hessian/Arrays.C b/test/Hessian/Arrays.C index ac4d81a78..e8ea5d1b8 100644 --- a/test/Hessian/Arrays.C +++ b/test/Hessian/Arrays.C @@ -4,23 +4,21 @@ // RUN: ./Arrays.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" double f(double i, double j[2]) { return i * j[0] * j[1]; } // CHECK: void f_hessian(double i, double j[2], double *hessianMatrix) { -// CHECK-NEXT: f_darg0_grad(i, j, hessianMatrix + 0UL, hessianMatrix + 1UL); -// CHECK-NEXT: f_darg1_0_grad(i, j, hessianMatrix + 3UL, hessianMatrix + 4UL); -// CHECK-NEXT: f_darg1_1_grad(i, j, hessianMatrix + 6UL, hessianMatrix + 7UL); +// CHECK-NEXT: f_darg0_grad(i, j, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +// CHECK-NEXT: f_darg1_0_grad(i, j, hessianMatrix + {{3U|3UL}}, hessianMatrix + {{4U|4UL}}); +// CHECK-NEXT: f_darg1_1_grad(i, j, hessianMatrix + {{6U|6UL}}, hessianMatrix + {{7U|7UL}}); // CHECK-NEXT: } double g(double i, double j[2]) { return i * (j[0] + j[1]); } - // CHECK: void g_hessian(double i, double j[2], double *hessianMatrix) { -// CHECK-NEXT: g_darg0_grad(i, j, hessianMatrix + 0UL, hessianMatrix + 1UL); -// CHECK-NEXT: g_darg1_0_grad(i, j, hessianMatrix + 3UL, hessianMatrix + 4UL); -// CHECK-NEXT: g_darg1_1_grad(i, j, hessianMatrix + 6UL, hessianMatrix + 7UL); +// CHECK-NEXT: g_darg0_grad(i, j, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +// CHECK-NEXT: g_darg1_0_grad(i, j, hessianMatrix + {{3U|3UL}}, hessianMatrix + {{4U|4UL}}); +// CHECK-NEXT: g_darg1_1_grad(i, j, hessianMatrix + {{6U|6UL}}, hessianMatrix + {{7U|7UL}}); // CHECK-NEXT: } #define TEST(var, i, j) \ @@ -47,4 +45,4 @@ int main() { TEST(h1, 2, x); // CHECK-EXEC: Result = {0.00 4.00 3.00 4.00 0.00 2.00 3.00 2.00 0.00} auto h2 = clad::hessian(g, "i, j[0:1]"); TEST(h2, 2, x); // CHECK-EXEC: Result = {0.00 1.00 1.00 1.00 0.00 0.00 1.00 0.00 0.00} -} \ No newline at end of file +} diff --git a/test/Hessian/BuiltinDerivatives.C b/test/Hessian/BuiltinDerivatives.C index 7376dd5d9..e10ab3ae2 100644 --- a/test/Hessian/BuiltinDerivatives.C +++ b/test/Hessian/BuiltinDerivatives.C @@ -5,7 +5,6 @@ //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" #include @@ -83,7 +82,7 @@ float f1(float x) { // CHECK-NEXT: } // CHECK: void f1_hessian(float x, float *hessianMatrix) { -// CHECK-NEXT: f1_darg0_grad(x, hessianMatrix + 0UL); +// CHECK-NEXT: f1_darg0_grad(x, hessianMatrix + {{0U|0UL}}); // CHECK-NEXT: } float f2(float x) { @@ -130,7 +129,7 @@ float f2(float x) { // CHECK-NEXT: } // CHECK: void f2_hessian(float x, float *hessianMatrix) { -// CHECK-NEXT: f2_darg0_grad(x, hessianMatrix + 0UL); +// CHECK-NEXT: f2_darg0_grad(x, hessianMatrix + {{0U|0UL}}); // CHECK-NEXT: } @@ -175,7 +174,7 @@ float f3(float x) { // CHECK-NEXT: } // CHECK: void f3_hessian(float x, float *hessianMatrix) { -// CHECK-NEXT: f3_darg0_grad(x, hessianMatrix + 0UL); +// CHECK-NEXT: f3_darg0_grad(x, hessianMatrix + {{0U|0UL}}); // CHECK-NEXT: } @@ -264,7 +263,7 @@ float f4(float x) { // CHECK-NEXT: } // CHECK: void f4_hessian(float x, float *hessianMatrix) { -// CHECK-NEXT: f4_darg0_grad(x, hessianMatrix + 0UL); +// CHECK-NEXT: f4_darg0_grad(x, hessianMatrix + {{0U|0UL}}); // CHECK-NEXT: } @@ -298,7 +297,7 @@ float f5(float x) { // CHECK-NEXT: } // CHECK: void f5_hessian(float x, float *hessianMatrix) { -// CHECK-NEXT: f5_darg0_grad(x, hessianMatrix + 0UL); +// CHECK-NEXT: f5_darg0_grad(x, hessianMatrix + {{0U|0UL}}); // CHECK-NEXT: } @@ -367,8 +366,8 @@ float f6(float x, float y) { // CHECK-NEXT: } // CHECK: void f6_hessian(float x, float y, float *hessianMatrix) { -// CHECK-NEXT: f6_darg0_grad(x, y, hessianMatrix + 0UL, hessianMatrix + 1UL); -// CHECK-NEXT: f6_darg1_grad(x, y, hessianMatrix + 2UL, hessianMatrix + 3UL); +// CHECK-NEXT: f6_darg0_grad(x, y, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +// CHECK-NEXT: f6_darg1_grad(x, y, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } diff --git a/test/Hessian/Functors.C b/test/Hessian/Functors.C index 1d46ce1c5..a41c382b9 100644 --- a/test/Hessian/Functors.C +++ b/test/Hessian/Functors.C @@ -19,9 +19,9 @@ struct Experiment { // CHECK: void operator_call_hessian(double i, double j, double *hessianMatrix) { // CHECK-NEXT: Experiment _d_this; - // CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + 0UL, hessianMatrix + 1UL); + // CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); // CHECK-NEXT: Experiment _d_this0; - // CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + 2UL, hessianMatrix + 3UL); + // CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } }; @@ -37,9 +37,9 @@ struct ExperimentConst { // CHECK: void operator_call_hessian(double i, double j, double *hessianMatrix) const { // CHECK-NEXT: ExperimentConst _d_this; - // CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + 0UL, hessianMatrix + 1UL); + // CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); // CHECK-NEXT: ExperimentConst _d_this0; - // CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + 2UL, hessianMatrix + 3UL); + // CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } }; @@ -55,9 +55,9 @@ struct ExperimentVolatile { // CHECK: void operator_call_hessian(double i, double j, double *hessianMatrix) volatile { // CHECK-NEXT: volatile ExperimentVolatile _d_this; - // CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + 0UL, hessianMatrix + 1UL); + // CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); // CHECK-NEXT: volatile ExperimentVolatile _d_this0; - // CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + 2UL, hessianMatrix + 3UL); + // CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } }; @@ -73,9 +73,9 @@ struct ExperimentConstVolatile { // CHECK: void operator_call_hessian(double i, double j, double *hessianMatrix) const volatile { // CHECK-NEXT: volatile ExperimentConstVolatile _d_this; - // CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + 0UL, hessianMatrix + 1UL); + // CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); // CHECK-NEXT: volatile ExperimentConstVolatile _d_this0; - // CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + 2UL, hessianMatrix + 3UL); + // CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } }; @@ -93,9 +93,9 @@ namespace outer { // CHECK: void operator_call_hessian(double i, double j, double *hessianMatrix) { // CHECK-NEXT: outer::inner::ExperimentNNS _d_this; - // CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + 0UL, hessianMatrix + 1UL); + // CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); // CHECK-NEXT: outer::inner::ExperimentNNS _d_this0; - // CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + 2UL, hessianMatrix + 3UL); + // CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } }; @@ -104,8 +104,8 @@ namespace outer { }; // CHECK: inline void operator_call_hessian(double i, double j, double *hessianMatrix) const { - // CHECK-NEXT: this->operator_call_darg0_grad(i, j, hessianMatrix + 0UL, hessianMatrix + 1UL); - // CHECK-NEXT: this->operator_call_darg1_grad(i, j, hessianMatrix + 2UL, hessianMatrix + 3UL); + // CHECK-NEXT: this->operator_call_darg0_grad(i, j, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); + // CHECK-NEXT: this->operator_call_darg1_grad(i, j, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } } } @@ -140,8 +140,8 @@ int main() { }; // CHECK: inline void operator_call_hessian(double i, double j, double *hessianMatrix) const { - // CHECK-NEXT: this->operator_call_darg0_grad(i, j, hessianMatrix + 0UL, hessianMatrix + 1UL); - // CHECK-NEXT: this->operator_call_darg1_grad(i, j, hessianMatrix + 2UL, hessianMatrix + 3UL); + // CHECK-NEXT: this->operator_call_darg0_grad(i, j, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); + // CHECK-NEXT: this->operator_call_darg1_grad(i, j, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } auto lambdaWithCapture = [&](double i, double jj) { @@ -149,8 +149,8 @@ int main() { }; // CHECK: inline void operator_call_hessian(double i, double jj, double *hessianMatrix) const { - // CHECK-NEXT: this->operator_call_darg0_grad(i, jj, hessianMatrix + 0UL, hessianMatrix + 1UL); - // CHECK-NEXT: this->operator_call_darg1_grad(i, jj, hessianMatrix + 2UL, hessianMatrix + 3UL); + // CHECK-NEXT: this->operator_call_darg0_grad(i, jj, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); + // CHECK-NEXT: this->operator_call_darg1_grad(i, jj, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } auto lambdaNNS = outer::inner::lambdaNNS; @@ -194,4 +194,4 @@ int main() { TEST(E_NNS); // CHECK-EXEC: {108.00, 174.00, 174.00, 70.00}, {108.00, 174.00, 174.00, 70.00} TEST(E_NNS_Again); // CHECK-EXEC: {108.00, 174.00, 174.00, 70.00}, {108.00, 174.00, 174.00, 70.00} TEST(lambdaWithCapture); // CHECK-EXEC: {108.00, 174.00, 174.00, 70.00}, {108.00, 174.00, 174.00, 70.00} -} \ No newline at end of file +} diff --git a/test/Hessian/Hessians.C b/test/Hessian/Hessians.C index f7c303dbc..c13960318 100644 --- a/test/Hessian/Hessians.C +++ b/test/Hessian/Hessians.C @@ -4,7 +4,6 @@ // RUN: ./Hessians.out | FileCheck -check-prefix=CHECK-EXEC %s //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -90,8 +89,8 @@ void f_cubed_add1_darg1_grad(double a, double b, double *_d_a, double *_d_b); void f_cubed_add1_hessian(double a, double b, double *hessianMatrix); //CHECK: void f_cubed_add1_hessian(double a, double b, double *hessianMatrix) __attribute__((always_inline)) { -//CHECK-NEXT: f_cubed_add1_darg0_grad(a, b, hessianMatrix + 0UL, hessianMatrix + 1UL); -//CHECK-NEXT: f_cubed_add1_darg1_grad(a, b, hessianMatrix + 2UL, hessianMatrix + 3UL); +//CHECK-NEXT: f_cubed_add1_darg0_grad(a, b, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +//CHECK-NEXT: f_cubed_add1_darg1_grad(a, b, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); //CHECK-NEXT: } double f_suvat1(double u, double t) { @@ -103,8 +102,8 @@ void f_suvat1_darg1_grad(double u, double t, double *_d_u, double *_d_t); void f_suvat1_hessian(double u, double t, double *hessianMatrix); //CHECK:void f_suvat1_hessian(double u, double t, double *hessianMatrix) { -//CHECK-NEXT: f_suvat1_darg0_grad(u, t, hessianMatrix + 0UL, hessianMatrix + 1UL); -//CHECK-NEXT: f_suvat1_darg1_grad(u, t, hessianMatrix + 2UL, hessianMatrix + 3UL); +//CHECK-NEXT: f_suvat1_darg0_grad(u, t, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +//CHECK-NEXT: f_suvat1_darg1_grad(u, t, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); //CHECK-NEXT:} double f_cond3(double x, double c) { @@ -121,8 +120,8 @@ void f_cond3_darg1_grad(double x, double c, double *_d_x, double *_d_c); void f_cond3_hessian(double x, double c, double *hessianMatrix); //CHECK:void f_cond3_hessian(double x, double c, double *hessianMatrix) { -//CHECK-NEXT: f_cond3_darg0_grad(x, c, hessianMatrix + 0UL, hessianMatrix + 1UL); -//CHECK-NEXT: f_cond3_darg1_grad(x, c, hessianMatrix + 2UL, hessianMatrix + 3UL); +//CHECK-NEXT: f_cond3_darg0_grad(x, c, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +//CHECK-NEXT: f_cond3_darg1_grad(x, c, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); //CHECK-NEXT:} double f_power10(double x) { @@ -133,7 +132,7 @@ void f_power10_darg0_grad(double x, double *_d_x); void f_power10_hessian(double x, double *hessianMatrix); //CHECK: void f_power10_hessian(double x, double *hessianMatrix) { -//CHECK-NEXT: f_power10_darg0_grad(x, hessianMatrix + 0UL); +//CHECK-NEXT: f_power10_darg0_grad(x, hessianMatrix + {{0U|0UL}}); //CHECK-NEXT: } struct Experiment { @@ -155,9 +154,9 @@ struct Experiment { void someMethod_hessian(double x, double *hessianMatrix); // CHECK: void someMethod_hessian(double i, double j, double *hessianMatrix) { // CHECK-NEXT: Experiment _d_this; - // CHECK-NEXT: this->someMethod_darg0_grad(i, j, &_d_this, hessianMatrix + 0UL, hessianMatrix + 1UL); + // CHECK-NEXT: this->someMethod_darg0_grad(i, j, &_d_this, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); // CHECK-NEXT: Experiment _d_this0; - // CHECK-NEXT: this->someMethod_darg1_grad(i, j, &_d_this0, hessianMatrix + 2UL, hessianMatrix + 3UL); + // CHECK-NEXT: this->someMethod_darg1_grad(i, j, &_d_this0, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } }; @@ -182,9 +181,9 @@ struct Widget { double *hessianMatrix); // CHECK: void memFn_1_hessian(double i, double j, double *hessianMatrix) { // CHECK-NEXT: Widget _d_this; - // CHECK-NEXT: this->memFn_1_darg0_grad(i, j, &_d_this, hessianMatrix + 0UL, hessianMatrix + 1UL); + // CHECK-NEXT: this->memFn_1_darg0_grad(i, j, &_d_this, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); // CHECK-NEXT: Widget _d_this0; - // CHECK-NEXT: this->memFn_1_darg1_grad(i, j, &_d_this0, hessianMatrix + 2UL, hessianMatrix + 3UL); + // CHECK-NEXT: this->memFn_1_darg1_grad(i, j, &_d_this0, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } double memFn_2(double i, double j) { @@ -207,9 +206,9 @@ struct Widget { double *hessianMatrix); // CHECK: void memFn_2_hessian(double i, double j, double *hessianMatrix) { // CHECK-NEXT: Widget _d_this; - // CHECK-NEXT: this->memFn_2_darg0_grad(i, j, &_d_this, hessianMatrix + 0UL, hessianMatrix + 1UL); + // CHECK-NEXT: this->memFn_2_darg0_grad(i, j, &_d_this, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); // CHECK-NEXT: Widget _d_this0; - // CHECK-NEXT: this->memFn_2_darg1_grad(i, j, &_d_this0, hessianMatrix + 2UL, hessianMatrix + 3UL); + // CHECK-NEXT: this->memFn_2_darg1_grad(i, j, &_d_this0, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } }; diff --git a/test/Hessian/NestedFunctionCalls.C b/test/Hessian/NestedFunctionCalls.C index c017ebca0..5774fcb0b 100644 --- a/test/Hessian/NestedFunctionCalls.C +++ b/test/Hessian/NestedFunctionCalls.C @@ -4,7 +4,6 @@ // RUN: ./NestedFunctionCalls.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -118,8 +117,8 @@ double f2(double x, double y){ // CHECK-NEXT: } // CHECK: void f2_hessian(double x, double y, double *hessianMatrix) { -// CHECK-NEXT: f2_darg0_grad(x, y, hessianMatrix + 0UL, hessianMatrix + 1UL); -// CHECK-NEXT: f2_darg1_grad(x, y, hessianMatrix + 2UL, hessianMatrix + 3UL); +// CHECK-NEXT: f2_darg0_grad(x, y, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +// CHECK-NEXT: f2_darg1_grad(x, y, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } int main() { diff --git a/test/Hessian/Pointers.C b/test/Hessian/Pointers.C index f4806f90e..bc8439ed4 100644 --- a/test/Hessian/Pointers.C +++ b/test/Hessian/Pointers.C @@ -3,7 +3,6 @@ // RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-tbr %s -I%S/../../include -oPointers.out // RUN: ./Pointers.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -54,8 +53,8 @@ double nonMemFn(double i, double j) { // CHECK-NEXT: } // CHECK: void nonMemFn_hessian(double i, double j, double *hessianMatrix) { -// CHECK-NEXT: nonMemFn_darg0_grad(i, j, hessianMatrix + 0UL, hessianMatrix + 1UL); -// CHECK-NEXT: nonMemFn_darg1_grad(i, j, hessianMatrix + 2UL, hessianMatrix + 3UL); +// CHECK-NEXT: nonMemFn_darg0_grad(i, j, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +// CHECK-NEXT: nonMemFn_darg1_grad(i, j, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } #define NON_MEM_FN_TEST(var)\ diff --git a/test/Hessian/TemplateFunctors.C b/test/Hessian/TemplateFunctors.C index 8d9c3d489..8f913f64d 100644 --- a/test/Hessian/TemplateFunctors.C +++ b/test/Hessian/TemplateFunctors.C @@ -3,7 +3,6 @@ // RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-tbr %s -I%S/../../include -oTemplateFunctors.out // RUN: ./TemplateFunctors.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -16,9 +15,9 @@ template struct Experiment { // CHECK: void operator_call_hessian(double i, double j, double *hessianMatrix) { // CHECK-NEXT: Experiment _d_this; -// CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + 0UL, hessianMatrix + 1UL); +// CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); // CHECK-NEXT: Experiment _d_this0; -// CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + 2UL, hessianMatrix + 3UL); +// CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } template <> struct Experiment { @@ -32,9 +31,9 @@ template <> struct Experiment { // CHECK: void operator_call_hessian(long double i, long double j, long double *hessianMatrix) { // CHECK-NEXT: Experiment _d_this; -// CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + 0UL, hessianMatrix + 1UL); +// CHECK-NEXT: this->operator_call_darg0_grad(i, j, &_d_this, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); // CHECK-NEXT: Experiment _d_this0; -// CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + 2UL, hessianMatrix + 3UL); +// CHECK-NEXT: this->operator_call_darg1_grad(i, j, &_d_this0, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); // CHECK-NEXT: } #define INIT(E) \ diff --git a/test/Hessian/constexprTest.C b/test/Hessian/constexprTest.C index 3d3fe533a..c73c9b2a4 100644 --- a/test/Hessian/constexprTest.C +++ b/test/Hessian/constexprTest.C @@ -3,7 +3,6 @@ // RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-tbr %s -I%S/../../include -std=c++14 -oconstexprTest.out // RUN: ./constexprTest.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" #include @@ -19,16 +18,16 @@ clad::array_refmat_ref_f1(mat_ref1, 9); constexpr double fn(double x, double y) { return x * y; } //CHECK: constexpr void fn_hessian(double x, double y, double *hessianMatrix) { -//CHECK-NEXT: fn_darg0_grad(x, y, hessianMatrix + 0UL, hessianMatrix + 1UL); -//CHECK-NEXT: fn_darg1_grad(x, y, hessianMatrix + 2UL, hessianMatrix + 3UL); +//CHECK-NEXT: fn_darg0_grad(x, y, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +//CHECK-NEXT: fn_darg1_grad(x, y, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); //CHECK-NEXT:} constexpr double g(double i, double j[2]) { return i * (j[0] + j[1]); } //CHECK: constexpr void g_hessian(double i, double j[2], double *hessianMatrix) { -//CHECK-NEXT: g_darg0_grad(i, j, hessianMatrix + 0UL, hessianMatrix + 1UL); -//CHECK-NEXT: g_darg1_0_grad(i, j, hessianMatrix + 3UL, hessianMatrix + 4UL); -//CHECK-NEXT: g_darg1_1_grad(i, j, hessianMatrix + 6UL, hessianMatrix + 7UL); +//CHECK-NEXT: g_darg0_grad(i, j, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +//CHECK-NEXT: g_darg1_0_grad(i, j, hessianMatrix + {{3U|3UL}}, hessianMatrix + {{4U|4UL}}); +//CHECK-NEXT: g_darg1_1_grad(i, j, hessianMatrix + {{6U|6UL}}, hessianMatrix + {{7U|7UL}}); //CHECK-NEXT:} int main() { diff --git a/test/Hessian/testhessUtility.C b/test/Hessian/testhessUtility.C index 11cff4524..de128d077 100644 --- a/test/Hessian/testhessUtility.C +++ b/test/Hessian/testhessUtility.C @@ -3,7 +3,6 @@ // RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-tbr %s -I%S/../../include -otesthessUtility.out // RUN: ./testhessUtility.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -19,16 +18,16 @@ clad::array_refmat_ref_f1(mat_ref1, 9); double fn(double x, double y) { return x * y; } //CHECK: void fn_hessian(double x, double y, double *hessianMatrix) { -//CHECK-NEXT: fn_darg0_grad(x, y, hessianMatrix + 0UL, hessianMatrix + 1UL); -//CHECK-NEXT: fn_darg1_grad(x, y, hessianMatrix + 2UL, hessianMatrix + 3UL); +//CHECK-NEXT: fn_darg0_grad(x, y, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +//CHECK-NEXT: fn_darg1_grad(x, y, hessianMatrix + {{2U|2UL}}, hessianMatrix + {{3U|3UL}}); //CHECK-NEXT:} double g(double i, double j[2]) { return i * (j[0] + j[1]); } //CHECK: void g_hessian(double i, double j[2], double *hessianMatrix) { -//CHECK-NEXT: g_darg0_grad(i, j, hessianMatrix + 0UL, hessianMatrix + 1UL); -//CHECK-NEXT: g_darg1_0_grad(i, j, hessianMatrix + 3UL, hessianMatrix + 4UL); -//CHECK-NEXT: g_darg1_1_grad(i, j, hessianMatrix + 6UL, hessianMatrix + 7UL); +//CHECK-NEXT: g_darg0_grad(i, j, hessianMatrix + {{0U|0UL}}, hessianMatrix + {{1U|1UL}}); +//CHECK-NEXT: g_darg1_0_grad(i, j, hessianMatrix + {{3U|3UL}}, hessianMatrix + {{4U|4UL}}); +//CHECK-NEXT: g_darg1_1_grad(i, j, hessianMatrix + {{6U|6UL}}, hessianMatrix + {{7U|7UL}}); //CHECK-NEXT: } int main() { @@ -39,4 +38,4 @@ int main() { TEST_HESSIAN(fn, 2, 2, 3, mat_ref_f); // CHECK-EXEC: {0.00, 1.00, 1.00, 0.00} TEST_HESSIAN(g, 2, 2, j, mat_ref_f1); // CHECK-EXEC: {0.00, 1.00, 1.00, 1.00, 0.00, 0.00, 1.00, 0.00, 0.00} -} \ No newline at end of file +} diff --git a/test/Jacobian/FunctionCalls.C b/test/Jacobian/FunctionCalls.C index ea3966847..57cf0c11b 100644 --- a/test/Jacobian/FunctionCalls.C +++ b/test/Jacobian/FunctionCalls.C @@ -4,7 +4,6 @@ // RUN: ./FunctionCalls.out | FileCheck -check-prefix=CHECK-EXEC %s //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include #include "clad/Differentiator/Differentiator.h" @@ -23,15 +22,15 @@ void fn1(double i, double j, double* output) { // CHECK-NEXT: double _r2 = 0; // CHECK-NEXT: double _r3 = 0; // CHECK-NEXT: clad::custom_derivatives::pow_pullback(j, i, 1, &_r2, &_r3); -// CHECK-NEXT: jacobianMatrix[3UL] += _r2; -// CHECK-NEXT: jacobianMatrix[2UL] += _r3; +// CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += _r2; +// CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += _r3; // CHECK-NEXT: } // CHECK-NEXT: { // CHECK-NEXT: double _r0 = 0; // CHECK-NEXT: double _r1 = 0; // CHECK-NEXT: clad::custom_derivatives::pow_pullback(i, j, 1, &_r0, &_r1); -// CHECK-NEXT: jacobianMatrix[0UL] += _r0; -// CHECK-NEXT: jacobianMatrix[1UL] += _r1; +// CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += _r0; +// CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += _r1; // CHECK-NEXT: } // CHECK-NEXT: } @@ -61,4 +60,4 @@ int main() { INIT(fn1); test<2>(DERIVED_FN(fn1), 3, 5); // CHECK-EXEC: {405.00, 266.96, 201.18, 75.00} -} \ No newline at end of file +} 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 +} diff --git a/test/Jacobian/Jacobian.C b/test/Jacobian/Jacobian.C index d86458f4c..318acd0f2 100644 --- a/test/Jacobian/Jacobian.C +++ b/test/Jacobian/Jacobian.C @@ -4,7 +4,6 @@ // RUN: ./Jacobian.out | FileCheck -check-prefix=CHECK-EXEC %s //CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" #include @@ -21,23 +20,23 @@ void f_1_jac(double a, double b, double c, double output[], double *_result); //CHECK-NEXT: output[1] = a * a * a + b * b * b; //CHECK-NEXT: output[2] = c * c * 10 - a * a; //CHECK-NEXT: { -//CHECK-NEXT: jacobianMatrix[8UL] += 1 * 10 * c; -//CHECK-NEXT: jacobianMatrix[8UL] += c * 1 * 10; -//CHECK-NEXT: jacobianMatrix[6UL] += -1 * a; -//CHECK-NEXT: jacobianMatrix[6UL] += a * -1; +//CHECK-NEXT: jacobianMatrix[{{8U|8UL}}] += 1 * 10 * c; +//CHECK-NEXT: jacobianMatrix[{{8U|8UL}}] += c * 1 * 10; +//CHECK-NEXT: jacobianMatrix[{{6U|6UL}}] += -1 * a; +//CHECK-NEXT: jacobianMatrix[{{6U|6UL}}] += a * -1; //CHECK-NEXT: } //CHECK-NEXT: { -//CHECK-NEXT: jacobianMatrix[3UL] += 1 * a * a; -//CHECK-NEXT: jacobianMatrix[3UL] += a * 1 * a; -//CHECK-NEXT: jacobianMatrix[3UL] += a * a * 1; -//CHECK-NEXT: jacobianMatrix[4UL] += 1 * b * b; -//CHECK-NEXT: jacobianMatrix[4UL] += b * 1 * b; -//CHECK-NEXT: jacobianMatrix[4UL] += b * b * 1; +//CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += 1 * a * a; +//CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += a * 1 * a; +//CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += a * a * 1; +//CHECK-NEXT: jacobianMatrix[{{4U|4UL}}] += 1 * b * b; +//CHECK-NEXT: jacobianMatrix[{{4U|4UL}}] += b * 1 * b; +//CHECK-NEXT: jacobianMatrix[{{4U|4UL}}] += b * b * 1; //CHECK-NEXT: } //CHECK-NEXT: { -//CHECK-NEXT: jacobianMatrix[0UL] += 1 * a * a; -//CHECK-NEXT: jacobianMatrix[0UL] += a * 1 * a; -//CHECK-NEXT: jacobianMatrix[0UL] += a * a * 1; +//CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += 1 * a * a; +//CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += a * 1 * a; +//CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += a * a * 1; //CHECK-NEXT: } //CHECK-NEXT:} @@ -66,17 +65,17 @@ void f_3_jac(double x, double y, double z, double *_result, double *jacobianMatr //CHECK-NEXT: { //CHECK-NEXT: double _r2 = 0; //CHECK-NEXT: _r2 += 1 * constant * clad::custom_derivatives::sin_pushforward(z, 1.).pushforward; -//CHECK-NEXT: jacobianMatrix[8UL] += _r2; +//CHECK-NEXT: jacobianMatrix[{{8U|8UL}}] += _r2; //CHECK-NEXT: } //CHECK-NEXT: { //CHECK-NEXT: double _r1 = 0; //CHECK-NEXT: _r1 += 1 * constant * clad::custom_derivatives::sin_pushforward(y, 1.).pushforward; -//CHECK-NEXT: jacobianMatrix[4UL] += _r1; +//CHECK-NEXT: jacobianMatrix[{{4U|4UL}}] += _r1; //CHECK-NEXT: } //CHECK-NEXT: { //CHECK-NEXT: double _r0 = 0; //CHECK-NEXT: _r0 += 1 * constant * clad::custom_derivatives::sin_pushforward(x, 1.).pushforward; -//CHECK-NEXT: jacobianMatrix[0UL] += _r0; +//CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += _r0; //CHECK-NEXT: } //CHECK-NEXT:} @@ -115,22 +114,22 @@ void f_4_jac(double x, double y, double z, double *_result, double *jacobianMatr //CHECK-NEXT: double _r4 = 0; //CHECK-NEXT: double _r5 = 0; //CHECK-NEXT: multiply_pullback(z, x, 1 * constant, &_r4, &_r5); -//CHECK-NEXT: jacobianMatrix[8UL] += _r4; -//CHECK-NEXT: jacobianMatrix[6UL] += _r5; +//CHECK-NEXT: jacobianMatrix[{{8U|8UL}}] += _r4; +//CHECK-NEXT: jacobianMatrix[{{6U|6UL}}] += _r5; //CHECK-NEXT: } //CHECK-NEXT: { //CHECK-NEXT: double _r2 = 0; //CHECK-NEXT: double _r3 = 0; //CHECK-NEXT: multiply_pullback(y, z, 1 * constant, &_r2, &_r3); -//CHECK-NEXT: jacobianMatrix[4UL] += _r2; -//CHECK-NEXT: jacobianMatrix[5UL] += _r3; +//CHECK-NEXT: jacobianMatrix[{{4U|4UL}}] += _r2; +//CHECK-NEXT: jacobianMatrix[{{5U|5UL}}] += _r3; //CHECK-NEXT: } //CHECK-NEXT: { //CHECK-NEXT: double _r0 = 0; //CHECK-NEXT: double _r1 = 0; //CHECK-NEXT: multiply_pullback(x, y, 1 * constant, &_r0, &_r1); -//CHECK-NEXT: jacobianMatrix[0UL] += _r0; -//CHECK-NEXT: jacobianMatrix[1UL] += _r1; +//CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += _r0; +//CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += _r1; //CHECK-NEXT: } //CHECK-NEXT:} @@ -142,19 +141,19 @@ void f_1_jac_0(double a, double b, double c, double output[], double *jacobianMa // CHECK-NEXT: output[1] = a * a * a + b * b * b; // CHECK-NEXT: output[2] = c * c * 10 - a * a; // CHECK-NEXT: { -// CHECK-NEXT: jacobianMatrix[2UL] += -1 * a; -// CHECK-NEXT: jacobianMatrix[2UL] += a * -1; +// CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += -1 * a; +// CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += a * -1; // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: jacobianMatrix[1UL] += 1 * a * a; -// CHECK-NEXT: jacobianMatrix[1UL] += a * 1 * a; -// CHECK-NEXT: jacobianMatrix[1UL] += a * a * 1; +// CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += 1 * a * a; +// CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += a * 1 * a; +// CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += a * a * 1; // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: jacobianMatrix[0UL] += 1 * a * a; -// CHECK-NEXT: jacobianMatrix[0UL] += a * 1 * a; +// CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += 1 * a * a; +// CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += a * 1 * a; -// CHECK-NEXT: jacobianMatrix[0UL] += a * a * 1; +// CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += a * a * 1; // CHECK-NEXT: } // CHECK-NEXT:} diff --git a/test/Jacobian/Pointers.C b/test/Jacobian/Pointers.C index 7c74193aa..5ead9a5d6 100644 --- a/test/Jacobian/Pointers.C +++ b/test/Jacobian/Pointers.C @@ -14,10 +14,9 @@ void nonMemFn(double i, double j, double* out) { // CHECK: void nonMemFn_jac(double i, double j, double *out, double *jacobianMatrix) { // CHECK-NEXT: out[0] = i; // CHECK-NEXT: out[1] = j; -// CHECK-NEXT: jacobianMatrix[3UL] += 1; -// CHECK-NEXT: jacobianMatrix[0UL] += 1; +// CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += 1; +// CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += 1; // CHECK-NEXT: } -// XFAIL: target={{i586.*}} #define NON_MEM_FN_TEST(var)\ @@ -46,4 +45,4 @@ int main() { NON_MEM_FN_TEST(d_nonMemFnPtrToPtr); // CHECK-EXEC: {1.00 0.00 0.00 1.00} NON_MEM_FN_TEST(d_nonMemFnPtrToPtrPar); // CHECK-EXEC: {1.00 0.00 0.00 1.00} -} \ No newline at end of file +} diff --git a/test/Jacobian/TemplateFunctors.C b/test/Jacobian/TemplateFunctors.C index 9993b7ba3..95cd2b2d2 100644 --- a/test/Jacobian/TemplateFunctors.C +++ b/test/Jacobian/TemplateFunctors.C @@ -3,7 +3,6 @@ // RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-tbr %s -I%S/../../include -oTemplateFunctors.out // RUN: ./TemplateFunctors.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -21,12 +20,12 @@ template struct Experiment { // CHECK-NEXT: output[0] = this->x * this->y * i * j; // CHECK-NEXT: output[1] = 2 * this->x * this->y * i * j; // CHECK-NEXT: { -// CHECK-NEXT: jacobianMatrix[2UL] += 2 * this->x * this->y * 1 * j; -// CHECK-NEXT: jacobianMatrix[3UL] += 2 * this->x * this->y * i * 1; +// CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += 2 * this->x * this->y * 1 * j; +// CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += 2 * this->x * this->y * i * 1; // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: jacobianMatrix[0UL] += this->x * this->y * 1 * j; -// CHECK-NEXT: jacobianMatrix[1UL] += this->x * this->y * i * 1; +// CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += this->x * this->y * 1 * j; +// CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += this->x * this->y * i * 1; // CHECK-NEXT: } // CHECK-NEXT: } @@ -44,14 +43,14 @@ template <> struct Experiment { // CHECK-NEXT: output[0] = this->x * this->y * i * i * j; // CHECK-NEXT: output[1] = 2 * this->x * this->y * i * i * j; // CHECK-NEXT: { -// CHECK-NEXT: jacobianMatrix[2UL] += 2 * this->x * this->y * 1 * j * i; -// CHECK-NEXT: jacobianMatrix[2UL] += 2 * this->x * this->y * i * 1 * j; -// CHECK-NEXT: jacobianMatrix[3UL] += 2 * this->x * this->y * i * i * 1; +// CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += 2 * this->x * this->y * 1 * j * i; +// CHECK-NEXT: jacobianMatrix[{{2U|2UL}}] += 2 * this->x * this->y * i * 1 * j; +// CHECK-NEXT: jacobianMatrix[{{3U|3UL}}] += 2 * this->x * this->y * i * i * 1; // CHECK-NEXT: } // CHECK-NEXT: { -// CHECK-NEXT: jacobianMatrix[0UL] += this->x * this->y * 1 * j * i; -// CHECK-NEXT: jacobianMatrix[0UL] += this->x * this->y * i * 1 * j; -// CHECK-NEXT: jacobianMatrix[1UL] += this->x * this->y * i * i * 1; +// CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += this->x * this->y * 1 * j * i; +// CHECK-NEXT: jacobianMatrix[{{0U|0UL}}] += this->x * this->y * i * 1 * j; +// CHECK-NEXT: jacobianMatrix[{{1U|1UL}}] += this->x * this->y * i * i * 1; // CHECK-NEXT: } // CHECK-NEXT: } @@ -100,4 +99,4 @@ int main() { TEST_DOUBLE(E, 7, 9); // CHECK-EXEC: {225.00, 175.00, 450.00, 350.00} {225.00, 175.00, 450.00, 350.00} TEST_LONG_DOUBLE(E_ld, 7, 9); // CHECK-EXEC: {3150.00, 1225.00, 6300.00, 2450.00} {3150.00, 1225.00, 6300.00, 2450.00} -} \ No newline at end of file +} diff --git a/test/Jacobian/constexprTest.C b/test/Jacobian/constexprTest.C index 1e8141065..a7ce4a357 100644 --- a/test/Jacobian/constexprTest.C +++ b/test/Jacobian/constexprTest.C @@ -3,7 +3,6 @@ // RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-tbr %s -I%S/../../include -std=c++14 -oconstexprTest.out // RUN: ./constexprTest.out | FileCheck -check-prefix=CHECK-EXEC %s // CHECK-NOT: {{.*error|warning|note:.*}} -// XFAIL: target={{i586.*}} #include "clad/Differentiator/Differentiator.h" @@ -25,16 +24,16 @@ constexpr 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:} @@ -49,23 +48,23 @@ constexpr 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:} @@ -76,4 +75,4 @@ int main() { TEST_JACOBIAN(fn_mul, 2, 6, 3, 1, result, jacobianou); // CHECK-EXEC: {6.00, 0.00, 0.00, 2.00, 1.00, 3.00} TEST_JACOBIAN(f_1, 3, 9, 4, 5, 6, result1, jacobianou1); // CHECK-EXEC: {48.00, 0.00, 0.00, 80.00, 32.00, 0.00, 60.00, -6.00, 35.00} -} \ No newline at end of file +} diff --git a/test/Jacobian/testUtility.C b/test/Jacobian/testUtility.C index 516ce4730..208708d9d 100644 --- a/test/Jacobian/testUtility.C +++ b/test/Jacobian/testUtility.C @@ -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" @@ -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:} @@ -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:} diff --git a/test/Misc/RunDemos.C b/test/Misc/RunDemos.C index 31c2d32b8..8f2bfe370 100644 --- a/test/Misc/RunDemos.C +++ b/test/Misc/RunDemos.C @@ -5,7 +5,6 @@ // RUN: %cladclang %S/../../demos/ComputerGraphics/smallpt/SmallPT.cpp -I%S/../../include 2>&1 // XFAIL: asserts -// XFAIL: target={{i586.*}} //-----------------------------------------------------------------------------/ // Demo: Gradient.cpp @@ -109,7 +108,7 @@ //CHECK_FLOAT_SUM: void vanillaSum_grad(float x, unsigned int n, float *_d_x, unsigned int *_d_n, double &_final_error) { //CHECK_FLOAT_SUM: float _d_sum = 0; -//CHECK_FLOAT_SUM: unsigned long _t0; +//CHECK_FLOAT_SUM: unsigned {{int|long}} _t0; //CHECK_FLOAT_SUM: unsigned int _d_i = 0; //CHECK_FLOAT_SUM: unsigned int i = 0; //CHECK_FLOAT_SUM: clad::tape _t1 = {}; @@ -285,8 +284,8 @@ //-----------------------------------------------------------------------------/ // RUN: %cladclang %S/../../demos/VectorForwardMode.cpp -I%S/../../include -oVectorForwardMode.out 2>&1 | FileCheck -check-prefix CHECK_VECTOR_FORWARD_MODE %s // CHECK_VECTOR_FORWARD_MODE: void weighted_sum_dvec_0_1(double *arr, double *weights, int n, clad::array_ref _d_arr, clad::array_ref _d_weights) { -// CHECK_VECTOR_FORWARD_MODE-NEXT unsigned long indepVarCount = _d_arr.size() + _d_weights.size(); -// CHECK_VECTOR_FORWARD_MODE-NEXT clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, 0UL); +// CHECK_VECTOR_FORWARD_MODE-NEXT unsigned {{int|long}} indepVarCount = _d_arr.size() + _d_weights.size(); +// CHECK_VECTOR_FORWARD_MODE-NEXT clad::matrix _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL}}); // CHECK_VECTOR_FORWARD_MODE-NEXT clad::matrix _d_vector_weights = clad::identity_matrix(_d_weights.size(), indepVarCount, _d_arr.size()); // CHECK_VECTOR_FORWARD_MODE-NEXT clad::array _d_vector_n = clad::zero_vector(indepVarCount); // CHECK_VECTOR_FORWARD_MODE-NEXT clad::array _d_vector_res(clad::array(indepVarCount, 0)); @@ -300,7 +299,7 @@ // CHECK_VECTOR_FORWARD_MODE-NEXT } // CHECK_VECTOR_FORWARD_MODE-NEXT { // CHECK_VECTOR_FORWARD_MODE-NEXT clad::array _d_vector_return(clad::array(indepVarCount, _d_vector_res)); -// CHECK_VECTOR_FORWARD_MODE-NEXT _d_arr = _d_vector_return.slice(0UL, _d_arr.size()); +// CHECK_VECTOR_FORWARD_MODE-NEXT _d_arr = _d_vector_return.slice({{0U|0UL}}, _d_arr.size()); // CHECK_VECTOR_FORWARD_MODE-NEXT _d_weights = _d_vector_return.slice(_d_arr.size(), _d_weights.size()); // CHECK_VECTOR_FORWARD_MODE-NEXT return; // CHECK_VECTOR_FORWARD_MODE-NEXT }