   
   __syncthreads();
 
-  printf("tid %d blockId %d value %f\n",threadIdx.x, blockIdx.x, 
-    sArray[threadIdx.x] );
+//  printf("tid %d blockId %d value %f\n",threadIdx.x, blockIdx.x, 
+ //   sArray[threadIdx.x] );
 /* do the final reduction in SMEM */
-
+  //printf("blockDim is %d\n",blockDim.x);
   for( int i = blockDim.x/2; i > 0; i = i / 2 )
   {
     if( threadIdx.x < i )
     {
       sArray[threadIdx.x] += sArray[threadIdx.x + i];
-      printf("tid %d, sArray %f\n",threadIdx.x, sArray[threadIdx.x] );
+   //   printf("tid %d, i %d, sArray %f\n",threadIdx.x, i,sArray[threadIdx.x] );
     } /* end if */
     __syncthreads();
   } /* end for */
 
   if( threadIdx.x == 0 ) out[blockIdx.x] = sArray[0]; 
-  if( threadIdx.x == 0 ) printf("out is %f\n",out[blockIdx.x]);
+  //if( threadIdx.x == 0 ) printf("out is %f\n",out[blockIdx.x]);
 
   return;
 

#include <stdio.h>
#include "../debug.h"

#define N ( 1 << 3 )
#define THREADS_PER_BLOCK 4

typedef float floatType_t;

__global__ void sumReduction(int n, floatType_t *in, floatType_t *out)
{


/* launch the kernel on the GPU */

  sumReduction<<< blocks, threads1 >>>( size, d_in,  d_tempArray );
  checkKERNEL()
  sumReduction<<<      1, threads2 >>>( blocks.x, d_tempArray, d_out );
  checkKERNEL()

/* stop the timers */
