Mercurial > hg > Game > Cerium
view example/Bulk/ppe/Twice.cc @ 906:becd6fad3ae0 draft
coord_pack is stuffed with infomation of create polygon at spe.
author | Yutaka_Kinjyo |
---|---|
date | Mon, 19 Jul 2010 23:40:53 +0900 |
parents | a215927a9885 |
children | 8ecdbe8fde1f |
line wrap: on
line source
#include <stdio.h> #include "SchedTaskArray.h" #include "Twice.h" #include "Func.h" /* これは必須 */ SchedDefineTask1(Twice,twice_run); static int twice_run(SchedTask *s,void *rbuf, void *wbuf) { // SchedTaskArray *a = (SchedTaskArray *)s; int *i_data; int *o_data; long length; long count = (long)s->get_param(0); for(int j = 0; j<count; j++) { i_data = (int*)s->get_input(rbuf, j); o_data = (int*)s->get_output(wbuf, j); length = (long)s->get_param(j+1); for (int i = 0; i < length; i++) { o_data[i] = i_data[i] * 2; } } return 0; }