@@ -569,8 +569,8 @@ template<typename TF> void FINUFFT_PLAN_T<TF>::precompute_horner_coeffs() {
569569 // coeffs[0] is highest degree.
570570 int used = 0 ;
571571 for (size_t k = 0 ; k < coeffs.size (); ++k) {
572- if (std::abs (coeffs[k]) >= tol * 0.50 ) { // divide tol by 5 otherwise it fails in
573- // some cases
572+ if (std::abs (coeffs[k]) >= tol * 0.5 ) { // divide tol by 2 otherwise it fails in
573+ // some cases
574574 used = static_cast <int >(coeffs.size () - k);
575575 break ;
576576 }
@@ -633,7 +633,7 @@ template<typename TF> int FINUFFT_PLAN_T<TF>::initSpreadAndFFT() {
633633 printf (" spread_thread=%d\n " , opts.spread_thread );
634634 }
635635
636- } else { // ..... usual NUFFT: eval Fourier series, alloc workspace .....
636+ } else { // ..... usual NUFFT: eval Fourier series, alloc workspace .....
637637
638638 if (opts.showwarn ) { // user warn round-off error (due to prob condition #)...
639639 for (int idim = 0 ; idim < dim; ++idim)
@@ -647,8 +647,8 @@ template<typename TF> int FINUFFT_PLAN_T<TF>::initSpreadAndFFT() {
647647 // determine fine grid sizes, sanity check, then alloc...
648648 for (int idim = 0 ; idim < dim; ++idim) {
649649 int nfier = set_nf_type12 (mstu[idim], opts, spopts, &nfdim[idim]);
650- if (nfier) return nfier; // nf too big; we're done
651- phiHat[idim].resize (nfdim[idim] / 2 + 1 ); // alloc fseries
650+ if (nfier) return nfier; // nf too big; we're done
651+ phiHat[idim].resize (nfdim[idim] / 2 + 1 ); // alloc fseries
652652 }
653653
654654 if (opts.debug ) { // "long long" here is to avoid warnings with printf...
@@ -681,7 +681,7 @@ template<typename TF> int FINUFFT_PLAN_T<TF>::initSpreadAndFFT() {
681681 }
682682
683683 timer.restart (); // plan the FFTW (to act in-place on the workspace fwBatch)
684- int nthr_fft = opts.nthreads ;
684+ int nthr_fft = opts.nthreads ;
685685 const auto ns = gridsize_for_fft (*this );
686686 std::vector<TC, xsimd::aligned_allocator<TC, 64 >> fwBatch (nf () * batchSize);
687687 fftPlan->plan (ns, batchSize, fwBatch.data (), fftSign, opts.fftw , nthr_fft);
@@ -853,8 +853,8 @@ FINUFFT_PLAN_T<TF>::FINUFFT_PLAN_T(int type_, int dim_, const BIGINT *n_modes, i
853853 // spreader/Horner internals now using the provided upsampfac.
854854 if (opts.upsampfac != 0.0 ) {
855855 upsamp_locked = true ; // user explicitly set upsampfac, don't auto-update
856- ier = setup_spreader_for_nufft (spopts, tol, opts, dim);
857- if (ier > 1 ) // proceed if success or warning
856+ ier = setup_spreader_for_nufft (spopts, tol, opts, dim);
857+ if (ier > 1 ) // proceed if success or warning
858858 throw int (ier);
859859 precompute_horner_coeffs ();
860860
@@ -927,12 +927,12 @@ int FINUFFT_PLAN_T<TF>::setpts(BIGINT nj, const TF *xj, const TF *yj, const TF *
927927 return FINUFFT_ERR_NUM_NU_PTS_INVALID;
928928 }
929929
930- if (type != 3 ) { // ------------------ TYPE 1,2 SETPTS -------------------
931- // (all we can do is check and maybe bin-sort the NU pts)
930+ if (type != 3 ) { // ------------------ TYPE 1,2 SETPTS -------------------
931+ // (all we can do is check and maybe bin-sort the NU pts)
932932 // If upsampfac is not locked by user (auto mode), choose or update it now
933933 // based on the actual density nj/N(). Re-plan if density changed significantly.
934934 if (!upsamp_locked) {
935- double density = double (nj) / double (N ());
935+ double density = double (nj) / double (N ());
936936 double upsampfac = bestUpsamplingFactor<TF>(opts.nthreads , density, dim, type, tol);
937937 // Re-plan if this is the first call (upsampfac==0) or if upsampfac changed
938938 if (upsampfac != opts.upsampfac ) {
@@ -1095,9 +1095,8 @@ int FINUFFT_PLAN_T<TF>::setpts(BIGINT nj, const TF *xj, const TF *yj, const TF *
10951095 t2opts.debug = std::max (0 , opts.debug - 1 ); // don't print as much detail
10961096 t2opts.spread_debug = std::max (0 , opts.spread_debug - 1 );
10971097 t2opts.showwarn = 0 ; // so don't see warnings 2x
1098- if (!upsamp_locked)
1099- t2opts.upsampfac = 0.0 ; // if the upsampfac was auto, let inner
1100- // t2 pick it again (from density=nj/Nf)
1098+ if (!upsamp_locked) t2opts.upsampfac = 0.0 ; // if the upsampfac was auto, let inner
1099+ // t2 pick it again (from density=nj/Nf)
11011100 // (...could vary other t2opts here?)
11021101 // MR: temporary hack, until we have figured out the C++ interface.
11031102 FINUFFT_PLAN_T<TF> *tmpplan;
0 commit comments