Mercurial > hg > Members > kono > Cerium
view example/Simple/spe/Twice.cc @ 848:df80613f1e1a
addChild fix
author | tkaito |
---|---|
date | Sun, 06 Jun 2010 03:31:52 +0900 |
parents | e4d2b823903c |
children |
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; } s->printf("SPE %d end\n",s->get_cpuid()); return 0; }