Mercurial > hg > Game > Cerium
view example/basic/ppe/Twice.cc @ 467:839e34d0cc3c draft
fix all examples. test_render is not working now.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 01 Oct 2009 19:25:25 +0900 |
parents | 768452fab95e |
children | 94d82f2c842f |
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 = s->get_param(0); for (int i = 0; i < length; i++) { o_data[i] = i_data[i] * 2; } return 0; }