dol: initial dol commit
[jump.git] / dol / src / dol / visitor / cell / template / spu_process_wrapper_template.h
diff --git a/dol/src/dol/visitor/cell/template/spu_process_wrapper_template.h b/dol/src/dol/visitor/cell/template/spu_process_wrapper_template.h
new file mode 100644 (file)
index 0000000..a0f9800
--- /dev/null
@@ -0,0 +1,56 @@
+/****************************************************************
+ *     Process Wrapper file
+ *     Creator: lschor, 2009-02-24
+ *     Description: Wrapper for a specific SPE process
+ *
+ *     Revision:
+ *     - 2009-02-24: Created
+ */
+
+#ifndef @PROCESSNAME@_WRAPPER_H_
+#define @PROCESSNAME@_WRAPPER_H_
+
+// General includes
+#include <spu_intrinsics.h>
+#include <spu_mfcio.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <new>
+
+// Include to allocate/free using for DMA transfers
+#include "../lib/malloc_align.h"
+#include "../lib/free_align.h"
+#include "../lib/spu/Fifo.h"
+#include "../lib/spu/WindowedFifo.h"
+
+// Local includes
+#include "../lib/common.h"
+//#include "../lib/estimation.h"
+
+#include "../lib/spu/proc_wrapper.h"
+
+class @PROCESSNAME@Wrapper; 
+
+typedef struct _@PROCESSNAME@_data {
+    int lc;
+    @PROCESSNAME@Wrapper *wrapper;
+} @PROCESSNAME@_data;
+
+class @PROCESSNAME@Wrapper  : public proc_wrapper {
+       
+// Context file
+public:
+       @PROCESSNAME@Wrapper(uint64_t argp);
+       virtual ~@PROCESSNAME@Wrapper();
+       
+       @FIFO@
+
+protected:
+       LocalState _state;
+       process_context ctx_proc __attribute__ ((aligned (128)));
+       @PROCESSNAME@_data _wrapper_data;
+
+};
+
+#endif /* @PROCESSNAME@_WRAPPER_H_ */