From 5592798865ece858bab2b444bc782d19121e2566 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Sat, 6 Feb 2016 17:21:19 -0800 Subject: style: fix missing spaces in control statements Result of running 'hg m5style --skip-all --fix-control -a'. --- tests/test-progs/gpu-hello/src/gpu-hello-kernel.cl | 2 +- tests/test-progs/gpu-hello/src/gpu-hello.cpp | 4 ++-- tests/test-progs/mwait/mwait.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/test-progs/gpu-hello/src/gpu-hello-kernel.cl b/tests/test-progs/gpu-hello/src/gpu-hello-kernel.cl index 1f61a6fab..496f9b548 100755 --- a/tests/test-progs/gpu-hello/src/gpu-hello-kernel.cl +++ b/tests/test-progs/gpu-hello/src/gpu-hello-kernel.cl @@ -71,7 +71,7 @@ __kernel void read_kernel(size_t code_size, barrier(CLK_LOCAL_MEM_FENCE); - if(get_local_id(0) == 0) { + if (get_local_id(0) == 0) { int _lcount = atomic_load(&lcount); atomic_fetch_add((atomic_int *)chars_decoded, _lcount); } diff --git a/tests/test-progs/gpu-hello/src/gpu-hello.cpp b/tests/test-progs/gpu-hello/src/gpu-hello.cpp index b6fff6e32..b054558f5 100755 --- a/tests/test-progs/gpu-hello/src/gpu-hello.cpp +++ b/tests/test-progs/gpu-hello/src/gpu-hello.cpp @@ -70,7 +70,7 @@ int setupDataStructs() { msg = (char *)memalign(CACHE_LINE_SIZE, (grid_size + 1) * sizeof(char)); - if(msg == NULL) { + if (msg == NULL) { printf("%s:%d: error: %s\n", __FILE__, __LINE__, "could not allocate host buffers\n"); exit(-1); @@ -126,7 +126,7 @@ setupOpenCL() delete platforms; } - if(NULL == platform) { + if (NULL == platform) { printf("NULL platform found so Exiting Application.\n"); return FAILURE; } diff --git a/tests/test-progs/mwait/mwait.c b/tests/test-progs/mwait/mwait.c index f5ce3c32b..e1b203545 100644 --- a/tests/test-progs/mwait/mwait.c +++ b/tests/test-progs/mwait/mwait.c @@ -44,7 +44,7 @@ int main( int argc, char** argv) // invalidate flags in this cpu's cache pthread_create(&threads[0], NULL, DoWork1, NULL); - while(wait[0]); + while (wait[0]); // launch thread to invalidate address being monitored pthread_create(&threads[0], NULL, DoWork2, NULL); @@ -53,17 +53,17 @@ int main( int argc, char** argv) int mwait_cnt = 0; do { pthread_mutex_lock (&mutex); - if(flags[0] != 2) { + if (flags[0] != 2) { pthread_mutex_unlock (&mutex); __builtin_ia32_mwait(0, 0); } else { pthread_mutex_unlock (&mutex); } mwait_cnt++; - } while(flags[0] != 2 && mwait_cnt < NUM_TRIES); + } while (flags[0] != 2 && mwait_cnt < NUM_TRIES); // test may hang if mwait is not working - if(flags[0]==2) { + if (flags[0]==2) { printf("mwait regression PASSED, flags[0] = %d\n", flags[0]); } else { printf("mwait regression FAILED, flags[0] = %d\n", flags[0]); -- cgit v1.2.3