changeset 668:6bec6efda444

vector fix on Simple Task
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 03 Dec 2009 04:29:51 +0900
parents d753b4f6b129
children 4af9d20cf3af
files TaskManager/Makefile.def example/word_count_test/Makefile.def example/word_count_test/spe/Exec.cc.vector
diffstat 3 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/TaskManager/Makefile.def	Thu Dec 03 04:23:36 2009 +0900
+++ b/TaskManager/Makefile.def	Thu Dec 03 04:29:51 2009 +0900
@@ -29,8 +29,8 @@
 
 ABIBIT = 32
 
-SIMPLE_TASK=-DSIMPLE_TASK
-# SIMPLE_TASK=
+# SIMPLE_TASK=-DSIMPLE_TASK
+SIMPLE_TASK=
 
 OPT = -O9 -g
 # OPT =  -g
--- a/example/word_count_test/Makefile.def	Thu Dec 03 04:23:36 2009 +0900
+++ b/example/word_count_test/Makefile.def	Thu Dec 03 04:29:51 2009 +0900
@@ -7,10 +7,11 @@
 # ex  linux/ps3
 CERIUM = ../../../Cerium
 
-SIMPLE_TASK= -DSIMPLE_TASK
+# SIMPLE_TASK= -DSIMPLE_TASK
+SIMPLE_TASK= 
 
-OPT =  -O9
-# OPT =  -g
+# OPT =  -O9
+OPT =  -g
 CC      = g++
 CFLAGS  =  -Wall $(OPT) $(SIMPLE_TASK)
 
--- a/example/word_count_test/spe/Exec.cc.vector	Thu Dec 03 04:23:36 2009 +0900
+++ b/example/word_count_test/spe/Exec.cc.vector	Thu Dec 03 04:29:51 2009 +0900
@@ -6,20 +6,28 @@
 /* これは必須 */
 SchedDefineTask(Exec);
 
-// typedef char *cvector __attribute__ ((vector_size (16)));
+typedef char *cvector __attribute__ ((vector_size (16)));
 //   vectorize だと結果がよろしくない...
 //
-typedef char *cvector;
+// typedef char *cvector;
 
 static int
 run(SchedTask *s, void *rbuf, void *wbuf)
 {
+#ifdef SIMPLE_TASK
+    cvector i_data = (cvector)rbuf;
+    char* i_data0 = (char*)rbuf;
+    unsigned long long *o_data = (unsigned long long*)wbuf;
+    unsigned long long *head_tail_flag = o_data +2;
+    int length = s->read_size();
+#else
     cvector i_data = (cvector)s->get_input(rbuf, 0);
     char* i_data0 = (char*)s->get_input(rbuf, 0);
     unsigned long long *o_data = (unsigned long long*)s->get_output(wbuf, 0);
     /*担当範囲の先頭、末尾が「改行、スペース」か、「それ以外の文字」かのフラグ*/
     unsigned long long  *head_tail_flag = (unsigned long long*)s->get_output(wbuf,1);
     int length = (long)s->get_param(0);
+#endif
 
     static const char spaces[] = {0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20} ;
     cvector const space = (cvector)spaces;