Mercurial > hg > Game > Cerium
changeset 967:daab1b74b32d draft
add anum option in WordCount
author | Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 08 Aug 2010 14:00:12 +0900 |
parents | 4cd17f86dda6 |
children | 122b1fddfa94 |
files | example/word_count/main.cc |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/example/word_count/main.cc Sat Aug 07 09:44:34 2010 +0900 +++ b/example/word_count/main.cc Sun Aug 08 14:00:12 2010 +0900 @@ -16,6 +16,7 @@ int all = 0; int use_task_array = 1; int use_compat = 0; +int array_task_num = 8; const char *usr_help_str = "Usage: ./word_count [-a -c -s] [-cpu spe_num] [-file filename]\n"; @@ -76,7 +77,6 @@ run_tasks(SchedTask *manager, WordCount *w, int task_count, HTaskPtr t_next, int size) { - int array_task_num = 8; if (task_count < array_task_num) { array_task_num = task_count; if (task_count<=0) return; @@ -253,6 +253,8 @@ } else if (strcmp(argv[i], "-s") == 0) { use_task_array = 0; use_compat = 0; + } else if (strcmp(argv[i], "-anum") == 0) { + array_task_num = atoi(argv[i+1]); } } if (filename==0) {