   int pitch = inimg.pitch;
   int height = inimg.height;
   float *d_DataA = inimg.d_data;
+
   float *d_DataB = outimg.d_data;
   float *d_Temp = temp.d_data;
   if (d_DataA == NULL || d_DataB == NULL || d_Temp == NULL) {


    // Look at the neighbors. If the response is higher, replace
    for (size_t i = threadIdx.x; i < nump; i += FilterExtremaThreads) {
      if (minneighbor[i] != 8*1024) {
        if (memberarray[minneighbor[i]] == -1) {
          if (!shouldAdd[minneighbor[i]]) {
            const cv::KeyPoint &p0 = kpts[minneighbor[i]];

  dim3 threads(BitonicSortThreads, 1, 1);
  bitonicSort << <blocks, threads>>> (pts, newpts);

  unsigned int extremaidx_h[16];
  cudaMemcpyFromSymbol(extremaidx_h,d_ExtremaIdx,16*sizeof(unsigned int));
  for (int i=0; i<1; ++i) {
      std::cout << "level " << i << ": " << extremaidx_h[i] << std::endl;
  }
  
/*  cv::KeyPoint* newpts_h = new cv::KeyPoint[nump];
  cudaMemcpy(newpts_h,newpts,nump*sizeof(cv::KeyPoint),cudaMemcpyDeviceToHost);
