Mercurial > hg > Members > kono > Cerium
view example/Bulk/ppe/Twice.cc @ 699:7e937a1cd121
....
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 13 Dec 2009 22:46:15 +0900 |
parents | b386522827ae |
children | 226d95fa2691 |
line wrap: on
line source
#include <stdio.h> #include "SchedTaskArray.h" #include "Twice.h" #include "Func.h" /* これは必須 */ SchedDefineTask(Twice); static int run(SchedTask *s,void *rbuf, void *wbuf) { // SchedTaskArray *a = (SchedTaskArray *)s; int *i_data; int *o_data; long 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; }