changeset 320:f730761bb044

non CUDA case clean up
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 15 Feb 2017 20:53:06 +0900
parents a15511b1a6e0
children a9a6d571fa80
files src/parallel_execution/CUDAWorker.cbc src/parallel_execution/context.h
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/CUDAWorker.cbc	Wed Feb 15 20:43:55 2017 +0900
+++ b/src/parallel_execution/CUDAWorker.cbc	Wed Feb 15 20:53:06 2017 +0900
@@ -10,7 +10,10 @@
 
 static void start_CUDAworker(Worker* worker);
 
-volatile int cuda_initialized = 0;
+#ifndef USE_CUDA_MAIN_THREAD
+volatile 
+#endif
+int cuda_initialized = 0;
 
 Worker* createCUDAWorker(struct Context* context, int id, Queue* queue, TaskManagerImpl *im) {
     struct Worker* worker = ALLOC(context, Worker);
--- a/src/parallel_execution/context.h	Wed Feb 15 20:43:55 2017 +0900
+++ b/src/parallel_execution/context.h	Wed Feb 15 20:53:06 2017 +0900
@@ -102,7 +102,10 @@
         int i;
     } LoopCounter;
     struct TaskManager {
-        volatile union Data* taskManager;
+#ifdef USE_CUDA_MAIN_THREAD
+        volatile 
+#endif
+        union Data* taskManager;
         enum Code createTask; // create NEW  contexts for execution & argument
         enum Code spawn;      // start NEW context on the worker
         enum Code shutdown;