   uint threads = SMALL_SIZE / 2;
    
   tsortSmall<<<blocks, threads,4096>>>(d_data, d_data);
-  //cudaThreadSynchronize();
-  
-  for(int i = 0 ; i <= diff ; i += 1){ /*I made it <= and now it sorts? */
+  // cudaThreadSynchronize();
+  
+  for(int i = 0 ; i <= diff ; i += 1){ /* I made it <= and now it sorts? */
   
     for(int j = i; j >= 0; j -= 1){ 
       cSwap<<<blocks/2,threads*2,0>>>(d_data, d_data,(1<<j)*SMALL_SIZE);

  result = (int*)malloc(LARGE_SIZE*sizeof(int));
  
  for (int i = 0; i < LARGE_SIZE; ++i) { 
    values[i] = rand () % 512; 
  }
  
  /* Allocate GPU arrays */   


#include <assert.h>


#define BLOCKS 2048    
#define LARGE_SIZE BLOCKS*SMALL_SIZE
#define SMALL_SIZE 512
#define THREADS 256
