Skip to content

Commit 1ac934a

Browse files
committed
TEST: Update reference tests
1 parent 9ecc2ec commit 1ac934a

6 files changed

+16
-13
lines changed

tests/reference/c-expr_12-93c7780.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "c-expr_12-93c7780.stdout",
9-
"stdout_hash": "4cbfe2f301edb2e5df13058ec0ff1415277851ee8ffcdda264b2f239",
9+
"stdout_hash": "95d8b9361a2cc1334d3e79c77eee2d79f266cd5cdff2d824faacfa9d",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/c-expr_12-93c7780.stdout

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99

1010
struct dimension_descriptor
1111
{
12-
int32_t lower_bound, length;
12+
int32_t lower_bound, length, stride;
1313
};
1414

1515
struct i16
1616
{
1717
int16_t *data;
1818
struct dimension_descriptor dims[32];
1919
int32_t n_dims;
20+
int32_t offset;
2021
bool is_allocated;
2122
};
2223

@@ -30,16 +31,16 @@ void __main__global_stmts();
3031
// Implementations
3132
void g(struct i16* *x, struct i16* y)
3233
{
33-
y->data[(0 - y->dims[0].lower_bound)] = 1;
34-
y->data[(1 - y->dims[0].lower_bound)] = 2;
34+
y->data[((0 + (y->dims[0].stride * (0 - y->dims[0].lower_bound))) + y->offset)] = 1;
35+
y->data[((0 + (y->dims[0].stride * (1 - y->dims[0].lower_bound))) + y->offset)] = 2;
3536
(*x) = y;
36-
printf("%d%s%d\n", (*x)->data[(0 - (*x)->dims[0].lower_bound)], " ", (*x)->data[(1 - (*x)->dims[0].lower_bound)]);
37+
printf("%d%s%d\n", (*x)->data[((0 + ((*x)->dims[0].stride * (0 - (*x)->dims[0].lower_bound))) + (*x)->offset)], " ", (*x)->data[((0 + ((*x)->dims[0].stride * (1 - (*x)->dims[0].lower_bound))) + (*x)->offset)]);
3738
}
3839

3940
void check(struct i16* *ptr)
4041
{
41-
ASSERT((*ptr)->data[(0 - (*ptr)->dims[0].lower_bound)] == 1);
42-
ASSERT((*ptr)->data[(1 - (*ptr)->dims[0].lower_bound)] == 2);
42+
ASSERT((*ptr)->data[((0 + ((*ptr)->dims[0].stride * (0 - (*ptr)->dims[0].lower_bound))) + (*ptr)->offset)] == 1);
43+
ASSERT((*ptr)->data[((0 + ((*ptr)->dims[0].stride * (1 - (*ptr)->dims[0].lower_bound))) + (*ptr)->offset)] == 2);
4344
}
4445

4546
void f()
@@ -49,12 +50,14 @@ void f()
4950
int16_t y_data[2];
5051
y->data = y_data;
5152
y->n_dims = 1;
53+
y->offset = 0;
5254
y->dims[0].lower_bound = 0;
5355
y->dims[0].length = 2;
56+
y->dims[0].stride = 1;
5457
struct i16 yptr1_value;
5558
struct i16* yptr1 = &yptr1_value;
56-
g(&yptr1, y);
57-
check(&yptr1);
59+
g(yptr1, y);
60+
check(yptr1);
5861
}
5962

6063
void __main__global_stmts()

tests/reference/cpp-doconcurrentloop_01-4e9f274.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "cpp-doconcurrentloop_01-4e9f274.stdout",
9-
"stdout_hash": "cef4c9a2fa79bd4f12c0842cc4cae9d0be7f1891b5c66ee6b229bb9f",
9+
"stdout_hash": "8a4d62895106f08dea98f98b2bae7c3f27b6b324243e47df681eba3c",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/cpp-doconcurrentloop_01-4e9f274.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Kokkos::View<T*> from_std_vector(const std::vector<T> &v)
2020

2121
struct dimension_descriptor
2222
{
23-
int32_t lower_bound, length;
23+
int32_t lower_bound, length, stride;
2424
};
2525

2626
struct f32_10000_1

tests/reference/cpp-test_list_repeat2-698d7f4.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "cpp-test_list_repeat2-698d7f4.stdout",
9-
"stdout_hash": "b3979f6c5ea575cbbb0ae75fe566f811f6bb92aca2e698e6d0564326",
9+
"stdout_hash": "6e6428a71e48dbad6de969a48a9b958be8fb6d5ec2ed8490ee3f72ff",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/cpp-test_list_repeat2-698d7f4.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Kokkos::View<T*> from_std_vector(const std::vector<T> &v)
2020

2121
struct dimension_descriptor
2222
{
23-
int32_t lower_bound, length;
23+
int32_t lower_bound, length, stride;
2424
};
2525

2626
struct list_r32 {

0 commit comments

Comments
 (0)