comparison 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
comparison
equal deleted inserted replaced
1439:20e935f170c1 1440:d66dcb067c89
1 #include <stdio.h>
2 #include "GpuThreads.h"
3 //#include "GpuScheduler.h"
4 #include "CellTaskManagerImpl.h"
5
6 #define MAX_SOURCE_SIZE (0x100000)
7
8 void
9 main(int argc, char* argv[])
10 {
11 GpuThreads* c = GpuThreads::getInstance();
12 c->init();
13
14 FILE *fp;
15 char *kernel_src_str;
16 size_t kernel_code_size;
17 fp = fopen("twice.cl", "r");
18 kernel_src_str = (char *)malloc(MAX_SOURCE_SIZE);
19 kernel_code_size = fread(kernel_src_str, 1, MAX_SOURCE_SIZE, fp);
20 fclose(fp);
21
22 gpu_register_task(1, kernel_src_str,"Twice");
23
24 delete c;
25
26 }
27
28 /* end */