summaryrefslogtreecommitdiff
path: root/backend/kernels/loop.cl
diff options
context:
space:
mode:
authorBenjamin Segovia <segovia.benjamin@gmail.com>2012-02-28 20:05:09 +0000
committerKeith Packard <keithp@keithp.com>2012-08-10 16:15:29 -0700
commit9564e88c263551304ab037f2ef489ae215eae463 (patch)
treeff4fa245bcae9c48959c0bacb7c7e2b5fa9b83e9 /backend/kernels/loop.cl
parenta1785a45d319491e4b994c87b586cce94ac08c1c (diff)
downloadbeignet-9564e88c263551304ab037f2ef489ae215eae463.tar.gz
Added various helper functions in the LLVM to Gen translation Implemented binary instruction translation Implemented return instruction translation
Diffstat (limited to 'backend/kernels/loop.cl')
-rw-r--r--backend/kernels/loop.cl5
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/kernels/loop.cl b/backend/kernels/loop.cl
new file mode 100644
index 00000000..e8ab6305
--- /dev/null
+++ b/backend/kernels/loop.cl
@@ -0,0 +1,5 @@
+__kernel void add(__global int *dst, unsigned int x)
+{
+ for (int i = 0; i < x; ++i) dst[i]++;
+}
+