Mercurial > hg > Game > Cerium
view example/bm_search/ppe/Print.cc @ 1976:a8f4227d6a21 draft
rename regex_mas to bm_search
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 03 Mar 2014 19:12:02 +0900 |
parents | example/regex_mas/ppe/Print.cc@08e9e416c2e0 |
children | f786ffb2a198 |
line wrap: on
line source
#include <stdio.h> #include <string.h> #include "Print.h" #include "Func.h" #include "WordCount.h" /* これは必須 */ SchedDefineTask1(PRINT_TASK,print_task); static int print_task(SchedTask *s, void *rbuf, void *wbuf) { WordCount *w = *(WordCount**)rbuf; unsigned long long *idata = w->o_data; unsigned int idata_task_num = w->out_size * w->out_task_num; int match_counter = 0; for (int i = 0;i < idata_task_num;i++) { match_counter += idata[i]; //s->printf("idata[%d]=:%d\n",i,idata[i]); } s->printf("HIT:%d\n",match_counter); return 0; }