Mercurial > hg > Game > Cerium
view example/regex_mas/ppe/Print.cc @ 1655:963d2fc5f685 draft
push (but can't run regex_mas)
author | Masa <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 01 Jul 2013 21:15:23 +0900 |
parents | c134dd2e2f4e |
children | 8b50b1ee068e |
line wrap: on
line source
#include <stdio.h> #include <string.h> #include "Print.h" #include "Func.h" #include "WordCount.h" /* これは必須 */ SchedDefineTask1(Print,run_print); static int run_print(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_count = 0; s->printf("position\n"); for (int i = 0;i < idata_task_num/2;i++) { // if(idata[2*i] == 0x61){ s->printf("%d ",(int)idata[2*i+1]); s->printf("%c\n",(unsigned char)idata[2*i]); //s->printf("%d:%c\n",2*i,(unsigned char)idata[2*i]); //s->printf("%d:%d ",2*i+1,(int)idata[2*i+1]); match_count++; // } } s->printf("HIT:%d\n",match_count); s->printf("task num : %d\n",w->task_spwaned); return 0; }