Mercurial > hg > Game > Cerium
changeset 1457:55f92ed3f244 draft
create GpuRunTest
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 09 Jun 2012 21:13:44 +0900 |
parents | 5533106cc437 |
children | a0feb4877a1f |
files | TaskManager/Gpu/GpuScheduler.cc TaskManager/test/GpuRegistTaskTest/Makefile example/HelloWorld/main.cc |
diffstat | 3 files changed, 31 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Gpu/GpuScheduler.cc Tue May 08 18:43:50 2012 +0900 +++ b/TaskManager/Gpu/GpuScheduler.cc Sat Jun 09 21:13:44 2012 +0900 @@ -1,9 +1,12 @@ #include "GpuScheduler.h" #include "ReferencedDmaManager.h" +#include "SchedTask.h" +#include "GpuFunc.h" #include "GpuThreads.h" #include "stdio.h" #include <fcntl.h> #include <sys/stat.h> +SchedDefineTask1(SchedRun,schedrun); void GpuScheduler::init_impl(int useRefDma) @@ -12,6 +15,11 @@ connector = fifoDmaManager; } +static int +schedrun(SchedTask *smanager, void *rbuf, void *wbuf){ + return 0 ; +} + void GpuScheduler::run() { @@ -99,6 +107,5 @@ task_list[cmd].wait = NULL; task_list[cmd].name = functionname; task_list[cmd].kernel = kernel; - GpuScheduler::run(); }
--- a/TaskManager/test/GpuRegistTaskTest/Makefile Tue May 08 18:43:50 2012 +0900 +++ b/TaskManager/test/GpuRegistTaskTest/Makefile Sat Jun 09 21:13:44 2012 +0900 @@ -2,7 +2,7 @@ CPPFLAGS += -g -Wall -I../../../include/TaskManager -m$(ABIBIT) -TARGET=GpuRegistTaskTest +TARGET=GpuRegistTask-Test
--- a/example/HelloWorld/main.cc Tue May 08 18:43:50 2012 +0900 +++ b/example/HelloWorld/main.cc Sat Jun 09 21:13:44 2012 +0900 @@ -37,18 +37,18 @@ static void simple_task_creater(int in_total_size, int out_total_size, - int command, int in_data_size, int out_data_size, - void *in_data, void *out_data, TaskManager *manager, - HTask *wait_i, HTask *wait_me) { - - - int in_task_size = 0; - int out_task_size = 0; - + int command, int in_data_size, int out_data_size, + void *in_data, void *out_data, TaskManager *manager, + HTask *wait_i, HTask *wait_me) { + + + int in_task_size = 0; + int out_task_size = 0; + if (in_total_size != 0) { - in_task_size = in_total_size / in_data_size; - if (in_total_size != in_task_size * in_data_size) { - printf("mismatch of in_total_size and in_data_size\n"); + in_task_size = in_total_size / in_data_size; + if (in_total_size != in_task_size * in_data_size) { + printf("mismatch of in_total_size and in_data_size\n"); } } @@ -140,17 +140,17 @@ { for (int i = 0; i < count; i++) { - /** - * Create Task - * create_task(Task ID); - */ - - - if (use_task_creater) { - - simple_task_creater(0,0,Hello,0,0,0,0,manager,0,0); - - } else { + /** + * Create Task + * create_task(Task ID); + */ + + + if (use_task_creater) { + + simple_task_creater(0,0,Hello,0,0,0,0,manager,0,0); + + } else { HTask *hello = manager->create_task(Hello);