         if ( rSigmaChange              <= 0 ) rSigmaChange              = 0.01;
 
         float sigma = rSigma0;
-        unsigned const nElements = rImageWidth * rImageHeight;
+        auto const nElements = rImageWidth * rImageHeight;
 
         /* allocate needed memory so that HIO doesn't need to allocate and
          * deallocate on each call */

                cudaKernelApplyComplexModulus<<<nBlocks,nThreads,0,rStream>>>
                    ( dpCurData, dpCurData, dpIntensity, nElements );
                CUDA_ERROR( cudaPeekAtLastError() );

                CUFFT_ERROR( cufftExecC2C( ftPlan, dpCurData, dpCurData, CUFFT_INVERSE ) );
            } // HIO loop

            /* check if we are done */
            const float currentError = cudaCalculateHioError( dpCurData /*g'*/, dpIsMasked, nElements, false /* don't invert mask */, rStream );
#           ifdef IMRESH_DEBUG
                std::cout << "[Error " << currentError << "/" << rTargetError << "] "
                          << "[Cycle " << iCycleShrinkWrap << "/" << rnCycles-1 << "]"
                          << std::endl;
#           endif
            if ( rTargetError > 0 && currentError < rTargetError )
                break;
            if ( iCycleShrinkWrap >= rnCycles )
                break;
        } // shrink wrap loop
        cudaKernelCopyFromRealPart<<<nBlocks,nThreads,0,rStream>>>( dpIntensity, dpCurData, nElements );
        CUDA_ERROR( cudaPeekAtLastError() );

#include "algorithms/cuda/cudaGaussian.hpp"
#include "algorithms/cuda/cudaVectorReduce.hpp"
#if DEBUG_CUDASHRINKWRAP == 1
#   include "algorithms/vectorReduce.hpp"
#   include "algorithms/vectorElementwise.hpp"
#endif
#if WRITE_OUT_SHRINKWRAP_DEBUG == 1
#   include <sstream>
#   include "io/writeOutFuncs/writeOutFuncs.hpp"
#endif
#include "libs/cudacommon.hpp"
