Mercurial > hg > Game > Cerium
view include/TaskManager/SpeThreads.h @ 130:40978d4b608a draft
テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
author | gongo@gendarme.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 25 Nov 2008 17:19:43 +0900 |
parents | 028ffc9c0375 |
children | e9735a64cd90 |
line wrap: on
line source
#ifndef INCLUDED_SPE_THREADS #define INCLUDED_SPE_THREADS #include <libspe2.h> #include <pthread.h> #define SPE_ELF "spe-main" typedef struct arg { int speid; spe_context_ptr_t ctx; } thread_arg_t; class SpeThreads { public: /* constructor */ SpeThreads(int num = 1); ~SpeThreads(void); /* functions */ void init(void); int get_mail(int speid); void send_mail(int speid, unsigned int *data, int num); static void *spe_thread_run(void *arg); static void *frontend_thread_run(void *arg); private: /* variables */ spe_program_handle_t *spe_handle; spe_context_ptr_t *spe_ctx; pthread_t *threads; thread_arg_t *args; int spe_num; }; #endif