Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/test/MIP/mip_opencl.c
ViewVC logotype

Diff of /trunk/test/MIP/mip_opencl.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 190, Sat Jul 31 04:39:18 2010 UTC revision 191, Mon Aug 2 14:05:11 2010 UTC
# Line 294  Line 294 
294    
295          int imageDataSize =  (int)nrrdElementNumber(nin);          int imageDataSize =  (int)nrrdElementNumber(nin);
296    
297            float * data = (float *)nin->data;
298            printf("Data Image: %f\n", (float)data[4* nin->axis[1].size * nin->axis[2].size + 5 * nin->axis[2].size + 2]);
299    
300          cl_mem imageData_mem, out_mem, h1_mem, h2_mem;          cl_mem imageData_mem, out_mem, h1_mem, h2_mem;
301    
302    
# Line 366  Line 369 
369                                                                  (void *)h2 ,0,NULL,NULL);                                                                  (void *)h2 ,0,NULL,NULL);
370    
371    
372          imageData_mem = clCreateBuffer(context,CL_MEM_READ_ONLY,imageDataSize,NULL,NULL);          imageData_mem = clCreateBuffer(context,CL_MEM_READ_ONLY,sizeof(float) * imageDataSize,NULL,NULL);
373          err |= clEnqueueWriteBuffer(queue,imageData_mem,CL_TRUE,0,imageDataSize,          err |= clEnqueueWriteBuffer(queue,imageData_mem,CL_TRUE,0,sizeof(float) * imageDataSize,
374                                                                  nin->data ,0,NULL,NULL);                                                                  nin->data ,0,NULL,NULL);
375    
376          //Load the transformMatrix          //Load the transformMatrix
# Line 422  Line 425 
425    
426          err = clEnqueueReadBuffer(queue,out_mem,CL_TRUE,0, sizeof(float) * (SIZE *SIZE),out,0,NULL,NULL);          err = clEnqueueReadBuffer(queue,out_mem,CL_TRUE,0, sizeof(float) * (SIZE *SIZE),out,0,NULL,NULL);
427    
428            printMatrix(out,20);
429    
430          clReleaseKernel(kernel);          clReleaseKernel(kernel);
431          clReleaseProgram(program);          clReleaseProgram(program);
432          clReleaseCommandQueue(queue);          clReleaseCommandQueue(queue);

Legend:
Removed from v.190  
changed lines
  Added in v.191

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0