diff options
author | rander <rander.wang@intel.com> | 2017-05-23 10:03:27 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2017-06-09 20:03:01 +0800 |
commit | 05cff5c5475c3f43770b3dabc9119f0136936564 (patch) | |
tree | a64851cb30ac441920cfc8539ea22d5085acfd74 /kernels | |
parent | f8053378a254e0eac9b5b2188e81a0308e290647 (diff) |
utests: added for optimization negativeAdd
the negative Add is like:
exp -a
llvm transfer it to:
add x -a, 0
exp x
Signed-off-by: rander.wang <rander.wang@intel.com>
Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
Diffstat (limited to 'kernels')
-rw-r--r-- | kernels/compiler_remove_negative_add.cl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernels/compiler_remove_negative_add.cl b/kernels/compiler_remove_negative_add.cl new file mode 100644 index 00000000..d6f72706 --- /dev/null +++ b/kernels/compiler_remove_negative_add.cl @@ -0,0 +1,4 @@ +kernel void compiler_remove_negative_add(global float *src, global float *dst) { + int i = get_global_id(0); + dst[i] = exp2(-src[i]); +}; |