Mercurial > hg > Game > Cerium
annotate example/share_task/ppe/Exec.cc @ 298:768452fab95e draft
from EUC to UTF-8
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 07 Jun 2009 15:17:41 +0900 |
parents | 028ffc9c0375 |
children | 839e34d0cc3c |
rev | line source |
---|---|
109 | 1 #include <stdio.h> |
2 #include "Exec.h" | |
3 #include "Func.h" | |
4 | |
298 | 5 /* これは必須 */ |
109 | 6 SchedDefineTask(Exec); |
7 | |
8 int | |
9 Exec::run(void *rbuf, void *wbuf) | |
10 { | |
11 int *idata = (int*)global_get(DATA_ID); | |
12 int length = get_param(0); | |
13 int number = get_param(1); | |
14 int calnum = get_param(2); | |
15 | |
16 printf("[TASK_EXEC %02d] ", number); | |
17 for (int i = 0; i < length; i++) { | |
18 idata[i] += calnum; | |
19 printf("%03d ", idata[i]); | |
20 } | |
21 printf("\n"); | |
22 | |
23 return 0; | |
24 } |