summaryrefslogtreecommitdiff
path: root/cuda-global/include/game.cuh
diff options
context:
space:
mode:
Diffstat (limited to 'cuda-global/include/game.cuh')
-rw-r--r--cuda-global/include/game.cuh21
1 files changed, 21 insertions, 0 deletions
diff --git a/cuda-global/include/game.cuh b/cuda-global/include/game.cuh
new file mode 100644
index 0000000..873a4cf
--- /dev/null
+++ b/cuda-global/include/game.cuh
@@ -0,0 +1,21 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <omp.h>
+
+#ifndef GAME_H
+#define GAME_H
+
+
+struct GAME {
+ unsigned char* grid;
+ int padding;
+ int width;
+ int height;
+};
+
+__device__ int neighbors(struct GAME game, int x, int y);
+__global__ void next(struct GAME game, unsigned char* newGrid);
+void randomize(struct GAME* game);
+
+#endif // GAME_H