Mercurial > hg > Members > innparusu > Gears
comparison 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 |
comparison
equal
deleted
inserted
replaced
97:485ea0290fae | 98:d400948dbbab |
---|---|
1 /* Context definition for llrb example */ | 1 /* Context definition for llrb example */ |
2 #include <pthread.h> | 2 #include <pthread.h> |
3 #include <cuda.h> | |
3 #include "stack.h" | 4 #include "stack.h" |
4 | 5 |
5 #define ALLOCATE_SIZE 20000000 | 6 #define ALLOCATE_SIZE 20000000 |
6 | 7 |
7 enum Code { | 8 enum Code { |
104 } loopCounter; | 105 } loopCounter; |
105 struct Worker { | 106 struct Worker { |
106 int num; | 107 int num; |
107 struct Context* contexts; | 108 struct Context* contexts; |
108 } worker; | 109 } worker; |
110 struct CudaTask { | |
111 CUdevice device; | |
112 CUcontext cuCtx; | |
113 CUfunction code; | |
114 CUdeviceptr* deviceptr; | |
115 CUstream stream; | |
116 } cudatask; | |
109 struct Task { | 117 struct Task { |
110 enum Code code; | 118 enum Code code; |
111 int key; | 119 int key; |
112 } task; | 120 } task; |
113 struct Queue { | 121 struct Queue { |