utest: correct a typo in compiler_cl_finish.cpp

Submitted by Guo Yejun on Jan. 24, 2016, 7:31 p.m.

Details

Message ID 1453663898-13211-1-git-send-email-yejun.guo@intel.com
State New
Headers show
Series "utest: correct a typo in compiler_cl_finish.cpp" ( rev: 1 ) in Beignet

Not browsing as part of any series.

Commit Message

Guo Yejun Jan. 24, 2016, 7:31 p.m.
there is no logical relationship between the time of finish and map,
remove the condition.

Signed-off-by: Guo Yejun <yejun.guo@intel.com>
---
 utests/compiler_cl_finish.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/utests/compiler_cl_finish.cpp b/utests/compiler_cl_finish.cpp
index 7c7dee3..c637ecc 100644
--- a/utests/compiler_cl_finish.cpp
+++ b/utests/compiler_cl_finish.cpp
@@ -9,7 +9,7 @@  static void compiler_cl_finish(void)
 {
   const size_t n = 16*1024*1024;
   struct timeval t1, t2;
-  float t_fin, t_map_w_fin,t_map_wo_fin;
+  float t_map_w_fin,t_map_wo_fin;
 
   // Setup kernel and buffers
   OCL_CREATE_KERNEL("test_cl_finish");
@@ -26,10 +26,7 @@  static void compiler_cl_finish(void)
 
   // 1st time map after clFinish
   OCL_NDRANGE(1);
-  T_GET(t1);
   OCL_FINISH();
-  T_GET(t2);
-  t_fin = T_LAPSE(t1, t2);
 
   T_GET(t1);
   OCL_MAP_BUFFER(0);
@@ -43,7 +40,7 @@  static void compiler_cl_finish(void)
   T_GET(t2);
   t_map_wo_fin = T_LAPSE(t1, t2);
 
-  OCL_ASSERT(t_fin > t_map_w_fin && t_map_wo_fin > t_map_w_fin);
+  OCL_ASSERT(t_map_wo_fin > t_map_w_fin);
   OCL_UNMAP_BUFFER(0);
 }
 

Comments

LGTM, pushed, thanks.

> -----Original Message-----

> From: Beignet [mailto:beignet-bounces@lists.freedesktop.org] On Behalf Of

> Guo Yejun

> Sent: Monday, January 25, 2016 3:32

> To: beignet@lists.freedesktop.org

> Cc: Guo, Yejun

> Subject: [Beignet] [PATCH] utest: correct a typo in compiler_cl_finish.cpp

> 

> there is no logical relationship between the time of finish and map, remove

> the condition.

> 

> Signed-off-by: Guo Yejun <yejun.guo@intel.com>

> ---

>  utests/compiler_cl_finish.cpp | 7 ++-----

>  1 file changed, 2 insertions(+), 5 deletions(-)

> 

> diff --git a/utests/compiler_cl_finish.cpp b/utests/compiler_cl_finish.cpp

> index 7c7dee3..c637ecc 100644

> --- a/utests/compiler_cl_finish.cpp

> +++ b/utests/compiler_cl_finish.cpp

> @@ -9,7 +9,7 @@ static void compiler_cl_finish(void)  {

>    const size_t n = 16*1024*1024;

>    struct timeval t1, t2;

> -  float t_fin, t_map_w_fin,t_map_wo_fin;

> +  float t_map_w_fin,t_map_wo_fin;

> 

>    // Setup kernel and buffers

>    OCL_CREATE_KERNEL("test_cl_finish");

> @@ -26,10 +26,7 @@ static void compiler_cl_finish(void)

> 

>    // 1st time map after clFinish

>    OCL_NDRANGE(1);

> -  T_GET(t1);

>    OCL_FINISH();

> -  T_GET(t2);

> -  t_fin = T_LAPSE(t1, t2);

> 

>    T_GET(t1);

>    OCL_MAP_BUFFER(0);

> @@ -43,7 +40,7 @@ static void compiler_cl_finish(void)

>    T_GET(t2);

>    t_map_wo_fin = T_LAPSE(t1, t2);

> 

> -  OCL_ASSERT(t_fin > t_map_w_fin && t_map_wo_fin > t_map_w_fin);

> +  OCL_ASSERT(t_map_wo_fin > t_map_w_fin);

>    OCL_UNMAP_BUFFER(0);

>  }

> 

> --

> 1.9.1

> 

> _______________________________________________

> Beignet mailing list

> Beignet@lists.freedesktop.org

> http://lists.freedesktop.org/mailman/listinfo/beignet