Mercurial > hg > Game > Cerium
diff TaskManager/test/GpuThreadTest/GpuThreadsTest.cc @ 1440:d66dcb067c89 draft
create test program
author | YuuhiTOMARI |
---|---|
date | Mon, 23 Apr 2012 05:48:02 +0900 |
parents | |
children | 50d2c1e85535 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TaskManager/test/GpuThreadTest/GpuThreadsTest.cc Mon Apr 23 05:48:02 2012 +0900 @@ -0,0 +1,28 @@ +#include <stdio.h> +#include "GpuThreads.h" +//#include "GpuScheduler.h" +#include "CellTaskManagerImpl.h" + +#define MAX_SOURCE_SIZE (0x100000) + +void +main(int argc, char* argv[]) +{ + GpuThreads* c = GpuThreads::getInstance(); + c->init(); + + FILE *fp; + char *kernel_src_str; + size_t kernel_code_size; + fp = fopen("twice.cl", "r"); + kernel_src_str = (char *)malloc(MAX_SOURCE_SIZE); + kernel_code_size = fread(kernel_src_str, 1, MAX_SOURCE_SIZE, fp); + fclose(fp); + + gpu_register_task(1, kernel_src_str,"Twice"); + + delete c; + +} + +/* end */