diff src/parallel_execution/context.h @ 98:d400948dbbab

add Cuda infomation to context
author ikkun
date Mon, 01 Feb 2016 18:03:43 +0900
parents 3e28ee215c0e
children 8987cf13d5bb
line wrap: on
line diff
--- a/src/parallel_execution/context.h	Fri Jan 29 05:40:04 2016 +0900
+++ b/src/parallel_execution/context.h	Mon Feb 01 18:03:43 2016 +0900
@@ -1,5 +1,6 @@
 /* Context definition for llrb example */
 #include <pthread.h>
+#include <cuda.h>
 #include "stack.h"
 
 #define ALLOCATE_SIZE 20000000
@@ -106,6 +107,13 @@
         int num;
         struct Context* contexts;
     } worker;
+    struct CudaTask {
+        CUdevice device;
+        CUcontext cuCtx;
+        CUfunction code;
+        CUdeviceptr* deviceptr;
+        CUstream stream;
+    } cudatask;
     struct Task {
         enum Code code;
         int key;