diff options
author | Homer Hsing <homer.xing@intel.com> | 2013-06-04 15:52:13 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-06-04 16:06:16 +0800 |
commit | 0ef8b93495d5f75ef86e7e232d58d7e9768b8ede (patch) | |
tree | 428acb3a02918992ab3134786c5b49bb777ddd1a /kernels | |
parent | dc17e964a09419036b9e05f37ccd2de2a15ac984 (diff) | |
download | beignet-0ef8b93495d5f75ef86e7e232d58d7e9768b8ede.tar.gz |
test case for DW multiplication
This case tests whether a predication bug of DW multiplication
had been fixed.
Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'kernels')
-rw-r--r-- | kernels/compiler_displacement_map_element.cl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernels/compiler_displacement_map_element.cl b/kernels/compiler_displacement_map_element.cl new file mode 100644 index 00000000..ee40ad5b --- /dev/null +++ b/kernels/compiler_displacement_map_element.cl @@ -0,0 +1,11 @@ +kernel void compiler_displacement_map_element(const global uint *in, const global uint *offset, int w, int h, global uint *out) { + const int cx = get_global_id(0); + const int cy = get_global_id(1); + uint c = offset[cy * w + cx]; + int x_pos = cx + c; + int y_pos = cy + c; + if(0 <= x_pos && x_pos < w && 0 <= y_pos && y_pos < h) + out[cy * w + cx] = in[y_pos * w + x_pos]; + else + out[cy * w + cx] = 0; +} |