Mercurial > hg > Members > yuuhi > OpenCL
changeset 6:db074091ed0b
minor change
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 05 Feb 2013 15:12:19 +0900 |
parents | 3602b23914ad |
children | ea2e7ce9d5bb |
files | fft_fixstart/main.cc |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/fft_fixstart/main.cc Tue Feb 05 13:32:08 2013 +0900 +++ b/fft_fixstart/main.cc Tue Feb 05 15:12:19 2013 +0900 @@ -137,14 +137,12 @@ filename = argv[i+1]; } else if (strcmp(argv[i], "-cpu") == 0) { device_type = CL_DEVICE_TYPE_CPU; - printf("cpu!\n"); } else if (strcmp(argv[i], "-gpu") == 0) { device_type = CL_DEVICE_TYPE_GPU; - printf("gpu!\n"); } } if ( (argc == 1)||(filename==0)) { - printf("Usage: ./fft [image filename]\n"); + printf("Usage: ./fft -file [image filename] -cpu or -gpu \n"); exit(-1); } @@ -224,7 +222,6 @@ } } - st_time = getTime(); /* Get platform/device */ ret = clGetPlatformIDs(1, &platform_id, &ret_num_platforms); @@ -241,6 +238,9 @@ rmobj = clCreateBuffer(context, CL_MEM_READ_WRITE, n*n*sizeof(cl_float2), NULL, &ret); wmobj = clCreateBuffer(context, CL_MEM_READ_WRITE, (n/2)*sizeof(cl_float2), NULL, &ret); + + st_time = getTime(); + /* Transfer data to memory buffer */ ret = clEnqueueWriteBuffer(queue, xmobj, CL_TRUE, 0, n*n*sizeof(cl_float2), xm, 0, NULL, NULL);