コード例 #1
0
ファイル: rexec2.c プロジェクト: CRAVA/crava
/*
 * in: array of n/2 + 1 complex numbers (* howmany).
 * out: array of n real numbers (* howmany).
 * work: array of n real numbers (stride 1)
 * 
 * We must have out != in if dist < stride.  
 */
void rfftw_c2real_aux(fftw_plan plan, int howmany,
		      fftw_complex *in, int istride, int idist,
		      fftw_real *out, int ostride, int odist,
		      fftw_real *work)
{
     fftw_plan_node *p = plan->root;

     switch (p->type) {
	 case FFTW_HC2REAL:
	      {
		   fftw_hc2real_codelet *codelet = p->nodeu.hc2real.codelet;
		   int j;

		   HACK_ALIGN_STACK_ODD();
		   for (j = 0; j < howmany; ++j)
			codelet(&c_re(*(in + j * idist)),
				&c_im(*(in + j * idist)),
				out + j * odist,
				istride * 2, istride * 2, ostride);
		   break;
	      }

	 default:
	      {
		   int j, n = plan->n;

		   for (j = 0; j < howmany; ++j, in += idist, out += odist) {
			rfftw_c2hc(n, in, istride, work);
			rfftw_executor_simple(n, work, out, p, 1, ostride);
		   }
		   break;
	      }
     }
}
コード例 #2
0
ファイル: rexec2_threads.c プロジェクト: Pinkii-/PCA
static void *c2real_overlap_aux_thread1(fftw_loop_data *ldata)
{
     rexec2_thread_data *d = (rexec2_thread_data *) ldata->data;
     int min = ldata->min, max = ldata->max;
     int n = d->plan->n;
     fftw_complex *in = (fftw_complex *) d->in;
     int istride = d->istride, idist = d->idist;
     fftw_real *work = d->work;

     for (; min < max; ++min)
	  rfftw_c2hc(n, in + min*idist, istride, work + min*n);
     return 0;
}
コード例 #3
0
void rfftw_c2real_overlap_aux(fftw_plan plan, int howmany,
			      fftw_complex *in, int istride, int idist,
			      fftw_real *out, int ostride, int odist,
			      fftw_real *work)
{
     int n = plan->n;
     int j;

     /* copy from in to work: */
     for (j = 0; j < howmany; ++j, in += idist)
	  rfftw_c2hc(n, in, istride, work + j * n);

     rfftw(plan, howmany, work, 1, n, out, ostride, odist);
}