Mercurial > hg > Game > Cerium
changeset 1745:ef246e421c8c draft
refactoring in regex_mas
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 18 Nov 2013 16:18:45 +0900 |
parents | 68e5872085ff |
children | f2f69b73afe9 |
files | example/regex_mas/main.cc |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/example/regex_mas/main.cc Mon Nov 18 15:31:52 2013 +0900 +++ b/example/regex_mas/main.cc Mon Nov 18 16:18:45 2013 +0900 @@ -13,7 +13,6 @@ #include "SchedTask.h" #include "Func.h" #include "WordCount.h" - #define EXTRA_LENGTH 4 //多く取ってくる文字数(search word length - 1) /* ;TODO @@ -92,9 +91,6 @@ run_tasks(SchedTask *manager, WordCount *w, int task_count, HTaskPtr t_next, int size) { - w->search_word = search_word; - w->search_word_len = strlen((const char *)search_word); - if (task_count < array_task_num) { array_task_num = task_count; if (task_count<=0) return; @@ -261,6 +257,10 @@ WordCount *w = (WordCount*)manager->allocate(sizeof(WordCount)); // bzero(w,sizeof(WordCount)); + /* prepare BMSearch*/ + w->search_word = search_word; + w->search_word_len = strlen((const char*)w->search_word); + //w->task_blocks = blocks; w->self = w; w->task_spwaned = 0;