diff src/parallel_execution/CUDAtwice.cbc @ 314:1839586f5b41

pthread CUDA test
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 15 Feb 2017 12:34:19 +0900
parents 7dd5a7d52a67
children 54d203daf06b
line wrap: on
line diff
--- a/src/parallel_execution/CUDAtwice.cbc	Wed Feb 15 11:36:10 2017 +0900
+++ b/src/parallel_execution/CUDAtwice.cbc	Wed Feb 15 12:34:19 2017 +0900
@@ -12,6 +12,7 @@
   // memory allocate
     CUdeviceptr devA;
     CUdeviceptr devLoopCounter;
+printf("CUdA Exe 1\n");
 
     checkCudaErrors(cuMemAlloc(&devA, array->size));
     checkCudaErrors(cuMemAlloc(&devLoopCounter, sizeof(LoopCounter)));
@@ -19,6 +20,7 @@
     //twiceカーネルが定義されてなければそれをロードする
     checkCudaErrors(cuModuleLoad(&context->module, "CUDAtwice.ptx"));
     checkCudaErrors(cuModuleGetFunction(&context->function, context->module, "twice"));
+printf("CUdA Exe 2\n");
 
     //入力のDataGearをGPUにbuffer経由で送る
     // Synchronous data transfer(host to device)
@@ -53,6 +55,7 @@
 }
 
 __code CUDAtwice_stub(struct Context* context) {
+printf("CUdAtwice stub\n");
     struct LoopCounter* loopCounter = &context->data[context->dataNum]->LoopCounter;
     struct Array* array = &context->data[context->dataNum+1]->Array;
     CUDAExec(context,array,loopCounter);