Mercurial > hg > Game > Cerium
annotate example/dependency_task/ppe/Exec.cc @ 109:028ffc9c0375 draft
Cerium cvs version
author | gongo@gendarme.local |
---|---|
date | Wed, 12 Nov 2008 17:39:33 +0900 |
parents | |
children | 768452fab95e |
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*)get_input(rbuf, 0); | |
12 int *odata = (int*)get_output(wbuf, 0); | |
13 int length = get_param(0); | |
14 int calnum = get_param(1); | |
15 | |
16 for (int i = 0; i < length; i++) { | |
17 odata[i] = idata[i] + calnum; | |
18 } | |
19 | |
20 return 0; | |
21 } |