Mercurial > hg > Game > Cerium
view example/dependency_task/spe/Exec.cc @ 639:91d03774c407 draft
fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 19 Nov 2009 18:45:24 +0900 |
parents | 0e91ddaad798 |
children | 29355ae40e6c |
line wrap: on
line source
#include <stdio.h> #include "Exec.h" #include "Func.h" /* これは必須 */ SchedDefineTask(Exec); static int run(SchedTask *s, void *rbuf, void *wbuf) { int *idata = (int*)s->get_input(rbuf, 0); int *odata = (int*)s->get_output(wbuf, 0); int length = (long)s->get_param(0); int calnum = (long)s->get_param(1); for (int i = 0; i < length; i++) { odata[i] = idata[i] + calnum; } return 0; }