Mercurial > hg > Members > kono > Cerium
annotate include/TaskManager/TaskManager.h @ 229:401b55a4a4dd
add Random class
author | gongo@gendarme.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Thu, 12 Feb 2009 19:05:02 +0900 |
parents | 29e338dbc280 |
children | f8006660a45c 81b25e5d5379 |
rev | line source |
---|---|
3 | 1 #ifndef INCLUDED_TASK_MANAGER |
2 #define INCLUDED_TASK_MANAGER | |
3 | |
4 #ifndef INCLUDED_TASK_MANAGER_IMPL | |
5 # include "TaskManagerImpl.h" | |
6 #endif | |
7 | |
229 | 8 #ifndef INCLUDED_RANDOM |
9 # include "Random.h" | |
10 #endif | |
11 | |
3 | 12 class TaskManager { |
13 public: | |
14 /* constructor */ | |
15 TaskManager(int num = 1); // The number of threads | |
194 | 16 ~TaskManager(void); |
3 | 17 |
18 /* variables */ | |
216
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
19 TaskManagerImpl *m_impl; |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
20 void (*tm_end)(void); |
229 | 21 RandomPtr gen_random; |
216
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
22 |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
23 /* user function */ |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
24 HTaskPtr create_task(int cmd); |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
25 void run(void); |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
26 void *allocate(int size); |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
27 void set_TMend(void (*endf)(void)); |
220 | 28 int get_cpuNum(void); |
229 | 29 int get_random(void); |
3 | 30 |
31 /* functions */ | |
32 void init(void); | |
20 | 33 void finish(void); |
14 | 34 |
3 | 35 private: |
36 int machineNum; | |
37 }; | |
38 | |
39 #endif | |
109 | 40 |
41 extern TaskManager *manager; |