diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2012-08-01 13:42:19 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2012-08-01 13:42:19 +0000 |
commit | 1346675bd96de1f4cc882ab16966c78904aaa117 (patch) | |
tree | a2d308523a37046e99e2d284d37c17426a22a9a1 | |
parent | 35db7e8ae4fe384199b8101609fe68ea4977c762 (diff) |
Fix bugs in loop_g{e,t} tests.
-rw-r--r-- | KNOWN_FAILURES | 2 | ||||
-rw-r--r-- | loop_ge.cl | 6 | ||||
-rw-r--r-- | loop_gt.cl | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/KNOWN_FAILURES b/KNOWN_FAILURES index 9f39951..e69de29 100644 --- a/KNOWN_FAILURES +++ b/KNOWN_FAILURES @@ -1,2 +0,0 @@ -./loop loop_gt 10 -./loop loop_ge 10 @@ -1,8 +1,8 @@ -__kernel void loop_ge(__global int * out, unsigned iterations) +__kernel void loop_ge(__global int * out, int iterations) { - unsigned i; + int i; unsigned base = get_global_id(0) * iterations; - for (i = iterations; i >= 1; i--) { + for (i = iterations - 1; i >= 0; i--) { unsigned id = (base + i); out[id] = id; } @@ -1,8 +1,8 @@ -__kernel void loop_gt(__global int * out, unsigned iterations) +__kernel void loop_gt(__global int * out, int iterations) { - unsigned i; + int i; unsigned base = get_global_id(0) * iterations; - for (i = iterations; i > 0; i--) { + for (i = iterations - 1; i > -1; i--) { unsigned id = (base + i); out[id] = id; } |