Mercurial > hg > Members > kono > Cerium
view example/basic/spe/Twice.cc @ 412:68e199a4ea7b
chain_old.cc add (Application/)
author | tkaito@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Wed, 23 Sep 2009 17:10:10 +0900 |
parents | 58fd16298954 |
children | 44c0bce54dcf |
line wrap: on
line source
#include <stdio.h> #include "SchedTask.h" #include "Twice.h" #include "Func.h" /* これは必須 */ SchedDefineTask(Twice); int Twice::run(void *rbuf, void *wbuf) { int *i_data; int *o_data; int length; i_data = (int*)get_input(rbuf, 0); o_data = (int*)get_output(wbuf, 0); length = get_param(0); for (int i = 0; i < length; i++) { o_data[i] = i_data[i] * 2; } return 0; }