FastLED 3.9.15
Loading...
Searching...
No Matches

◆ kf_work()

static void kf_work ( kiss_fft_cpx * Fout,
const kiss_fft_cpx * f,
const size_t fstride,
int in_stride,
int * factors,
const kiss_fft_cfg st )
static

Definition at line 232 of file kiss_fft.c.

240{
241 kiss_fft_cpx * Fout_beg=Fout;
242 const int p=*factors++; /* the radix */
243 const int m=*factors++; /* stage's fft length/p */
244 const kiss_fft_cpx * Fout_end = Fout + p*m;
245
246#ifdef _OPENMP
247 // use openmp extensions at the
248 // top-level (not recursive)
249 if (fstride==1 && p<=5)
250 {
251 int k;
252
253 // execute the p different work units in different threads
254# pragma omp parallel for
255 for (k=0;k<p;++k)
256 kf_work( Fout +k*m, f+ fstride*in_stride*k,fstride*p,in_stride,factors,st);
257 // all threads have joined by this point
258
259 switch (p) {
260 case 2: kf_bfly2(Fout,fstride,st,m); break;
261 case 3: kf_bfly3(Fout,fstride,st,m); break;
262 case 4: kf_bfly4(Fout,fstride,st,m); break;
263 case 5: kf_bfly5(Fout,fstride,st,m); break;
264 default: kf_bfly_generic(Fout,fstride,st,m,p); break;
265 }
266 return;
267 }
268#endif
269
270 if (m==1) {
271 do{
272 *Fout = *f;
273 f += fstride*in_stride;
274 }while(++Fout != Fout_end );
275 }else{
276 do{
277 // recursive call:
278 // DFT of size m*p performed by doing
279 // p instances of smaller DFTs of size m,
280 // each one takes a decimated version of the input
281 kf_work( Fout , f, fstride*p, in_stride, factors,st);
282 f += fstride*in_stride;
283 }while( (Fout += m) != Fout_end );
284 }
285
286 Fout=Fout_beg;
287
288 // recombine the p smaller DFTs
289 switch (p) {
290 case 2: kf_bfly2(Fout,fstride,st,m); break;
291 case 3: kf_bfly3(Fout,fstride,st,m); break;
292 case 4: kf_bfly4(Fout,fstride,st,m); break;
293 case 5: kf_bfly5(Fout,fstride,st,m); break;
294 default: kf_bfly_generic(Fout,fstride,st,m,p); break;
295 }
296}
static void kf_bfly4(kiss_fft_cpx *Fout, const size_t fstride, const kiss_fft_cfg st, const size_t m)
Definition kiss_fft.c:38
static void kf_bfly2(kiss_fft_cpx *Fout, const size_t fstride, const kiss_fft_cfg st, int m)
Definition kiss_fft.c:15
static void kf_bfly_generic(kiss_fft_cpx *Fout, const size_t fstride, const kiss_fft_cfg st, int m, int p)
Definition kiss_fft.c:192
static void kf_bfly3(kiss_fft_cpx *Fout, const size_t fstride, const kiss_fft_cfg st, size_t m)
Definition kiss_fft.c:86
static void kf_work(kiss_fft_cpx *Fout, const kiss_fft_cpx *f, const size_t fstride, int in_stride, int *factors, const kiss_fft_cfg st)
Definition kiss_fft.c:232
static void kf_bfly5(kiss_fft_cpx *Fout, const size_t fstride, const kiss_fft_cfg st, int m)
Definition kiss_fft.c:130
static FASTLED_NAMESPACE_BEGIN uint8_t const p[]
Definition noise.cpp:30

References kf_bfly2(), kf_bfly3(), kf_bfly4(), kf_bfly5(), kf_bfly_generic(), kf_work(), and p.

Referenced by kf_work(), and kiss_fft_stride().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: