Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Cell/SpeThreads.h @ 1048:40cde8c1a6cd default tip
add ScaleXY (not for allExecute...)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 08 Dec 2010 06:22:15 +0900 |
parents | 4e8fc627ed33 |
children |
rev | line source |
---|---|
65 | 1 #ifndef INCLUDED_SPE_THREADS |
2 #define INCLUDED_SPE_THREADS | |
3 | |
4 #include <libspe2.h> | |
5 #include <pthread.h> | |
817 | 6 #include "Threads.h" |
65 | 7 |
8 #define SPE_ELF "spe-main" | |
9 | |
10 typedef struct arg { | |
11 int speid; | |
12 spe_context_ptr_t ctx; | |
13 } thread_arg_t; | |
14 | |
736 | 15 |
817 | 16 class SpeThreads : Threads { |
65 | 17 public: |
18 /* constructor */ | |
19 SpeThreads(int num = 1); | |
76 | 20 ~SpeThreads(void); |
65 | 21 |
22 /* functions */ | |
23 void init(void); | |
629
8843edf37c0e
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
621
diff
changeset
|
24 int get_mail(int speid, int count, memaddr *ret); // BLOCKING |
647
7c9ded1ea750
MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
629
diff
changeset
|
25 int has_mail(int speid, int count, memaddr *ret); // NONBLOCK |
629
8843edf37c0e
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
621
diff
changeset
|
26 void send_mail(int speid, int num, memaddr *data); // BLOCKING |
65 | 27 static void *spe_thread_run(void *arg); |
28 static void *frontend_thread_run(void *arg); | |
629
8843edf37c0e
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
621
diff
changeset
|
29 void add_output_tasklist(int command, memaddr buff, int alloc_size); |
65 | 30 |
31 private: | |
32 /* variables */ | |
33 spe_program_handle_t *spe_handle; | |
34 spe_context_ptr_t *spe_ctx; | |
35 pthread_t *threads; | |
36 thread_arg_t *args; | |
801 | 37 int cpu_num; |
65 | 38 }; |
39 | |
40 #endif |