Mercurial > hg > Members > Moririn
changeset 306:ae4f6aa427f5
CUDAtwice
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 14 Feb 2017 12:22:05 +0900 |
parents | ec0a5b4fba05 |
children | 700f247f32a1 |
files | src/parallel_execution/CMakeLists.txt src/parallel_execution/CUDAtwice.cbc |
diffstat | 2 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/CMakeLists.txt Tue Feb 14 12:15:58 2017 +0900 +++ b/src/parallel_execution/CMakeLists.txt Tue Feb 14 12:22:05 2017 +0900 @@ -68,7 +68,7 @@ TARGET CUDAtwice SOURCES - main.cbc RedBlackTree.cbc compare.c SingleLinkedStack.cbc CPUWorker.cbc time.cbc twice.cbc TaskManagerImpl.cbc SingleLinkedQueue.cbc SynchronizedQueue.cbc SemaphoreImpl.cbc CUDAWorker.cbc CUDAtwice.cu + main.cbc RedBlackTree.cbc compare.c SingleLinkedStack.cbc CPUWorker.cbc time.cbc twice.cbc TaskManagerImpl.cbc SingleLinkedQueue.cbc SynchronizedQueue.cbc SemaphoreImpl.cbc CUDAWorker.cbc CUDAtwice.cbc CUDAtwice.cu ) endif()
--- a/src/parallel_execution/CUDAtwice.cbc Tue Feb 14 12:15:58 2017 +0900 +++ b/src/parallel_execution/CUDAtwice.cbc Tue Feb 14 12:22:05 2017 +0900 @@ -1,7 +1,5 @@ #include <stdio.h> - -#include "context.h" -#include "origin_cs.h" +#include "../context.h" __code twice(struct Context* context, struct LoopCounter* loopCounter, int index, int prefix, int* array, struct Context* workerContext) { int i = loopCounter->i; @@ -17,7 +15,6 @@ } __code twice_stub(struct Context* context) { - struct Context* workerContext = context->worker->worker->CPUWorker.context; // memory allocate CUdeviceptr devA; @@ -84,6 +81,7 @@ checkCudaErrors(cuStreamSynchronize(stream[i])); - //continationにそってGPUworkerに戻る + //continuationにそってGPUworkerに戻る + struct Context* workerContext = context->worker->worker->CUDAWorker.context; goto twice(context, Gearef(context, LoopCounter), 0, 0, NULL, workerContext); }