Mercurial > hg > Members > kono > Cerium
view example/Simple/ppe/Twice.cc @ 639:70c5c2d2eb24
fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 19 Nov 2009 18:45:24 +0900 |
parents | 8cc609285bbe |
children | a909c50081c2 |
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; long length; i_data = (int*)rbuf; o_data = (int*)wbuf; length = s->read_size()/sizeof(int); for (int i = 0; i < length; i++) { o_data[i] = i_data[i] * 2; } return 0; }