Mercurial > hg > Members > kono > Cerium
view example/basic/spe/Twice.cc @ 799:bf4ee251767e
add forgotten virutal
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 19 May 2010 19:49:49 +0900 |
parents | ab866bc8a624 |
children |
line wrap: on
line source
#include <stdio.h> #include "SchedTask.h" #include "Twice.h" #include "Func.h" /* これは必須 */ SchedDefineTask(Twice); static int run(SchedTask *s, void *rbuf, void *wbuf) { int *i_data; int *o_data; int length; i_data = (int*)s->get_input(rbuf, 0); o_data = (int*)s->get_output(wbuf, 0); length = (long)s->get_param(0); for (int i = 0; i < length; i++) { o_data[i] = i_data[i] * 2; } return 0; }