             odepthMap_dmp.getPitch(),
             width, height,
             gammaC);
-        cudaThreadSynchronize();
         cudaUnbindTexture(depthsTex);
     };
 }

            vol_dmp.getBytesPaddedUpToDim(1),
            vol_dmp.getBytesPaddedUpToDim(0),
            volDimX, volDimY, volDimZ, z);
        cudaThreadSynchronize();
        CHECK_CUDA_ERROR();
        copy((xyslice_arr), xyslice_dmp);
        cudaBindTextureToArray(sliceTexUChar, xyslice_arr.getArray(), cudaCreateChannelDesc<unsigned char>());
        volume_computeBestXSlice_kernel<<<gridvolrow, blockvolrow>>>(xsliceBestInColSim_dmp.getBuffer(),
                                                                     // xsliceBestInColRow_dmp.getBuffer(),
                                                                     volDimX, volDimY);
        cudaThreadSynchronize();
        CHECK_CUDA_ERROR();
        cudaUnbindTexture(sliceTexUChar);
    };

        ssm_dmp.getBuffer(),       ssm_dmp.getPitch(),
        dsm_dmp.getBuffer(),       dsm_dmp.getPitch(),
        width, height, simThr);
}

void ps_computeSimMapForDepthMapInternal(CudaDeviceMemoryPitched<float, 2>& osimMap_dmp,
