Skip to content

Commit

Permalink
Update FileCheck test lines for long long literals generated on windo…
Browse files Browse the repository at this point in the history
…ws x64
  • Loading branch information
fsfod authored and vgvassilev committed Aug 20, 2024
1 parent cfea783 commit 855424d
Show file tree
Hide file tree
Showing 33 changed files with 533 additions and 533 deletions.
26 changes: 13 additions & 13 deletions test/Arrays/ArrayInputsReverseMode.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ float func(float* a, float* b) {
//CHECK-NEXT: clad::tape<float> _t2 = {};
//CHECK-NEXT: float _d_sum = 0;
//CHECK-NEXT: float sum = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < 3))
Expand Down Expand Up @@ -97,7 +97,7 @@ float func2(float* a) {
//CHECK-NEXT: clad::tape<float> _t1 = {};
//CHECK-NEXT: float _d_sum = 0;
//CHECK-NEXT: float sum = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < 3))
Expand Down Expand Up @@ -136,7 +136,7 @@ float func3(float* a, float* b) {
//CHECK-NEXT: clad::tape<float> _t2 = {};
//CHECK-NEXT: float _d_sum = 0;
//CHECK-NEXT: float sum = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < 3))
Expand Down Expand Up @@ -180,7 +180,7 @@ double func4(double x) {
//CHECK-NEXT: double arr[3] = {x, 2 * x, x * x};
//CHECK-NEXT: double _d_sum = 0;
//CHECK-NEXT: double sum = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < 3))
Expand Down Expand Up @@ -241,7 +241,7 @@ double func5(int k) {
//CHECK-NEXT: double _d_arr[n];
//CHECK-NEXT: clad::zero_init(_d_arr, n);
//CHECK-NEXT: double arr[n];
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < n))
Expand All @@ -253,7 +253,7 @@ double func5(int k) {
//CHECK-NEXT: }
//CHECK-NEXT: double _d_sum = 0;
//CHECK-NEXT: double sum = 0;
//CHECK-NEXT: unsigned {{int|long}} _t2 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t2 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i0 = 0; ; i0++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i0 < 3))
Expand Down Expand Up @@ -308,11 +308,11 @@ double func6(double seed) {
//CHECK-NEXT: int i = 0;
//CHECK-NEXT: clad::tape<clad::array<double> > _t1 = {};
//CHECK-NEXT: double _d_arr[3] = {0};
//CHECK-NEXT: clad::array<double> arr({{3U|3UL}});
//CHECK-NEXT: clad::array<double> arr({{3U|3UL|3ULL}});
//CHECK-NEXT: clad::tape<double> _t2 = {};
//CHECK-NEXT: double _d_sum = 0;
//CHECK-NEXT: double sum = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < 3))
Expand Down Expand Up @@ -368,11 +368,11 @@ double func7(double *params) {
//CHECK-NEXT: std::size_t i = 0;
//CHECK-NEXT: clad::tape<clad::array<double> > _t1 = {};
//CHECK-NEXT: double _d_paramsPrime[1] = {0};
//CHECK-NEXT: clad::array<double> paramsPrime({{1U|1UL}});
//CHECK-NEXT: clad::array<double> paramsPrime({{1U|1UL|1ULL}});
//CHECK-NEXT: clad::tape<double> _t2 = {};
//CHECK-NEXT: double _d_out = 0;
//CHECK-NEXT: double out = 0.;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
// CHECK-NEXT: for (i = 0; ; ++i) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < 1))
Expand Down Expand Up @@ -472,7 +472,7 @@ double func9(double i, double j) {
//CHECK-NEXT: clad::tape<double> _t1 = {};
//CHECK-NEXT: double _d_arr[5] = {0};
//CHECK-NEXT: double arr[5] = {};
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
// CHECK-NEXT: for (idx = 0; ; ++idx) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(idx < 5))
Expand Down Expand Up @@ -528,7 +528,7 @@ double func10(double *arr, int n) {
//CHECK-NEXT: clad::tape<double> _t2 = {};
//CHECK-NEXT: double _d_res = 0;
//CHECK-NEXT: double res = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
// CHECK-NEXT: for (i = 0; ; ++i) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < n))
Expand Down Expand Up @@ -628,7 +628,7 @@ int main() {
//CHECK-NEXT: clad::tape<double> _t1 = {};
//CHECK-NEXT: double _d_ret = 0;
//CHECK-NEXT: double ret = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
// CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < n))
Expand Down
28 changes: 14 additions & 14 deletions test/Arrays/ArrayInputsVectorForwardMode.C
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ double multiply(const double *arr) {
}

// CHECK: void multiply_dvec(const double *arr, clad::array_ref<double> _d_arr) {
// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_arr.size();
// CHECK-NEXT: clad::matrix<double> _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL}});
// CHECK-NEXT: unsigned {{int|long|long long}} indepVarCount = _d_arr.size();
// CHECK-NEXT: clad::matrix<double> _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL|0ULL}});
// CHECK-NEXT: {
// CHECK-NEXT: clad::array<double> _d_vector_return(clad::array<double>(indepVarCount, (_d_vector_arr[0]) * arr[1] + arr[0] * (_d_vector_arr[1])));
// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL}}, _d_arr.size());
// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL|0ULL}}, _d_arr.size());
// CHECK-NEXT: return;
// CHECK-NEXT: }
// CHECK-NEXT: }
Expand All @@ -26,11 +26,11 @@ double divide(double *arr) {
}

// CHECK: void divide_dvec(double *arr, clad::array_ref<double> _d_arr) {
// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_arr.size();
// CHECK-NEXT: clad::matrix<double> _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL}});
// CHECK-NEXT: unsigned {{int|long|long long}} indepVarCount = _d_arr.size();
// CHECK-NEXT: clad::matrix<double> _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL|0ULL}});
// CHECK-NEXT: {
// CHECK-NEXT: clad::array<double> _d_vector_return(clad::array<double>(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({{0U|0UL}}, _d_arr.size());
// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL|0ULL}}, _d_arr.size());
// CHECK-NEXT: return;
// CHECK-NEXT: }
// CHECK-NEXT: }
Expand All @@ -44,8 +44,8 @@ double addArr(const double *arr, int n) {
}

// CHECK: void addArr_dvec_0(const double *arr, int n, clad::array_ref<double> _d_arr) {
// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_arr.size();
// CHECK-NEXT: clad::matrix<double> _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL}});
// CHECK-NEXT: unsigned {{int|long|long long}} indepVarCount = _d_arr.size();
// CHECK-NEXT: clad::matrix<double> _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL|0ULL}});
// CHECK-NEXT: clad::array<int> _d_vector_n = clad::zero_vector(indepVarCount);
// CHECK-NEXT: clad::array<double> _d_vector_ret(clad::array<double>(indepVarCount, 0));
// CHECK-NEXT: double ret = 0;
Expand All @@ -58,7 +58,7 @@ double addArr(const double *arr, int n) {
// CHECK-NEXT: }
// CHECK-NEXT: {
// CHECK-NEXT: clad::array<double> _d_vector_return(clad::array<double>(indepVarCount, _d_vector_ret));
// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL}}, _d_arr.size());
// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL|0ULL}}, _d_arr.size());
// CHECK-NEXT: return;
// CHECK-NEXT: }
// CHECK-NEXT: }
Expand All @@ -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<double> _d_arr, double *_d_alpha, double *_d_beta) {
// CHECK-NEXT: unsigned {{int|long}} indepVarCount = _d_arr.size() + {{2U|2UL}};
// CHECK-NEXT: clad::matrix<double> _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL}});
// CHECK-NEXT: unsigned {{int|long|long long}} indepVarCount = _d_arr.size() + {{2U|2UL|2ULL}};
// CHECK-NEXT: clad::matrix<double> _d_vector_arr = clad::identity_matrix(_d_arr.size(), indepVarCount, {{0U|0UL|0ULL}});
// CHECK-NEXT: clad::array<int> _d_vector_n = clad::zero_vector(indepVarCount);
// CHECK-NEXT: clad::array<double> _d_vector_alpha = clad::one_hot_vector(indepVarCount, _d_arr.size());
// CHECK-NEXT: clad::array<double> _d_vector_beta = clad::one_hot_vector(indepVarCount, _d_arr.size() + {{1U|1UL}});
// CHECK-NEXT: clad::array<double> _d_vector_beta = clad::one_hot_vector(indepVarCount, _d_arr.size() + {{1U|1UL|1ULL}});
// CHECK-NEXT: clad::array<double> _d_vector_ret(clad::array<double>(indepVarCount, 0));
// CHECK-NEXT: double ret = 0;
// CHECK-NEXT: {
Expand All @@ -97,9 +97,9 @@ double maskedSum(const double *arr, int n, int *signedMask, double alpha, double
// CHECK-NEXT: }
// CHECK-NEXT: {
// CHECK-NEXT: clad::array<double> _d_vector_return(clad::array<double>(indepVarCount, _d_vector_ret));
// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL}}, _d_arr.size());
// CHECK-NEXT: _d_arr = _d_vector_return.slice({{0U|0UL|0ULL}}, _d_arr.size());
// CHECK-NEXT: *_d_alpha = _d_vector_return[_d_arr.size()];
// CHECK-NEXT: *_d_beta = _d_vector_return[_d_arr.size() + {{1U|1UL}}];
// CHECK-NEXT: *_d_beta = _d_vector_return[_d_arr.size() + {{1U|1UL|1ULL}}];
// CHECK-NEXT: return;
// CHECK-NEXT: }
// CHECK-NEXT: }
Expand Down
2 changes: 1 addition & 1 deletion test/CUDA/GradientCuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ __device__ __host__ double gauss(double* x, double* p, double sigma, int dim) {
//CHECK-NEXT: clad::tape<double> _t1 = {};
//CHECK-NEXT: double _d_t = 0;
//CHECK-NEXT: double t = 0;
//CHECK-NEXT: unsigned long _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned long _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
//CHECK-NEXT: {
//CHECK-NEXT: if (!(i < dim))
Expand Down
18 changes: 9 additions & 9 deletions test/ErrorEstimation/LoopsAndArrays.C
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ float func(float* p, int n) {
//CHECK-NEXT: int _d_i = 0;
//CHECK-NEXT: int i = 0;
//CHECK-NEXT: clad::tape<float> _t1 = {};
//CHECK-NEXT: unsigned {{int|long}} p_size = 0;
//CHECK-NEXT: unsigned {{int|long|long long}} p_size = 0;
//CHECK-NEXT: float _d_sum = 0;
//CHECK-NEXT: float sum = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < n))
Expand Down Expand Up @@ -71,7 +71,7 @@ float func2(float x) {
//CHECK-NEXT: clad::tape<float> _t2 = {};
//CHECK-NEXT: float _d_z = 0;
//CHECK-NEXT: float z;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < 9))
Expand Down Expand Up @@ -166,13 +166,13 @@ 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: int _d_i = 0;
//CHECK-NEXT: int i = 0;
//CHECK-NEXT: unsigned {{int|long}} x_size = 0;
//CHECK-NEXT: unsigned {{int|long|long long}} x_size = 0;
//CHECK-NEXT: clad::tape<float> _t1 = {};
//CHECK-NEXT: unsigned {{int|long}} y_size = 0;
//CHECK-NEXT: unsigned {{int|long|long long}} y_size = 0;
//CHECK-NEXT: clad::tape<float> _t2 = {};
//CHECK-NEXT: float _d_sum = 0;
//CHECK-NEXT: float sum = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < 10))
Expand Down Expand Up @@ -225,9 +225,9 @@ double func5(double* x, double* y, double* output) {
}

//CHECK: void func5_grad(double *x, double *y, double *output, double *_d_x, double *_d_y, double *_d_output, double &_final_error) {
//CHECK-NEXT: unsigned {{int|long}} output_size = 0;
//CHECK-NEXT: unsigned {{int|long}} x_size = 0;
//CHECK-NEXT: unsigned {{int|long}} y_size = 0;
//CHECK-NEXT: unsigned {{int|long|long long}} output_size = 0;
//CHECK-NEXT: unsigned {{int|long|long long}} x_size = 0;
//CHECK-NEXT: unsigned {{int|long|long long}} y_size = 0;
//CHECK-NEXT: double _ret_value0 = 0;
//CHECK-NEXT: double _t0 = output[0];
//CHECK-NEXT: output[0] = x[1] * y[2] - x[2] * y[1];
Expand Down
20 changes: 10 additions & 10 deletions test/ErrorEstimation/LoopsAndArraysExec.C
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ double runningSum(float* f, int n) {
//CHECK-NEXT: int _d_i = 0;
//CHECK-NEXT: int i = 0;
//CHECK-NEXT: clad::tape<double> _t1 = {};
//CHECK-NEXT: unsigned {{int|long}} f_size = 0;
//CHECK-NEXT: unsigned {{int|long|long long}} f_size = 0;
//CHECK-NEXT: double _d_sum = 0;
//CHECK-NEXT: double sum = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 1; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < n))
Expand Down Expand Up @@ -67,23 +67,23 @@ 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: int _d_i = 0;
//CHECK-NEXT: int i = 0;
//CHECK-NEXT: clad::tape<unsigned {{int|long}}> _t1 = {};
//CHECK-NEXT: clad::tape<unsigned {{int|long|long long}}> _t1 = {};
//CHECK-NEXT: clad::tape<int> _t2 = {};
//CHECK-NEXT: int _d_j = 0;
//CHECK-NEXT: int j = 0;
//CHECK-NEXT: clad::tape<double> _t3 = {};
//CHECK-NEXT: unsigned {{int|long}} a_size = 0;
//CHECK-NEXT: unsigned {{int|long}} b_size = 0;
//CHECK-NEXT: unsigned {{int|long|long long}} a_size = 0;
//CHECK-NEXT: unsigned {{int|long|long long}} b_size = 0;
//CHECK-NEXT: double _d_sum = 0;
//CHECK-NEXT: double sum = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < n))
// CHECK-NEXT: break;
// CHECK-NEXT: }
//CHECK-NEXT: _t0++;
//CHECK-NEXT: clad::push(_t1, {{0U|0UL}});
//CHECK-NEXT: clad::push(_t1, {{0U|0UL|0ULL}});
//CHECK-NEXT: for (clad::push(_t2, j) , j = 0; ; j++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(j < n))
Expand Down Expand Up @@ -144,11 +144,11 @@ double divSum(float* a, float* b, int n) {
//CHECK-NEXT: int _d_i = 0;
//CHECK-NEXT: int i = 0;
//CHECK-NEXT: clad::tape<double> _t1 = {};
//CHECK-NEXT: unsigned {{int|long}} b_size = 0;
//CHECK-NEXT: unsigned {{int|long}} a_size = 0;
//CHECK-NEXT: unsigned {{int|long|long long}} b_size = 0;
//CHECK-NEXT: unsigned {{int|long|long long}} a_size = 0;
//CHECK-NEXT: double _d_sum = 0;
//CHECK-NEXT: double sum = 0;
//CHECK-NEXT: unsigned {{int|long}} _t0 = {{0U|0UL}};
//CHECK-NEXT: unsigned {{int|long|long long}} _t0 = {{0U|0UL|0ULL}};
//CHECK-NEXT: for (i = 0; ; i++) {
// CHECK-NEXT: {
// CHECK-NEXT: if (!(i < n))
Expand Down
6 changes: 3 additions & 3 deletions test/FirstDerivative/BasicArithmeticMulDiv.C
Original file line number Diff line number Diff line change
Expand Up @@ -115,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 < {{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: bool _t0 = maxN < {{64U|64UL|64ULL}};
// CHECK-NEXT: const size_t _d_m = _t0 ? _d_maxN : {{0U|0UL|0ULL}};
// CHECK-NEXT: const size_t m = _t0 ? maxN : {{64U|64UL|64ULL}};
// CHECK-NEXT: return _d_x * m + x * _d_m;
// CHECK-NEXT: }

Expand Down
Loading

0 comments on commit 855424d

Please sign in to comment.