annotate ppe/PadAllocate.cc @ 30:14f2ef87f9f2 default tip

remove unnecessary files
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 10 Dec 2010 11:29:41 +0900
parents aa37f220b7a8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include <stdio.h>
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include <string.h>
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 #include "PadAllocate.h"
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #include "Func.h"
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 /* これは必須 */
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 SchedDefineTask(PadAllocate);
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 static int
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 run(SchedTask *s, void *rbuf, void *wbuf)
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 {
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 void *idata = s->get_input(rbuf, 0);
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 int pad_id = (int)s->get_param(0);
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 int size = (int)s->get_param(1);
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 void *buff = s->global_alloc(pad_id, size);
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 if (idata != NULL) {
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 memcpy(buff,idata,size);
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 }
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 return 0;
aa37f220b7a8 add new files, not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 }