 
 #include "cudaShrinkWrap.hpp"
 
-#ifndef NDEBUG
-#   define DEBUG_CUDASHRINKWRAP 0  // change this if you want to turn on debugging
-#else
-#   define DEBUG_CUDASHRINKWRAP 2  // leave this as it is
+#ifndef NDEBUG // change the following, if you want to turn on debugging
+#   define DEBUG_CUDASHRINKWRAP 1
+#   define WRITE_OUT_SHRINKWRAP_DEBUG 1
+#else   // leave this as it is
+#   define DEBUG_CUDASHRINKWRAP 0
+#   define WRITE_OUT_SHRINKWRAP_DEBUG 0
 #endif
 
 #include <iostream>

#include "algorithms/cuda/cudaGaussian.hpp"
#include "algorithms/cuda/cudaVectorReduce.hpp"
#if DEBUG_CUDASHRINKWRAP == 1
#    include <fftw3.h>    // kinda problematic to mix this with cufft, but should work if it isn't cufftw.h
#    include "algorithms/vectorReduce.hpp"
#    include "algorithms/vectorElementwise.hpp"
#endif
#if DEBUG_CUDASHRINKWRAP == 2
#   include "io/writeOutFuncs/writeOutFuncs.hpp"
#endif
#include "libs/cudacommon.hpp"

                    cudaMemcpyDeviceToDevice, rStream );

        /* repeatedly call HIO algorithm and change mask */
        for ( auto iCycleShrinkWrap = 0u; iCycleShrinkWrap < rnCycles; ++iCycleShrinkWrap )
        {
            /************************** Update Mask ***************************/

