summaryrefslogtreecommitdiff
path: root/kernels/builtin_modf.cl
diff options
context:
space:
mode:
authorHomer Hsing <homer.xing@intel.com>2013-07-17 11:00:25 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2013-07-24 11:49:08 +0800
commit4b6e8e49683707e4c6138fd80db8ca2866d500af (patch)
tree1330e2434a1dc063b1687cf7c9a3941cf4125184 /kernels/builtin_modf.cl
parentc56ec1d43975a33898f2cf6f90b8b5b34584d8ea (diff)
test builtin function "modf"
Signed-off-by: Homer Hsing <homer.xing@intel.com> Tested-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'kernels/builtin_modf.cl')
-rw-r--r--kernels/builtin_modf.cl6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernels/builtin_modf.cl b/kernels/builtin_modf.cl
new file mode 100644
index 00000000..43630edd
--- /dev/null
+++ b/kernels/builtin_modf.cl
@@ -0,0 +1,6 @@
+kernel void builtin_modf(global float *src, global float *dst, global float *it) {
+ int i = get_global_id(0);
+ float x;
+ dst[i] = modf(src[i], &x);
+ it[i] = x;
+}