MCPcopy Create free account
hub / github.com/numpy/numpy / rfftp_forward

Function rfftp_forward

numpy/fft/_pocketfft.c:1714–1748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1712 }
1713
1714WARN_UNUSED_RESULT
1715static int rfftp_forward(rfftp_plan plan, double c[], double fct)
1716 {
1717 if (plan->length==1) return 0;
1718 size_t n=plan->length;
1719 size_t l1=n, nf=plan->nfct;
1720 double *ch = RALLOC(double, n);
1721 if (!ch) return -1;
1722 double *p1=c, *p2=ch;
1723
1724 for(size_t k1=0; k1<nf;++k1)
1725 {
1726 size_t k=nf-k1-1;
1727 size_t ip=plan->fct[k].fct;
1728 size_t ido=n / l1;
1729 l1 /= ip;
1730 if(ip==4)
1731 radf4(ido, l1, p1, p2, plan->fct[k].tw);
1732 else if(ip==2)
1733 radf2(ido, l1, p1, p2, plan->fct[k].tw);
1734 else if(ip==3)
1735 radf3(ido, l1, p1, p2, plan->fct[k].tw);
1736 else if(ip==5)
1737 radf5(ido, l1, p1, p2, plan->fct[k].tw);
1738 else
1739 {
1740 radfg(ido, ip, l1, p1, p2, plan->fct[k].tw, plan->fct[k].tws);
1741 SWAP (p1,p2,double *);
1742 }
1743 SWAP (p1,p2,double *);
1744 }
1745 copy_and_norm(c,p1,n,fct);
1746 DEALLOC(ch);
1747 return 0;
1748 }
1749
1750WARN_UNUSED_RESULT
1751static int rfftp_backward(rfftp_plan plan, double c[], double fct)

Callers 1

rfft_forwardFunction · 0.85

Calls 6

radf4Function · 0.85
radf2Function · 0.85
radf3Function · 0.85
radf5Function · 0.85
radfgFunction · 0.85
copy_and_normFunction · 0.85

Tested by

no test coverage detected