diff options
author | Meng Mengmeng <mengmeng.meng@intel.com> | 2015-07-15 01:22:34 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2015-07-15 16:56:45 +0800 |
commit | 83f2ce719adfcae6433026b884e916d9c0b0ce65 (patch) | |
tree | 40e97b32f889d147d08b7238d98a2f5fbdc332fb /utests/builtin_tgamma.cpp | |
parent | 6e85bd3d03acc298ef5ee2c4fac6c3d4e9b66e27 (diff) |
correct ULP value in utests
Set a global function in utests to get the right ULP value.
Diffstat (limited to 'utests/builtin_tgamma.cpp')
-rw-r--r-- | utests/builtin_tgamma.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/utests/builtin_tgamma.cpp b/utests/builtin_tgamma.cpp index b7db69b0..db9ab3c2 100644 --- a/utests/builtin_tgamma.cpp +++ b/utests/builtin_tgamma.cpp @@ -6,6 +6,7 @@ void builtin_tgamma(void) { const int n = 1024; float src[n]; + float ULPSIZE_NO_FAST_MATH = 16.0; // Setup kernel and buffers OCL_CREATE_KERNEL("builtin_tgamma"); @@ -15,10 +16,7 @@ void builtin_tgamma(void) OCL_SET_ARG(1, sizeof(cl_mem), &buf[1]); globals[0] = n; locals[0] = 16; - const char* env_strict = getenv("OCL_STRICT_CONFORMANCE"); - float ULPSIZE_FACTOR = 16.0; - if (env_strict == NULL || strcmp(env_strict, "0") == 0) - ULPSIZE_FACTOR = 10000.; + float ULPSIZE_FACTOR = select_ulpsize(ULPSIZE_FAST_MATH,ULPSIZE_NO_FAST_MATH); cl_device_fp_config fp_config; clGetDeviceInfo(device, CL_DEVICE_SINGLE_FP_CONFIG, sizeof(cl_device_fp_config), &fp_config, 0); |