changeset 1939:d862c573bf84 draft

bugfix (change variable types in WordCount.h)
author Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
date Mon, 03 Feb 2014 22:48:36 +0900
parents 71cb3365d9fb
children 0f6d0ae5c3f3
files example/regex_mas/WordCount.h example/regex_mas/main.cc example/regex_mas/ppe/Exec.cc example/regex_mas/ppe/Read.cc
diffstat 4 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/example/regex_mas/WordCount.h	Mon Feb 03 17:44:49 2014 +0900
+++ b/example/regex_mas/WordCount.h	Mon Feb 03 22:48:36 2014 +0900
@@ -3,13 +3,12 @@
     struct wordCount *self;
     /* read task variable */
     int fd;
-    int read_division_size;
-    int read_task_number;
+    long read_division_size;
+    long read_task_number;
     int read_task_num;
     long long read_filesize;
     long long read_left_size;
     int read_task_blocks;
-    char *read_text;
     CPU_TYPE read_cpu;
 
 
--- a/example/regex_mas/main.cc	Mon Feb 03 17:44:49 2014 +0900
+++ b/example/regex_mas/main.cc	Mon Feb 03 22:48:36 2014 +0900
@@ -31,7 +31,7 @@
 int spe_num = 1;
 int divide_read_flag = 0;
 int DIVISION_SIZE = 4*4096;
-int READ_DIVISION_SIZE = 4*4096;
+int READ_DIVISION_SIZE = 4*4096 * 1024;
 
 unsigned char *sword = 0;
 int task_count = 0;
@@ -87,6 +87,12 @@
         read->set_param(3,(long)w->fd);  //fdの番号の受け渡し
 
         read->set_outData(0,w->file_mmap + w->read_task_number*w->read_division_size, w->read_division_size);
+        //printf("----------------------\n");
+        //printf("w->file_mmap             : 0x%llx\n",w->file_mmap);
+        //printf("set_outData buf          : 0x%llx\n",(memaddr)(w->file_mmap + w->read_task_number*w->read_division_size));
+        //printf("w->read_task_number      : %d\n",w->read_task_number);
+        //printf("w->read_division_size    : %d\n",w->read_division_size);
+        //printf("----------------------\n");
 
         w->t_exec->wait_for(read);
         read->spawn();
--- a/example/regex_mas/ppe/Exec.cc	Mon Feb 03 17:44:49 2014 +0900
+++ b/example/regex_mas/ppe/Exec.cc	Mon Feb 03 22:48:36 2014 +0900
@@ -40,7 +40,6 @@
     int length = (int)s->get_inputSize(0);
     int sw_len = (int)s->get_inputSize(1);
 
-    //get_param
     //long task_count = (long)s->get_param(0);  //何番目のtaskか
     //s->printf("[start exec No: %lld]\n",task_count+1);
 
--- a/example/regex_mas/ppe/Read.cc	Mon Feb 03 17:44:49 2014 +0900
+++ b/example/regex_mas/ppe/Read.cc	Mon Feb 03 22:48:36 2014 +0900
@@ -22,8 +22,9 @@
     long fd = (long)s->get_param(3);
 
     char *read_text = (char*)s->get_output(wbuf,0);
+    //s->printf("[read No %d : wbuf addr 0x%llx]\n",task_number,read_text);
 
-    pread(fd, read_text, (long)read_size , division_size*task_number);
+    pread(fd, read_text, read_size , division_size*task_number);
 
     //s->printf("[start read task No. %d]\n",task_number);
     //s->printf("%s\n",read_text);