summaryrefslogtreecommitdiff
path: root/tests/test-progs
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2016-02-06 17:21:19 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2016-02-06 17:21:19 -0800
commit5592798865ece858bab2b444bc782d19121e2566 (patch)
tree80803048c903c424ed9f1200b5dc1a29ed3ff6b8 /tests/test-progs
parentdc8018a5c3482008232e6faaa2d96cf20aed7485 (diff)
downloadgem5-5592798865ece858bab2b444bc782d19121e2566.tar.xz
style: fix missing spaces in control statements
Result of running 'hg m5style --skip-all --fix-control -a'.
Diffstat (limited to 'tests/test-progs')
-rwxr-xr-xtests/test-progs/gpu-hello/src/gpu-hello-kernel.cl2
-rwxr-xr-xtests/test-progs/gpu-hello/src/gpu-hello.cpp4
-rw-r--r--tests/test-progs/mwait/mwait.c8
3 files changed, 7 insertions, 7 deletions
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]);