38 static void simple_test_nfsft(
void)
 
   46   nfsft_precompute(N,1000.0,0U,0U);
 
   54   nfsft_init_guru(&plan, N, M, NFSFT_MALLOC_X | NFSFT_MALLOC_F |
 
   55     NFSFT_MALLOC_F_HAT | NFSFT_NORMALIZED | NFSFT_PRESERVE_F_HAT,
 
   56     PRE_PHI_HUT | PRE_PSI | FFTW_INIT | FFT_OUT_OF_PLACE, 6);
 
   59   for (j = 0; j < plan.
M_total; j++)
 
   61     plan.
x[2*j]= nfft_drand48() - K(0.5);
 
   62     plan.
x[2*j+1]= K(0.5) * nfft_drand48();
 
   66   nfsft_precompute_x(&plan);
 
   69   for (k = 0; k <= plan.
N; k++)
 
   70     for (n = -k; n <= k; n++)
 
   71       plan.
f_hat[NFSFT_INDEX(k,n,&plan)] =
 
   72           nfft_drand48() - K(0.5) + _Complex_I*(nfft_drand48() - K(0.5));
 
   75   nfsft_trafo_direct(&plan);
 
   76   printf(
"Vector f (NDSFT):\n");
 
   77   for (j = 0; j < plan.
M_total; j++)
 
   78     printf(
"f[%+2d] = %+5.3" FE 
" %+5.3" FE 
"*I\n",j,
 
   79       creal(plan.
f[j]), cimag(plan.
f[j]));
 
   84   printf(
"Vector f (NDSFT):\n");
 
   85   for (j = 0; j < plan.
M_total; j++)
 
   86     printf(
"f[%+2d] = %+5.3" FE 
" %+5.3" FE 
"*I\n",j,
 
   87       creal(plan.
f[j]), cimag(plan.
f[j]));
 
   92   nfsft_adjoint_direct(&plan);
 
   93   printf(
"Vector f_hat (NDSFT):\n");
 
   94   for (k = 0; k <= plan.
N; k++)
 
   95     for (n = -k; n <= k; n++)
 
   96       fprintf(stdout,
"f_hat[%+2d,%+2d] = %+5.3" FE 
" %+5.3" FE 
"*I\n",k,n,
 
   97         creal(plan.
f_hat[NFSFT_INDEX(k,n,&plan)]),
 
   98         cimag(plan.
f_hat[NFSFT_INDEX(k,n,&plan)]));
 
  103   nfsft_adjoint(&plan);
 
  104   printf(
"Vector f_hat (NFSFT):\n");
 
  105   for (k = 0; k <= plan.
N; k++)
 
  107     for (n = -k; n <= k; n++)
 
  109       fprintf(stdout,
"f_hat[%+2d,%+2d] = %+5.3" FE 
" %+5.3" FE 
"*I\n",k,n,
 
  110         creal(plan.
f_hat[NFSFT_INDEX(k,n,&plan)]),
 
  111         cimag(plan.
f_hat[NFSFT_INDEX(k,n,&plan)]));
 
  116   nfsft_finalize(&plan);
 
  124   printf(
"nthreads = %d\n", nfft_get_omp_num_threads());
 
  129   printf(
"Computing an NDSFT, an NFSFT, an adjoint NDSFT, and an adjoint NFSFT"