annotate TaskManager/Cell/spe/SpeTaskManagerImpl.cc @ 636:d433fc37587d

Cell Simple Task compiled. but not worked.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 18 Nov 2009 19:09:40 +0900
parents 5b178db5988a
children 5530fa36d42e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
621
5b178db5988a Cell fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
1 #include "SpeTaskManagerImpl.h"
619
0decff4e867b RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include "Scheduler.h"
636
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
3 #include <stdlib.h>
619
0decff4e867b RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
0decff4e867b RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
0decff4e867b RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
621
5b178db5988a Cell fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
7 HTaskPtr TaskManagerImpl::create_task(int cmd) {return 0;}
636
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
8 HTaskPtr TaskManagerImpl::create_task(int cmd, memaddr rbuf, long rs, memaddr wbuf, long ws) { return 0; }
621
5b178db5988a Cell fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
9 void TaskManagerImpl::set_task_depend(HTaskPtr master, HTaskPtr slave) {}
5b178db5988a Cell fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
10 void TaskManagerImpl::spawn_task(HTaskPtr) {}
5b178db5988a Cell fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
11 void TaskManagerImpl::set_task_cpu(HTaskPtr, CPU_TYPE) {}
619
0decff4e867b RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
636
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
13 void*
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
14 TaskManagerImpl::allocate(int size, int alignment)
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
15 {
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
16 if (size==0) return 0;
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
17 #if defined(__SPU__)
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
18 return malloc(size);
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
19 #else
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
20 void *buff;
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
21 posix_memalign(&buff, alignment, size);
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
22 return buff;
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
23 #endif
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
24 }
619
0decff4e867b RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
636
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
26 void*
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
27 TaskManagerImpl::allocate(int size)
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
28 {
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
29 if (size==0) return 0;
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
30 #if defined(__SPU__)
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
31 return malloc(size);
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
32 #else
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
33 void *buff;
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
34 posix_memalign(&buff, DEFAULT_ALIGNMENT, size);
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
35 return buff;
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
36 #endif
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
37 }
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
38
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
39