[clfft] 50/64: Fixing a clang compilation problem for MacOSX. This closes #65

Jérôme Kieffer kieffer-guest at moszumanska.debian.org
Wed May 20 07:33:37 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 42a90d2237e54cdda87d255e52def744abfd0872
Author: Kent Knox <kent.knox at amd>
Date:   Thu Mar 26 11:18:25 2015 -0500

    Fixing a clang compilation problem for MacOSX.
    This closes #65
---
 README.md          | 14 +++++++-------
 src/tests/buffer.h |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index ee82687..69c1d92 100644
--- a/README.md
+++ b/README.md
@@ -99,12 +99,12 @@ int main( void )
         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 );
@@ -121,7 +121,7 @@ int main( void )
         /* 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 );
 
@@ -130,15 +130,15 @@ int main( void )
 
         /* 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);
 
@@ -152,7 +152,7 @@ int main( void )
         clReleaseMemObject( bufX );
 
         free(X);
-        
+
         /* Release the plan. */
         err = clfftDestroyPlan( &planHandle );
 
diff --git a/src/tests/buffer.h b/src/tests/buffer.h
index 3c8da5d..7fef025 100644
--- a/src/tests/buffer.h
+++ b/src/tests/buffer.h
@@ -245,7 +245,7 @@ private:
 		preinitialize_strides_to_1_1_1();
 
 		// we need to calculate the strides if tightly packed
-		if( strides_in == tightly_packed) {
+		if( strides_in == nullptr ) {
 			_strides[dimx] = 1;
 			for( size_t i = 1; i < _number_of_dimensions; ++i )
 			{

-- 
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