Mercurial > hg > Game > Cerium
changeset 1614:93569219173e draft
remove set_NDRange
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 10 May 2013 01:19:13 +0900 |
parents | 0d368b575bb5 |
children | 2c6e9ed9db3b |
files | TaskManager/Cell/CellTaskManagerImpl.cc TaskManager/Cell/CellTaskManagerImpl.h TaskManager/Cell/spe/SpeTaskManagerImpl.h TaskManager/Fifo/FifoTaskManagerImpl.cc TaskManager/Fifo/FifoTaskManagerImpl.h TaskManager/Gpu/GpuScheduler.cc TaskManager/Gpu/GpuScheduler.h TaskManager/Gpu/GpuThreads.cc TaskManager/Gpu/GpuThreads.h TaskManager/kernel/ppe/CpuThreads.cc TaskManager/kernel/ppe/CpuThreads.h TaskManager/kernel/ppe/TaskManager.cc TaskManager/kernel/ppe/TaskManager.h TaskManager/kernel/ppe/TaskManagerImpl.h TaskManager/kernel/ppe/Threads.h |
diffstat | 15 files changed, 8 insertions(+), 57 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Cell/CellTaskManagerImpl.cc Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/Cell/CellTaskManagerImpl.cc Fri May 10 01:19:13 2013 +0900 @@ -373,11 +373,6 @@ return tl; } -void -CellTaskManagerImpl::set_NDRange(void *ndr) { - speThreads->set_NDRange(ndr); -} - #if defined (__CERIUM_CELL__)||defined (__CERIUM_GPU__) TaskManagerImpl *create_impl(int num, int useRefDma) {
--- a/TaskManager/Cell/CellTaskManagerImpl.h Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/Cell/CellTaskManagerImpl.h Fri May 10 01:19:13 2013 +0900 @@ -34,7 +34,6 @@ TaskListPtr createTaskList(); //void set_runTaskList(*QueueInfo<HTask>); void set_runTaskList(QueueInfo<HTask>* activeTaskQueue); - void set_NDRange(void* ndr); void sendTaskList(); void append_activeTask(HTaskPtr); void show_profile() ;
--- a/TaskManager/Cell/spe/SpeTaskManagerImpl.h Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/Cell/spe/SpeTaskManagerImpl.h Fri May 10 01:19:13 2013 +0900 @@ -32,8 +32,7 @@ void polling() {} void free_htask(HTaskPtr htask) {} void print_arch(); - void set_NDRange(void* ndr){} - int max_cpu(){return 0;} + #ifdef __CERIUM_GPU__ SpeTaskManagerImpl(int i);
--- a/TaskManager/Fifo/FifoTaskManagerImpl.cc Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/Fifo/FifoTaskManagerImpl.cc Fri May 10 01:19:13 2013 +0900 @@ -165,11 +165,6 @@ } } -int -FifoTaskManagerImpl::max_cpu() { - return machineNum; -} - /** * @param [list] 実行タスクリスト * @return FifoScheduler からのメール @@ -330,9 +325,6 @@ printf("FifoTaskManagerImpl\n"); } -void -FifoTaskManagerImpl::set_NDRange(void* ndr) {} - TaskListPtr FifoTaskManagerImpl::createTaskList() { TaskListPtr tl = taskListInfo->create();
--- a/TaskManager/Fifo/FifoTaskManagerImpl.h Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/Fifo/FifoTaskManagerImpl.h Fri May 10 01:19:13 2013 +0900 @@ -40,8 +40,6 @@ void sendTaskList(); void print_arch(); - void set_NDRange(void* ndr); - int max_cpu(); // call by user private: void set_runTaskList1(QueueInfo<HTask>* activeTaskQueue);
--- a/TaskManager/Gpu/GpuScheduler.cc Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/Gpu/GpuScheduler.cc Fri May 10 01:19:13 2013 +0900 @@ -337,11 +337,6 @@ } -void -GpuScheduler::set_NDRange(void* ndr_) { - ndr=(ND_RANGE_T_PTR)ndr_; -} - // regist kernel file name void gpu_register_task(int cmd, const char* filename, const char* functionname)
--- a/TaskManager/Gpu/GpuScheduler.h Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/Gpu/GpuScheduler.h Fri May 10 01:19:13 2013 +0900 @@ -20,7 +20,6 @@ void init_impl(int useRefDma); void init_gpu(); void run(); - void set_NDRange(void* ndr_); void mail_write_from_host(memaddr data) { fifoDmaManager->mail_write_from_host(data);
--- a/TaskManager/Gpu/GpuThreads.cc Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/Gpu/GpuThreads.cc Fri May 10 01:19:13 2013 +0900 @@ -28,11 +28,6 @@ } void -GpuThreads::set_NDRange(void* ndr) { - args->scheduler->set_NDRange(ndr); -} - -void GpuThreads::init() { args->scheduler = new GpuScheduler();
--- a/TaskManager/Gpu/GpuThreads.h Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/Gpu/GpuThreads.h Fri May 10 01:19:13 2013 +0900 @@ -41,7 +41,6 @@ void send_mail(int speid, int num, memaddr *data); void add_output_tasklist(int command, memaddr buff, int alloc_size); void set_wait(SemPtr); - void set_NDRange(void* ndr); private: gpu_thread_arg_t *args;
--- a/TaskManager/kernel/ppe/CpuThreads.cc Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/kernel/ppe/CpuThreads.cc Fri May 10 01:19:13 2013 +0900 @@ -100,20 +100,19 @@ } void -CpuThreads::set_NDRange(void *ndr) { - gpu->set_NDRange(ndr); -} - -void CpuThreads::spawn_task(int id, TaskListPtr p) { if (p->dim>0) { int dim_count = (p->x)*(p->y)*(p->z); - if (cpu_num < dim_count) + if (cpu_num < dim_count) { dim_count = cpu_num; + } + p->self->flag.dim_count = dim_count; + for (int i = 0; i < dim_count; i++) { - send_mail(i+id_offset,1,(memaddr*)&p); // i+min_cpu() + send_mail(i+id_offset,1,(memaddr*)&p); } + } else { send_mail(id, 1, (memaddr*)&p); }
--- a/TaskManager/kernel/ppe/CpuThreads.h Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/kernel/ppe/CpuThreads.h Fri May 10 01:19:13 2013 +0900 @@ -36,7 +36,6 @@ virtual void send_mail(int speid, int num, memaddr *data); // BLOCKING virtual void add_output_tasklist(int command, memaddr buff, int alloc_size); virtual int is_gpu(int cpuid); - virtual void set_NDRange(void *ndr); virtual void spawn_task(int cpu_num,TaskListPtr p); private:
--- a/TaskManager/kernel/ppe/TaskManager.cc Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/kernel/ppe/TaskManager.cc Fri May 10 01:19:13 2013 +0900 @@ -111,11 +111,6 @@ } void -TaskManager::set_NDRange(ND_RANGE_T_PTR ndr) { - m_impl->set_NDRange((void*)ndr); -} - -void TaskManager::error(const char* error_message) { printf("%s \n",error_message); exit(1);
--- a/TaskManager/kernel/ppe/TaskManager.h Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/kernel/ppe/TaskManager.h Fri May 10 01:19:13 2013 +0900 @@ -8,17 +8,6 @@ class Scheduler; class MemList; -typedef struct nd_range { - nd_range() { - dimension = 1; - gws[0]=1; gws[1]=1; gws[2]=1; - lws[0]=1; lws[1]=1; lws[2]=1; - } - cl_uint dimension; - size_t gws[3]; - size_t lws[3]; -} ND_RANGE_T, *ND_RANGE_T_PTR; - class TaskManager { public: /* constructor */ @@ -40,7 +29,6 @@ int get_cpuNum(); int get_random(); Scheduler *get_scheduler(); - void set_NDRange(ND_RANGE_T_PTR ndr) ; MemList* createMemList(int size, int count); void start_profile() { m_impl->start_profile(); }
--- a/TaskManager/kernel/ppe/TaskManagerImpl.h Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/kernel/ppe/TaskManagerImpl.h Fri May 10 01:19:13 2013 +0900 @@ -48,7 +48,7 @@ virtual void append_waitTask(HTaskPtr); virtual void polling() = 0; virtual void print_arch() = 0; - virtual void set_NDRange(void*) = 0; + void check_task_finish(HTaskPtr task, QueueInfo<HTask> *wait_queue); void check_task_list_finish(SchedTask *s, TaskListPtr list, QueueInfo<HTask> *wait_queue);
--- a/TaskManager/kernel/ppe/Threads.h Fri May 10 00:41:58 2013 +0900 +++ b/TaskManager/kernel/ppe/Threads.h Fri May 10 01:19:13 2013 +0900 @@ -22,7 +22,6 @@ virtual void send_mail(int speid, int num, memaddr *data) = 0; // BLOCKING virtual void add_output_tasklist(int command, memaddr buff, int alloc_size) = 0; virtual int is_gpu(int cpuid) { return 0; } - virtual void set_NDRange(void* ndr)=0; virtual void spawn_task(int cpu_num, TaskListPtr p) = 0; /* variables */ pthread_t *threads;