 
 #include <iostream>
 
-#include <thrust/copy.h>
 #include <thrust/remove.h>
 #include <thrust/scan.h>
 #include <thrust/sort.h>

         RawPointer(nextSphereIndexPartition) + leafNodes + nNewLeafs); // next data owners
    CHECK_FOR_CUDA_ERROR();

    /*    
    cudaMemcpy(RawPointer(sphereIndices) + leafSphereIndices,
               RawPointer(nextSphereIndices) + leafSphereIndices,
               sizeof(unsigned int) * nNewLeafIndices, cudaMemcpyDeviceToDevice);

               RawPointer(nextSphereIndexPartition) + leafSphereIndices,
               sizeof(unsigned int) * nNewLeafIndices, cudaMemcpyDeviceToDevice);
    CHECK_FOR_CUDA_ERROR();
    
    sphereIndices.swap(nextSphereIndices);
    sphereIndexPartition.swap(nextSphereIndexPartition);

