Skip to content

Commit

Permalink
Fix Arrays/ArrayInputsReverseMode test on i586
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailMihov committed Mar 19, 2024
1 parent 3ef7ac5 commit 0a1e161
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions test/Arrays/ArrayInputsReverseMode.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

//CHECK-NOT: {{.*error|warning|note:.*}}
// XFAIL: asserts
// XFAIL: target={{i586.*}}

#include "clad/Differentiator/Differentiator.h"

Expand All @@ -19,7 +18,7 @@ double addArr(const double *arr, int n) {

//CHECK: void addArr_pullback(const double *arr, int n, double _d_y, clad::array_ref<double> _d_arr, clad::array_ref<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<double> _t1 = {};
Expand Down Expand Up @@ -67,7 +66,7 @@ float func(float* a, float* b) {

//CHECK: void func_grad(float *a, float *b, clad::array_ref<float> _d_a, clad::array_ref<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<float> _t1 = {};
Expand Down Expand Up @@ -120,7 +119,7 @@ float func2(float* a) {

//CHECK: void func2_grad(float *a, clad::array_ref<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<float> _t1 = {};
Expand Down Expand Up @@ -153,7 +152,7 @@ float func3(float* a, float* b) {

//CHECK: void func3_grad(float *a, float *b, clad::array_ref<float> _d_a, clad::array_ref<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<float> _t1 = {};
Expand Down Expand Up @@ -190,9 +189,9 @@ double func4(double x) {
}

//CHECK: void func4_grad(double x, clad::array_ref<double> _d_x) {
//CHECK-NEXT: clad::array<double> _d_arr(3UL);
//CHECK-NEXT: clad::array<double> _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<double> _t1 = {};
Expand Down Expand Up @@ -239,12 +238,12 @@ double func5(int k) {

//CHECK: void func5_grad(int k, clad::array_ref<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<double> _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<double> _t3 = {};
Expand Down Expand Up @@ -300,12 +299,12 @@ double func6(double seed) {

//CHECK: void func6_grad(double seed, clad::array_ref<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<clad::array<double> > _t1 = {};
//CHECK-NEXT: clad::array<double> _d_arr(3UL);
//CHECK-NEXT: clad::array<double> arr(3UL);
//CHECK-NEXT: clad::array<double> _d_arr({{3U|3UL}});
//CHECK-NEXT: clad::array<double> arr({{3U|3UL}});
//CHECK-NEXT: clad::tape<double> _t2 = {};
//CHECK-NEXT: double sum = 0;
//CHECK-NEXT: _t0 = 0;
Expand Down Expand Up @@ -365,12 +364,12 @@ double func7(double *params) {

//CHECK: void func7_grad(double *params, clad::array_ref<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<clad::array<double> > _t1 = {};
//CHECK-NEXT: clad::array<double> _d_paramsPrime(1UL);
//CHECK-NEXT: clad::array<double> paramsPrime(1UL);
//CHECK-NEXT: clad::array<double> _d_paramsPrime({{1U|1UL}});
//CHECK-NEXT: clad::array<double> paramsPrime({{1U|1UL}});
//CHECK-NEXT: clad::tape<double> _t2 = {};
//CHECK-NEXT: double out = 0.;
//CHECK-NEXT: _t0 = 0;
Expand Down Expand Up @@ -484,8 +483,8 @@ double func9(double i, double j) {


//CHECK: void func9_grad(double i, double j, clad::array_ref<double> _d_i, clad::array_ref<double> _d_j) {
//CHECK-NEXT: clad::array<double> _d_arr(5UL);
//CHECK-NEXT: unsigned long _t0;
//CHECK-NEXT: clad::array<double> _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<double> _t1 = {};
Expand Down Expand Up @@ -549,7 +548,7 @@ double func10(double *arr, int n) {
//CHECK: void func10_grad_0(double *arr, int n, clad::array_ref<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<double> _t1 = {};
Expand Down

0 comments on commit 0a1e161

Please sign in to comment.