# HG changeset patch # User Tatsuki IHA # Date 1509962681 -32400 # Node ID 55db2a3399588fb2859e788189adbc8142eab45d # Parent eab6f8cd28205e327d6ab70909af4d3fc87ef1bb Add worker shutdown diff -r eab6f8cd2820 -r 55db2a339958 src/parallel_execution/CMakeLists.txt --- a/src/parallel_execution/CMakeLists.txt Mon Nov 06 18:36:38 2017 +0900 +++ b/src/parallel_execution/CMakeLists.txt Mon Nov 06 19:04:41 2017 +0900 @@ -83,15 +83,15 @@ TARGET CUDAtwice SOURCES - examples/twice/main.cbc examples/twice/twice.cbc examples/twice/CUDAtwice.cu examples/twice/createArray.cbc examples/twice/printArray.cbc CPUWorker.cbc TimeImpl.cbc examples/twice/twice.cbc TaskManagerImpl.cbc SingleLinkedQueue.cbc SynchronizedQueue.cbc CUDAWorker.cbc cuda.c MultiDimIterator.cbc CudaExecutor.cbc + examples/twice/main.cbc examples/twice/twice.cbc examples/twice/CUDAtwice.cu examples/twice/createArray.cbc examples/twice/printArray.cbc CPUWorker.cbc TimeImpl.cbc examples/twice/twice.cbc TaskManagerImpl.cbc SingleLinkedQueue.cbc SynchronizedQueue.cbc CUDAWorker.cbc cuda.c MultiDimIterator.cbc CUDAExecutor.cbc ) set_target_properties(CUDAtwice PROPERTIES COMPILE_FLAGS "-Wall -g -DUSE_CUDAWorker=1") # -DUSE_CUDA_MAIN_THREAD GearsCommand( TARGET - CUDAbitonicSort + CUDAbitonicSort SOURCES - examples/bitonicSort/bitonicSort.cbc examples/bitonicSort/bitonicSwap.cbc examples/bitonicSort/CUDAbitonicSwap.cu examples/bitonicSort/makeArray.cbc examples/bitonicSort/printArray.cbc CPUWorker.cbc CUDAWorker.cbc TaskManagerImpl.cbc SingleLinkedQueue.cbc SynchronizedQueue.cbc cuda.c MultiDimIterator.cbc TimeImpl.cbc CudaExecutor.cbc + examples/bitonicSort/bitonicSort.cbc examples/bitonicSort/bitonicSwap.cbc examples/bitonicSort/CUDAbitonicSwap.cu examples/bitonicSort/makeArray.cbc examples/bitonicSort/printArray.cbc CPUWorker.cbc CUDAWorker.cbc TaskManagerImpl.cbc SingleLinkedQueue.cbc SynchronizedQueue.cbc cuda.c MultiDimIterator.cbc TimeImpl.cbc CUDAExecutor.cbc ) set_target_properties(CUDAbitonicSort PROPERTIES COMPILE_FLAGS "-Wall -g -DUSE_CUDAWorker=1") endif() @@ -112,7 +112,7 @@ GearsCommand( TARGET - multiDimIterator_test + multiDimIterator_test SOURCES test/multiDimIterator_test.cbc test/printIterator.cbc CPUWorker.cbc TaskManagerImpl.cbc SingleLinkedQueue.cbc SynchronizedQueue.cbc MultiDimIterator.cbc TimeImpl.cbc ) diff -r eab6f8cd2820 -r 55db2a339958 src/parallel_execution/CPUWorker.cbc --- a/src/parallel_execution/CPUWorker.cbc Mon Nov 06 18:36:38 2017 +0900 +++ b/src/parallel_execution/CPUWorker.cbc Mon Nov 06 19:04:41 2017 +0900 @@ -139,4 +139,5 @@ } __code shutdownWorker(struct CPUWorker* worker) { + goto meta(context, C_exit_code); } diff -r eab6f8cd2820 -r 55db2a339958 src/parallel_execution/CUDAWorker.cbc --- a/src/parallel_execution/CUDAWorker.cbc Mon Nov 06 18:36:38 2017 +0900 +++ b/src/parallel_execution/CUDAWorker.cbc Mon Nov 06 19:04:41 2017 +0900 @@ -146,6 +146,7 @@ __code shutdownCUDAWorker(struct Context* context, CUDAWorker* worker) { cudaShutdown(worker); + goto meta(context, C_exit_code); } __code shutdownCUDAWorker_stub(struct Context* context) {