SCM Repository
[diderot] / trunk / test / MIP / mip_opencl.c |
Diff of /trunk/test/MIP/mip_opencl.c
Parent Directory
|
Revision Log
|
Patch
revision 303, Tue Aug 17 03:54:15 2010 UTC | revision 310, Tue Aug 17 18:52:00 2010 UTC | |
---|---|---|
# | Line 17 | Line 17 |
17 | #include <sys/stat.h> | #include <sys/stat.h> |
18 | #include <teem/nrrd.h> | #include <teem/nrrd.h> |
19 | ||
20 | #define SIZE 200 | #define SIZE 640 |
21 | ||
22 | //Loads the Kernel from a file | //Loads the Kernel from a file |
23 | char * loadKernel (const char * filename) | char * loadKernel (const char * filename) |
# | Line 311 | Line 311 |
311 | ||
312 | size_t global_work_size[2], local_work_size[2]; | size_t global_work_size[2], local_work_size[2]; |
313 | ||
314 | global_work_size[0] = 256; | global_work_size[0] = SIZE; |
315 | global_work_size[1] = 256; | global_work_size[1] = SIZE; |
316 | ||
317 | local_work_size[0] = 1; | local_work_size[0] = 1; |
318 | local_work_size[1] = 1; | local_work_size[1] = 1; |
# | Line 350 | Line 350 |
350 | ||
351 | return CL_SUCCESS; | return CL_SUCCESS; |
352 | } | } |
353 | ||
354 | int main (int argc, char ** argv) | int main (int argc, char ** argv) |
355 | { | { |
356 | char * dataFile = "txs.nrrd"; | char * dataFile = "../../data/txs.nrrd"; |
357 | float transformMatrix[16]; | float transformMatrix[16]; |
358 | float inverseMatrix[16]; | float inverseMatrix[16]; |
359 | ||
360 | if (argc == 2) { | |
361 | dataFile = argv[1]; | |
362 | } | |
363 | ||
364 | float * out; | float * out; |
365 | out = (float *) malloc(sizeof(float) * (SIZE * SIZE)); | out = (float *) malloc(sizeof(float) * (SIZE * SIZE)); |
366 | Nrrd * nin = loadNrrdFile(dataFile); | Nrrd * nin = loadNrrdFile(dataFile); |
|
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |