diff options
author | Guo Yejun <yejun.guo@intel.com> | 2016-07-18 09:04:16 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2016-07-20 17:35:39 +0800 |
commit | f6799d14c0f46d35107469c22f091fc73f7b0633 (patch) | |
tree | 10bbdfef289472e41961c38fcb9a6286d5ad52b4 /utests/builtin_acos_asin.cpp | |
parent | 87b5058d8f54ea3fb047aee320ec2c8a8022b73f (diff) | |
download | beignet-f6799d14c0f46d35107469c22f091fc73f7b0633.tar.gz |
do not use const pointer
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests/builtin_acos_asin.cpp')
-rw-r--r-- | utests/builtin_acos_asin.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utests/builtin_acos_asin.cpp b/utests/builtin_acos_asin.cpp index 395460be..21fe4618 100644 --- a/utests/builtin_acos_asin.cpp +++ b/utests/builtin_acos_asin.cpp @@ -10,7 +10,9 @@ printf("\033[0m");\ } -const float input_data[] = {-30, -1, -0.92, -0.5, -0.09, 0, 0.09, 0.5, 0.92, 1, 30}; +namespace { + +float input_data[] = {-30, -1, -0.92, -0.5, -0.09, 0, 0.09, 0.5, 0.92, 1, 30}; const int count_input = sizeof(input_data) / sizeof(input_data[0]); const int max_function = 5; @@ -44,7 +46,8 @@ static void builtin_acos_asin(void) locals[0] = 1; clEnqueueWriteBuffer( queue, buf[1], CL_TRUE, 0, count_input * sizeof(float), input_data, 0, NULL, NULL); - clEnqueueWriteBuffer( queue, buf[2], CL_TRUE, 0, sizeof(int), &max_function , 0, NULL, NULL); + int maxfunc = max_function; + clEnqueueWriteBuffer( queue, buf[2], CL_TRUE, 0, sizeof(int), &maxfunc, 0, NULL, NULL); // Run the kernel OCL_NDRANGE( 1 ); @@ -85,3 +88,4 @@ static void builtin_acos_asin(void) } MAKE_UTEST_FROM_FUNCTION(builtin_acos_asin) +} |