Mercurial > hg > Members > yutaka > OpenCL
changeset 3:1c0c9299c292
get global_work_size
author | Yutaka_Kinjyo |
---|---|
date | Mon, 25 Jul 2011 21:19:42 +0900 |
parents | 1a32564347d5 |
children | 641eef31681e |
files | WordCount/main.cc |
diffstat | 1 files changed, 3 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/WordCount/main.cc Sun Jul 24 01:45:40 2011 +0900 +++ b/WordCount/main.cc Mon Jul 25 21:19:42 2011 +0900 @@ -11,7 +11,6 @@ #define OUT_PARAM_NUM 4 #define PRINT_PARAM_NUM 2 -#define FLAG_PARAM_NUM 2 typedef struct { caddr_t file_mmap; @@ -19,7 +18,6 @@ } st_mmap_t; typedef struct { - int work_num; int size; int remain_size; } param_t; @@ -179,7 +177,6 @@ sizeof(param_t), NULL, &ret); param_t param; - param.work_num = global_work_size; param.size = divi_size; param.remain_size = remain_size; @@ -232,21 +229,18 @@ for (int j = 0; j < PRINT_PARAM_NUM; j++) { - printf("%d ", out_data[i*OUT_PARAM_NUM+j]); word_line_num[j] += out_data[i*OUT_PARAM_NUM+j]; } + //flagの判定 if ((i != global_work_size-1) && - (out_data[i*OUT_PARAM_NUM+PRINT_PARAM_NUM]) && - (out_data[i*OUT_PARAM_NUM+PRINT_PARAM_NUM+1])) { + (out_data[i*OUT_PARAM_NUM+PRINT_PARAM_NUM+1] == 1) && + (out_data[i*OUT_PARAM_NUM+PRINT_PARAM_NUM+4] == 0)) { word_line_num[0] += 1; } - - printf("\n"); - } printf("%d %d", word_line_num[0], word_line_num[1]);