annotate TaskManager/test/SetCpuTest/gpu/Twice.cc @ 1643:6c0b6947c231 draft

fix fft
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Sat, 22 Jun 2013 18:10:55 +0900
parents b0e84541e2d6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1632
shohei kokubo
parents:
diff changeset
1 #include <stdio.h>
shohei kokubo
parents:
diff changeset
2 #include "SchedTask.h"
shohei kokubo
parents:
diff changeset
3 #include "Twice.h"
shohei kokubo
parents:
diff changeset
4 #include "Func.h"
shohei kokubo
parents:
diff changeset
5
shohei kokubo
parents:
diff changeset
6 /* これは必須 */
shohei kokubo
parents:
diff changeset
7 SchedDefineTask(Twice);
shohei kokubo
parents:
diff changeset
8
shohei kokubo
parents:
diff changeset
9 static int
shohei kokubo
parents:
diff changeset
10 run(SchedTask *s,void *rbuf, void *wbuf)
shohei kokubo
parents:
diff changeset
11 {
shohei kokubo
parents:
diff changeset
12 int *i_data;
shohei kokubo
parents:
diff changeset
13 int *o_data;
shohei kokubo
parents:
diff changeset
14 long length;
shohei kokubo
parents:
diff changeset
15
shohei kokubo
parents:
diff changeset
16 i_data = (int*)s->get_input(rbuf, 0);
shohei kokubo
parents:
diff changeset
17 o_data = (int*)s->get_output(wbuf, 0);
shohei kokubo
parents:
diff changeset
18 length = (long)s->get_param(0);
shohei kokubo
parents:
diff changeset
19
shohei kokubo
parents:
diff changeset
20 for (int i = 0; i < length; i++) {
shohei kokubo
parents:
diff changeset
21 o_data[i] = i_data[i] * 2;
shohei kokubo
parents:
diff changeset
22 }
shohei kokubo
parents:
diff changeset
23
shohei kokubo
parents:
diff changeset
24 return 0;
shohei kokubo
parents:
diff changeset
25 }