diff options
author | Yi Sun <yi.sun@intel.com> | 2013-10-24 15:56:58 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-10-29 10:30:53 +0800 |
commit | 59f29416b8b7c1ae513b2eb805069266c33d09bc (patch) | |
tree | e54a0d8745892a6fd32ae8c785c3d7badce0aeab /kernels/builtin_exp.cl | |
parent | 9c53a0db19c8a113329d924cf6c02ce4759c4113 (diff) |
utest: add test case for builtin function exp/exp2/exp10/expm1.
Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Yangwei Shui <yangweix.shui@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'kernels/builtin_exp.cl')
-rw-r--r-- | kernels/builtin_exp.cl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernels/builtin_exp.cl b/kernels/builtin_exp.cl new file mode 100644 index 0000000..ecc1a3e --- /dev/null +++ b/kernels/builtin_exp.cl @@ -0,0 +1,10 @@ +__kernel void builtin_exp(__global float *dst, __global float *src, __global int *max_func) { + int i = get_global_id(0); + float x = src[i]; + + dst[i * (*max_func) + 0] = exp(x); + dst[i * (*max_func) + 1] = exp2(x); + dst[i * (*max_func) + 2] = exp10(x); + dst[i * (*max_func) + 3] = expm1(x); + dst[i * (*max_func) + 4] = x; +}; |