Mercurial > hg > Members > kono > Cerium
annotate example/share_task/spe/Exec.cc @ 109:5c194c71eca8
Cerium cvs version
author | gongo@gendarme.local |
---|---|
date | Wed, 12 Nov 2008 17:39:33 +0900 |
parents | |
children | 58fd16298954 |
rev | line source |
---|---|
109 | 1 #include <stdio.h> |
2 #include "Exec.h" | |
3 #include "Func.h" | |
4 | |
5 /* ¤³¤ì¤Ïɬ¿Ü */ | |
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 } |