summaryrefslogtreecommitdiff
path: root/kernels/compiler_fabs.cl
diff options
context:
space:
mode:
authorHomer Hsing <homer.xing@intel.com>2013-01-25 10:31:59 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2013-04-10 14:52:32 +0800
commite4716c19c450acda0acedcb5ccf0f8cfd6dba958 (patch)
treefc787d341e124fc08aac16cd2420e5ae011cac3f /kernels/compiler_fabs.cl
parent475a5a0983befa7c2ab2249992c9dd84c4dfcc34 (diff)
Test case for fabs
Test 128 times fabs(). Input data is random Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
Diffstat (limited to 'kernels/compiler_fabs.cl')
-rw-r--r--kernels/compiler_fabs.cl5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernels/compiler_fabs.cl b/kernels/compiler_fabs.cl
new file mode 100644
index 0000000..016deb8
--- /dev/null
+++ b/kernels/compiler_fabs.cl
@@ -0,0 +1,5 @@
+kernel void compiler_fabs(global float *src, global float *dst) {
+ int i = get_global_id(0);
+ dst[i] = fabs(src[i]);
+}
+