Commits

Pjotr Kourzanov  committed 41593bf

improvements to CUDA, generated code for GPU compiles (but doesn't run yet)

  • Participants
  • Parent commits 42e7a5e
  • Branches LIME-CUDA

Comments (0)

Files changed (3)

File dom/CUDA/bin/slimer

 export rlib=$root/lib
 d=CUDA
 
-export CFLAGS+="-D__DEVICE_EMULATION__"
+#export CFLAGS+="-D__DEVICE_EMULATION__"
 export FLAGS+="-DNDEBUG -DTARGET $CFLAGS"
 
 echo FLAGS:$FLAGS >/dev/stderr

File dom/CUDA/inc/CUDA.h

 typedef unsigned int varrate_actor;
 
 #if defined(__CUDACC__)
-#define gpu_actor __device__ actor
-#define x86_actor __host__ actor
-#define gpu_varrate_actor __device__ varrate_actor
-#define x86_varrate_actor __device__ varrate_actor
-#define helper __device__
+#define gpu_actor		__device__ actor
+#define gpu_varrate_actor 	__device__ varrate_actor
+#define x86_actor 		__host__ actor
+#define x86_varrate_actor 	__host__ varrate_actor
+#define gpu_helper 		__device__
 #endif//__CUDACC__
 
 #if !defined(__CUDACC__)
 #define x86_actor actor
 #define gpu_varrate_actor varrate_actor
 #define x86_varrate_actor varrate_actor
-#define helper
+#define gpu_helper
 #endif//!defined(__CUDACC__)
 
 

File dom/CUDA/project/CUDA-test1/sink.c

 
 struct source_state;
 
-static int CheckCount(unsigned int size, const unsigned int *buf, unsigned int *pCount);
+gpu_helper static int CheckCount(unsigned int size, const unsigned int *buf, unsigned int *pCount);
 
 gpu_actor process(const unsigned int buf[restrict BUF_SIZE],
 	      const struct source_state inst[1],
 #endif
 }
 
-helper static int CheckCount(unsigned int size, 
+gpu_helper static int CheckCount(unsigned int size, 
 		const unsigned int *buf,
 		unsigned int *pCount)
 {