[clfft] 63/64: Merge branch 'master' into develop
Jérôme Kieffer
kieffer-guest at moszumanska.debian.org
Wed May 20 07:33:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
kieffer-guest pushed a commit to branch develop
in repository clfft.
commit 250e45d50484cd8290401407ac512ae62692d27f
Merge: b38f31c abd7828
Author: Jerome Kieffer <jerome.kieffer at esrf.fr>
Date: Fri Apr 24 14:21:54 2015 +0200
Merge branch 'master' into develop
Conflicts:
README.md
src/CMakeLists.txt
README.md | 79 +++++
src/CMakeLists.txt | 8 +-
src/scripts/perf/errorHandler.py | 37 +--
src/scripts/perf/fftPerformanceTesting.py | 63 ++--
src/scripts/perf/measurePerformance.py | 241 +++++++--------
src/scripts/perf/performanceUtility.py | 44 +--
src/scripts/perf/plotPerformance.py | 467 +++++++++++++++---------------
7 files changed, 524 insertions(+), 415 deletions(-)
diff --cc README.md
index d981d2f,24bd518..d8c7e9f
--- a/README.md
+++ b/README.md
@@@ -100,82 -88,82 +100,161 @@@ forward transfor
int main( void )
{
++<<<<<<< HEAD
+ cl_int err;
+ cl_platform_id platform = 0;
+ cl_device_id device = 0;
+ cl_context_properties props[3] = { CL_CONTEXT_PLATFORM, 0, 0 };
+ cl_context ctx = 0;
+ cl_command_queue queue = 0;
+ cl_mem bufX;
+ float *X;
+ cl_event event = NULL;
+ int ret = 0;
+ size_t N = 16;
+
+ /* FFT library realted declarations */
+ clfftPlanHandle planHandle;
+ clfftDim dim = CLFFT_1D;
+ size_t clLengths[1] = {N};
+
+ /* Setup OpenCL environment. */
+ err = clGetPlatformIDs( 1, &platform, NULL );
+ err = clGetDeviceIDs( platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL );
+
+ props[1] = (cl_context_properties)platform;
+ ctx = clCreateContext( props, 1, &device, NULL, NULL, &err );
+ queue = clCreateCommandQueue( ctx, device, 0, &err );
+
+ /* Setup clFFT. */
+ clfftSetupData fftSetup;
+ err = clfftInitSetupData(&fftSetup);
+ err = clfftSetup(&fftSetup);
+
+ /* Allocate host & initialize data. */
+ /* Only allocation shown for simplicity. */
+ X = (float *)malloc(N * 2 * sizeof(*X));
+
+ /* Prepare OpenCL memory objects and place data inside them. */
+ bufX = clCreateBuffer( ctx, CL_MEM_READ_WRITE, N * 2 * sizeof(*X), NULL, &err );
+
+ err = clEnqueueWriteBuffer( queue, bufX, CL_TRUE, 0,
+ N * 2 * sizeof( *X ), X, 0, NULL, NULL );
+
+ /* Create a default plan for a complex FFT. */
+ err = clfftCreateDefaultPlan(&planHandle, ctx, dim, clLengths);
+
+ /* Set plan parameters. */
+ err = clfftSetPlanPrecision(planHandle, CLFFT_SINGLE);
+ err = clfftSetLayout(planHandle, CLFFT_COMPLEX_INTERLEAVED, CLFFT_COMPLEX_INTERLEAVED);
+ err = clfftSetResultLocation(planHandle, CLFFT_INPLACE);
+
+ /* Bake the plan. */
+ err = clfftBakePlan(planHandle, 1, &queue, NULL, NULL);
+
+ /* Execute the plan. */
+ err = clfftEnqueueTransform(planHandle, CLFFT_FORWARD, 1, &queue, 0, NULL, NULL, &bufX, NULL, NULL);
+
+ /* Wait for calculations to be finished. */
+ err = clFinish(queue);
+
+ /* Fetch results of calculations. */
+ err = clEnqueueReadBuffer( queue, bufX, CL_TRUE, 0, N * 2 * sizeof( *X ), X, 0, NULL, NULL );
+
+ /* Release OpenCL memory objects. */
+ clReleaseMemObject( bufX );
+
+ free(X);
+
+ /* Release the plan. */
+ err = clfftDestroyPlan( &planHandle );
+
+ /* Release clFFT library. */
+ clfftTeardown( );
+
+ /* Release OpenCL working objects. */
+ clReleaseCommandQueue( queue );
+ clReleaseContext( ctx );
+
+ return ret;
++=======
+ cl_int err;
+ cl_platform_id platform = 0;
+ cl_device_id device = 0;
+ cl_context_properties props[3] = { CL_CONTEXT_PLATFORM, 0, 0 };
+ cl_context ctx = 0;
+ cl_command_queue queue = 0;
+ cl_mem bufX;
+ float *X;
+ cl_event event = NULL;
+ int ret = 0;
+ size_t N = 16;
+
+ /* FFT library realted declarations */
+ clfftPlanHandle planHandle;
+ clfftDim dim = CLFFT_1D;
+ size_t clLengths[1] = {N};
+
+ /* Setup OpenCL environment. */
+ err = clGetPlatformIDs( 1, &platform, NULL );
+ err = clGetDeviceIDs( platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL );
+
+ props[1] = (cl_context_properties)platform;
+ ctx = clCreateContext( props, 1, &device, NULL, NULL, &err );
+ queue = clCreateCommandQueue( ctx, device, 0, &err );
+
+ /* Setup clFFT. */
+ clfftSetupData fftSetup;
+ err = clfftInitSetupData(&fftSetup);
+ err = clfftSetup(&fftSetup);
+
+ /* Allocate host & initialize data. */
+ /* Only allocation shown for simplicity. */
+ X = (float *)malloc(N * 2 * sizeof(*X));
+
+ /* Prepare OpenCL memory objects and place data inside them. */
+ bufX = clCreateBuffer( ctx, CL_MEM_READ_WRITE, N * 2 * sizeof(*X), NULL, &err );
+
+ err = clEnqueueWriteBuffer( queue, bufX, CL_TRUE, 0,
+ N * 2 * sizeof( *X ), X, 0, NULL, NULL );
+
+ /* Create a default plan for a complex FFT. */
+ err = clfftCreateDefaultPlan(&planHandle, ctx, dim, clLengths);
+
+ /* Set plan parameters. */
+ err = clfftSetPlanPrecision(planHandle, CLFFT_SINGLE);
+ err = clfftSetLayout(planHandle, CLFFT_COMPLEX_INTERLEAVED, CLFFT_COMPLEX_INTERLEAVED);
+ err = clfftSetResultLocation(planHandle, CLFFT_INPLACE);
+
+ /* Bake the plan. */
+ err = clfftBakePlan(planHandle, 1, &queue, NULL, NULL);
+
+ /* Execute the plan. */
+ err = clfftEnqueueTransform(planHandle, CLFFT_FORWARD, 1, &queue, 0, NULL, NULL, &bufX, NULL, NULL);
+
+ /* Wait for calculations to be finished. */
+ err = clFinish(queue);
+
+ /* Fetch results of calculations. */
+ err = clEnqueueReadBuffer( queue, bufX, CL_TRUE, 0, N * 2 * sizeof( *X ), X, 0, NULL, NULL );
+
+ /* Release OpenCL memory objects. */
+ clReleaseMemObject( bufX );
+
+ free(X);
+
+ /* Release the plan. */
+ err = clfftDestroyPlan( &planHandle );
+
+ /* Release clFFT library. */
+ clfftTeardown( );
+
+ /* Release OpenCL working objects. */
+ clReleaseCommandQueue( queue );
+ clReleaseContext( ctx );
+
+ return ret;
++>>>>>>> master
}
```
diff --cc src/CMakeLists.txt
index d74cdcb,ec5fc4b..89e7597
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@@ -40,7 -40,7 +40,11 @@@ if( NOT DEFINED CLFFT_VERSION_MAJOR
endif( )
if( NOT DEFINED CLFFT_VERSION_MINOR )
++<<<<<<< HEAD
+ set( CLFFT_VERSION_MINOR 5 )
++=======
+ set( CLFFT_VERSION_MINOR 4 )
++>>>>>>> master
endif( )
if( NOT DEFINED CLFFT_VERSION_PATCH )
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clfft.git
More information about the debian-science-commits
mailing list