Mercurial > hg > Game > Cerium
diff TaskManager/test/SetCpuTest/gpu/Twice.cc @ 1632:b0e84541e2d6 draft
add
author | shohei kokubo |
---|---|
date | Tue, 11 Jun 2013 16:15:32 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TaskManager/test/SetCpuTest/gpu/Twice.cc Tue Jun 11 16:15:32 2013 +0900 @@ -0,0 +1,25 @@ +#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*)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; +}