Mercurial > hg > Game > Cerium
diff example/regex_mas/main.cc @ 1799:d9122ca02431 draft
Exec wordcount by Data Parallel
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 06 Dec 2013 05:30:43 +0900 |
parents | 3babb36ac459 |
children | e91bf033443a |
line wrap: on
line diff
--- a/example/regex_mas/main.cc Thu Dec 05 16:41:38 2013 +0900 +++ b/example/regex_mas/main.cc Fri Dec 06 05:30:43 2013 +0900 @@ -260,7 +260,7 @@ /* out用のdivision_size. statusが2つなので、あわせて16byteになるように、long long(4byte)を使用 */ - w->division_out_size = sizeof(unsigned long long)*1; + w->division_out_size = sizeof(unsigned long long)*2; int out_size = w->division_out_size*out_task_num; w->o_data = (unsigned long long *)manager->allocate(out_size); w->out_size = 1; @@ -271,14 +271,15 @@ (memaddr)&w->self,sizeof(memaddr),0,0); w->t_print = t_print; - for(int i = 0;i<2;i++) { + // for(int i = 0;i<2;i++) { /* Task を task_blocks ずつ起動する Task */ /* serialize されていると仮定する... */ HTaskPtr t_exec = manager->create_task(RUN_TASK_BLOCKS, (memaddr)&w->self,sizeof(memaddr),0,0); t_print->wait_for(t_exec); - t_exec->spawn(); - } + t_exec->iterate(2); + // t_exec->spawn(); + // } t_print->spawn(); }