diff options
author | Benjamin Segovia <bsegovia@bsegovia-i70.sc.intel.com> | 2012-10-12 18:31:31 +0000 |
---|---|---|
committer | Benjamin Segovia <bsegovia@bsegovia-i70.sc.intel.com> | 2012-10-12 19:44:05 +0000 |
commit | 48bdb695248948cb164ae8c70c129c930ee6afd8 (patch) | |
tree | c1e489f634b6a69e062bc2527f61fd7156028fa3 /utests/runtime_flat_address_space.cpp | |
parent | 4dcd865c3354abeec1866be6eaaf86006d9f33bf (diff) | |
download | beignet-48bdb695248948cb164ae8c70c129c930ee6afd8.tar.gz |
Removed use of exceptions since LLVM may not support them (depending on how it
is compiled)
Diffstat (limited to 'utests/runtime_flat_address_space.cpp')
-rw-r--r-- | utests/runtime_flat_address_space.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utests/runtime_flat_address_space.cpp b/utests/runtime_flat_address_space.cpp index d2f4aefb..0357cbd0 100644 --- a/utests/runtime_flat_address_space.cpp +++ b/utests/runtime_flat_address_space.cpp @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) { cl_mem dst[24]; - int *dst_buffer; + int *dst_buffer = NULL; const size_t n = 32 * 1024 * 1024; const size_t global_work_size = n; const size_t local_work_size = 16; @@ -56,7 +56,11 @@ main(int argc, char *argv[]) dst_buffer = (int *) clIntelMapBuffer(dst[j], &status); if (status != CL_SUCCESS) goto error; - for (uint32_t i = 0; i < n; ++i) assert(dst_buffer[i] == int(i)); + for (uint32_t i = 0; i < n; ++i) + if (dst_buffer[i] != int(i)) { + fprintf(stderr, "run-time flat address space failed\n"); + exit(-1); + } OCL_CALL (clIntelUnmapBuffer, dst[j]); } |