|
algebramix_doc 0.3
|
#include <fft_threads.hpp>
Definition at line 30 of file fft_threads.hpp.
| typedef FFTER::R R |
Definition at line 33 of file fft_threads.hpp.
| typedef R::S S |
Definition at line 35 of file fft_threads.hpp.
| typedef R::U U |
Definition at line 34 of file fft_threads.hpp.
| typedef implementation<vector_linear,vector_threads<vector_naive> > Vec |
Definition at line 32 of file fft_threads.hpp.
| fft_threads_transformer | ( | nat | n | ) | [inline] |
| ~fft_threads_transformer | ( | ) | [inline] |
Definition at line 47 of file fft_threads.hpp.
References fft_threads_transformer< C, FFTER, thr >::ffter.
{ delete ffter; }
| static void copy | ( | C * | d, |
| nat | drs, | ||
| nat | dcs, | ||
| C * | s, | ||
| nat | srs, | ||
| nat | scs, | ||
| nat | r, | ||
| nat | c | ||
| ) | [inline, static] |
Definition at line 50 of file fft_threads.hpp.
References mmx::C.
Referenced by fft_threads_transformer< C, FFTER, thr >::outer_fft_task_rep::execute().
| void dfft | ( | C * | c, |
| nat | stride, | ||
| nat | shift, | ||
| nat | steps, | ||
| nat | step1, | ||
| nat | step2 | ||
| ) | [inline] |
Definition at line 179 of file fft_threads.hpp.
References fft_threads_transformer< C, FFTER, thr >::fft(), and fft_threads_transformer< C, FFTER, thr >::ffter.
| void dfft | ( | C * | c, |
| nat | stride, | ||
| nat | shift, | ||
| nat | steps | ||
| ) | [inline] |
Definition at line 167 of file fft_threads.hpp.
References fft_threads_transformer< C, FFTER, thr >::fft(), and fft_threads_transformer< C, FFTER, thr >::ffter.
Referenced by fft_threads_transformer< C, FFTER, thr >::direct_transform().
| void direct_transform | ( | C * | c | ) | [inline] |
Definition at line 193 of file fft_threads.hpp.
References fft_threads_transformer< C, FFTER, thr >::depth, and fft_threads_transformer< C, FFTER, thr >::dfft().
| void fft | ( | bool | direct, |
| C * | c, | ||
| nat | stride, | ||
| nat | shift, | ||
| nat | steps | ||
| ) | [inline] |
Definition at line 118 of file fft_threads.hpp.
References mmx::C, fft_threads_transformer< C, FFTER, thr >::ffter, and fft_threads_transformer< C, FFTER, thr >::min_reps.
Referenced by fft_threads_transformer< C, FFTER, thr >::dfft(), and fft_threads_transformer< C, FFTER, thr >::ifft().
{
if (steps <= thr) {
if (direct) ffter->dfft (c, stride, shift, steps);
else ffter->ifft (c, stride, shift, steps);
}
else {
nat half1= min(log_2 (threads_number), steps);
nat half2= steps - half1;
for (nat stage=0; stage<2; stage++) {
if ((stage == 0) ^ (!direct)) {
//C* cc1 = c;
//for (nat i=0; i<((nat) 1<<half2); i++, cc1 += stride)
// ffter->fft (direct, cc1, stride << half2,
// shift >> half2, half1);
nat nt = threads_number;
nat bsz= (min_reps << half1);
C* buf= mmx_new<C> (nt * bsz);
task tasks[nt];
for (nat i=0; i<nt; i++) {
nat tot= 1 << half2;
nat sta= min_reps * (( i * tot) / (min_reps * nt));
nat end= min_reps * (((i+1) * tot) / (min_reps * nt));
tasks[i]= new outer_fft_task_rep
(ffter, direct, buf + i*bsz, end-sta, tot,
c + sta*stride, stride, shift >> half2, half1);
}
threads_execute (tasks, nt);
mmx_delete<C> (buf, nt * bsz);
}
else {
//C* cc2= c;
//for (nat i=0; i<((nat) 1<<half1); i++, cc2 += (stride << half2))
// ffter->fft (direct, cc2, stride,
// shift + ((i << half2) >> 1), half2);
nat nt= threads_number;
task tasks[nt];
for (nat i=0; i<nt; i++)
tasks[i]= new inner_fft_task_rep
(ffter, direct, i, nt, 1 << half1, c, stride, shift, half2);
threads_execute (tasks, nt);
}
}
}
}
| void ifft | ( | C * | c, |
| nat | stride, | ||
| nat | shift, | ||
| nat | steps | ||
| ) | [inline] |
Definition at line 173 of file fft_threads.hpp.
References fft_threads_transformer< C, FFTER, thr >::fft(), and fft_threads_transformer< C, FFTER, thr >::ffter.
Referenced by fft_threads_transformer< C, FFTER, thr >::inverse_transform().
| void ifft | ( | C * | c, |
| nat | stride, | ||
| nat | shift, | ||
| nat | steps, | ||
| nat | step1, | ||
| nat | step2 | ||
| ) | [inline] |
Definition at line 186 of file fft_threads.hpp.
References fft_threads_transformer< C, FFTER, thr >::fft(), and fft_threads_transformer< C, FFTER, thr >::ffter.
| void inverse_transform | ( | C * | c, |
| bool | divide = true |
||
| ) | [inline] |
Definition at line 197 of file fft_threads.hpp.
References fft_threads_transformer< C, FFTER, thr >::depth, fft_threads_transformer< C, FFTER, thr >::ifft(), mmx::invert(), and fft_threads_transformer< C, FFTER, thr >::len.
| nat depth |
Definition at line 39 of file fft_threads.hpp.
Referenced by fft_threads_transformer< C, FFTER, thr >::direct_transform(), and fft_threads_transformer< C, FFTER, thr >::inverse_transform().
| FFTER* ffter |
| nat len |
Definition at line 40 of file fft_threads.hpp.
Referenced by fft_threads_transformer< C, FFTER, thr >::inverse_transform().
const nat min_reps = 16 [static] |
Definition at line 36 of file fft_threads.hpp.
Referenced by fft_threads_transformer< C, FFTER, thr >::outer_fft_task_rep::execute(), and fft_threads_transformer< C, FFTER, thr >::fft().
Definition at line 41 of file fft_threads.hpp.