Mercurial > hg > Game > Cerium
changeset 1942:b5d778f00bf1 draft
merge
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 04 Feb 2014 02:18:27 +0900 |
parents | f19885ea776d (current diff) 0f6d0ae5c3f3 (diff) |
children | f82bb7393c4d |
files | |
diffstat | 7 files changed, 18 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/TaskManager.cc Tue Feb 04 02:18:07 2014 +0900 +++ b/TaskManager/kernel/ppe/TaskManager.cc Tue Feb 04 02:18:27 2014 +0900 @@ -77,7 +77,7 @@ } void* -TaskManager::allocate(int size) { +TaskManager::allocate(long size) { return m_impl->allocate(size); }
--- a/TaskManager/kernel/ppe/TaskManager.h Tue Feb 04 02:18:07 2014 +0900 +++ b/TaskManager/kernel/ppe/TaskManager.h Tue Feb 04 02:18:27 2014 +0900 @@ -24,7 +24,7 @@ HTaskPtr create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData); void run(); - void *allocate(int size); + void *allocate(long size); void set_TMend(void (*endf)(TaskManager *manager)); int get_cpuNum(); int get_random();
--- a/TaskManager/kernel/ppe/TaskManagerImpl.h Tue Feb 04 02:18:07 2014 +0900 +++ b/TaskManager/kernel/ppe/TaskManagerImpl.h Tue Feb 04 02:18:27 2014 +0900 @@ -81,7 +81,7 @@ #endif } - void* allocate(int size, int alignment) + void* allocate(long size, int alignment) { void *buff = 0; @@ -96,7 +96,7 @@ return buff; } - void* allocate(int size) + void* allocate(long size) { void *buff = 0;
--- a/example/regex_mas/WordCount.h Tue Feb 04 02:18:07 2014 +0900 +++ b/example/regex_mas/WordCount.h Tue Feb 04 02:18:27 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 Tue Feb 04 02:18:07 2014 +0900 +++ b/example/regex_mas/main.cc Tue Feb 04 02:18:27 2014 +0900 @@ -31,14 +31,14 @@ 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; static int division = 16; // in Kbyte CPU_TYPE spe_cpu = SPE_ANY; -CPU_TYPE read_spe_cpu = SPE_ANY; +CPU_TYPE read_spe_cpu = IO_0; const char *usr_help_str = "Usage: ./word_count [-a -c -s] [-cpu spe_num] [-sw search_word] [-file filename]\n Required filename & search_word\n"; @@ -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(); @@ -155,7 +161,7 @@ Task *t_exec = 0; HTask *h_exec = 0; for (int j = 0; j < array_task_num; j++) { - int a = w->task_spwaned++; + long a = w->task_spwaned++; if (w->size < size) size = w->size; if (size==0) break; if (use_task_array) { @@ -277,7 +283,7 @@ w->read_task_num += ((w->read_filesize % READ_DIVISION_SIZE) != 0); printf("filesize : %lld\n",w->read_filesize); - printf("one_task_size: %d\n",w->read_division_size); + printf("one_task_size: %ld\n",w->read_division_size); printf("task_num : %d\n",w->read_task_num); HTaskPtr r_run = NULL;
--- a/example/regex_mas/ppe/Exec.cc Tue Feb 04 02:18:07 2014 +0900 +++ b/example/regex_mas/ppe/Exec.cc Tue Feb 04 02:18:27 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 Tue Feb 04 02:18:07 2014 +0900 +++ b/example/regex_mas/ppe/Read.cc Tue Feb 04 02:18:27 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);