diff options
author | Luo Xionghu <xionghu.luo@intel.com> | 2014-12-03 16:51:53 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-12-04 14:56:26 +0800 |
commit | d32db40dcb231c65ac400c8ab7a719176c0c1595 (patch) | |
tree | 4576cb01ff80040c2a7e5d40f3f1f1b84b9d6e9b /utests | |
parent | c9d3e67158a6635cc757c875f8c793ed52ade1c4 (diff) |
refine bswap utest to cover nsetc fail cases.
two bswap call in one block would trigger nsetc failures.
the fail was fixed in backend already, just update the utest.
Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'utests')
-rw-r--r-- | utests/compiler_bswap.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utests/compiler_bswap.cpp b/utests/compiler_bswap.cpp index b5986b90..9475b991 100644 --- a/utests/compiler_bswap.cpp +++ b/utests/compiler_bswap.cpp @@ -85,6 +85,13 @@ void test(const char *kernel_name) for (int32_t i = 0; i < (int32_t) n; ++i) cpu(i, cpu_src, cpu_dst); + for (int32_t i = 0; i < (int32_t) n; ++i) + cpu_dst[i] = cpu_dst[i] -1; + + // Run on CPU + for (int32_t i = 0; i < (int32_t) n; ++i) + cpu(i, cpu_dst, cpu_dst); + OCL_MAP_BUFFER(1); // dump_data(cpu_src, cpu_dst, n); |