From ad18bf3b29a2bbad52bb54559949c04a84d18174 Mon Sep 17 00:00:00 2001 From: "Sun, Peng" Date: Thu, 6 Apr 2017 10:48:11 -0500 Subject: [PATCH] GGL update, add while 0 guard for hipLaunchKernel API Change-Id: Ie48ef8ca2ab5e26a51febfcd92417902c33fbf66 --- include/hip/hcc_detail/grid_launch_GGL.hpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/include/hip/hcc_detail/grid_launch_GGL.hpp b/include/hip/hcc_detail/grid_launch_GGL.hpp index 1d765dfc48..8f1abbb70b 100644 --- a/include/hip/hcc_detail/grid_launch_GGL.hpp +++ b/include/hip/hcc_detail/grid_launch_GGL.hpp @@ -841,15 +841,16 @@ namespace hip_impl group_mem_bytes,\ stream,\ ...)\ - {\ - hipLaunchKernelGGL(\ - kernel_name,\ - num_blocks,\ - dim_blocks,\ - group_mem_bytes,\ - stream,\ - hipLaunchParm{},\ - ##__VA_ARGS__);\ - } + do {\ + hipLaunchKernelGGL(\ + kernel_name,\ + num_blocks,\ + dim_blocks,\ + group_mem_bytes,\ + stream,\ + hipLaunchParm{},\ + ##__VA_ARGS__);\ + } while(0) + } #endif //GENERIC_GRID_LAUNCH