Mercurial > hg > Members > kono > Cerium
comparison example/basic/spe/Twice.cc @ 109:5c194c71eca8
Cerium cvs version
author | gongo@gendarme.local |
---|---|
date | Wed, 12 Nov 2008 17:39:33 +0900 |
parents | |
children | 58fd16298954 |
comparison
equal
deleted
inserted
replaced
108:6f3b3dd3c095 | 109:5c194c71eca8 |
---|---|
1 #include <stdio.h> | |
2 #include "SchedTask.h" | |
3 #include "Twice.h" | |
4 #include "Func.h" | |
5 | |
6 /* ¤³¤ì¤Ïɬ¿Ü */ | |
7 SchedDefineTask(Twice); | |
8 | |
9 int | |
10 Twice::run(void *rbuf, void *wbuf) | |
11 { | |
12 int *i_data; | |
13 int *o_data; | |
14 int length; | |
15 | |
16 i_data = (int*)get_input(rbuf, 0); | |
17 o_data = (int*)get_output(wbuf, 0); | |
18 length = get_param(0); | |
19 | |
20 for (int i = 0; i < length; i++) { | |
21 o_data[i] = i_data[i] * 2; | |
22 } | |
23 | |
24 return 0; | |
25 } |