| 1865 | } |
| 1866 | |
| 1867 | NOINLINE static rfftp_plan make_rfftp_plan (size_t length) |
| 1868 | { |
| 1869 | if (length==0) return NULL; |
| 1870 | rfftp_plan plan = RALLOC(rfftp_plan_i,1); |
| 1871 | if (!plan) return NULL; |
| 1872 | plan->length=length; |
| 1873 | plan->nfct=0; |
| 1874 | plan->mem=NULL; |
| 1875 | for (size_t i=0; i<NFCT; ++i) |
| 1876 | plan->fct[i]=(rfftp_fctdata){0,0,0}; |
| 1877 | if (length==1) return plan; |
| 1878 | if (rfftp_factorize(plan)!=0) { DEALLOC(plan); return NULL; } |
| 1879 | size_t tws=rfftp_twsize(plan); |
| 1880 | if (tws != 0) { |
| 1881 | plan->mem=RALLOC(double,tws); |
| 1882 | if (!plan->mem) { DEALLOC(plan); return NULL; } |
| 1883 | } |
| 1884 | if (rfftp_comp_twiddle(plan)!=0) |
| 1885 | { DEALLOC(plan->mem); DEALLOC(plan); return NULL; } |
| 1886 | return plan; |
| 1887 | } |
| 1888 | |
| 1889 | NOINLINE static void destroy_rfftp_plan (rfftp_plan plan) |
| 1890 | { |
no test coverage detected