Mercurial > hg > Game > Cerium
view TaskManager/test/GpuRunTest/ppe/Twice.cc @ 1659:0d25364759e0 draft
add file
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 15 Jul 2013 18:46:35 +0900 |
parents | |
children |
line wrap: on
line source
#include <stdio.h> #include "SchedTask.h" #include "Twice.h" #include "Func.h" /* これは必須 */ SchedDefineTask1(Twice,twice); static int twice(SchedTask *s,void *rbuf, void *wbuf) { int *i_data; int *o_data; long length; long times; i_data = (int*)s->get_input(rbuf, 0); o_data = (int*)s->get_output(wbuf, 0); length = (long)s->get_param(0); times = (long)s->get_param(1); for (int i = 0; i < length; i++) { o_data[i] = i_data[i] * times; } return 0; }