changeset 4:c2ce9efe2a52

fix
author yutaka@localhost.localdomain
date Wed, 07 Apr 2010 17:47:12 +0900
parents 8b4d6bf8c43d
children 39d405bc46b7
files Makefile include/Sys.h task/Run.cc
diffstat 3 files changed, 34 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Apr 07 17:35:34 2010 +0900
+++ b/Makefile	Wed Apr 07 17:47:12 2010 +0900
@@ -24,5 +24,5 @@
 
 clean:
 	rm -f $(PPETARGET) $(SPETARGET)
-	rm -f ppe/*.o spe/*.o
-	rm -f ppe/*~ spe/*~ ppe/*.~ spe/*.~ 
\ No newline at end of file
+	rm -f ppe/*.o spe/*.o task/*.o
+	rm -f ppe/*~ spe/*~ ppe/*.~ spe/*.~ task/*.~ 
\ No newline at end of file
--- a/include/Sys.h	Wed Apr 07 17:35:34 2010 +0900
+++ b/include/Sys.h	Wed Apr 07 17:47:12 2010 +0900
@@ -9,7 +9,8 @@
 task_t* task_allocate(int in_size, int out_size);
 
 task_t* add_list(task_t *tail, task_t *task);
+task_t* entry_head(task_head_t *head);
 void set_pin(task_t *task, int pin_in, int pin_out);
-task_t* entry_head(task_head_t *head)
+
 
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/task/Run.cc	Wed Apr 07 17:47:12 2010 +0900
@@ -0,0 +1,30 @@
+#include <stdio.h>
+#include "Run.h"
+
+void
+run(void *in, void *out, int size_in, int size_out)
+{
+
+  //printf("size_in %d\n",size_in);
+
+  for (int i = 0; i < size_in / sizeof(int); i++) {
+
+    int *in_spe  = (int*)in;
+    int *out_spe = (int*)out;
+
+    //printf("in_spe %d\n",in_spe[i]);
+
+    out_spe[i] = 1;
+
+    for (int j = 2; j < in_spe[i]; j++) {
+
+      if ( in_spe[i] % j == 0) {
+	out_spe[i] = 0;
+	break;
+      }
+
+    }
+
+  }
+
+}