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

Function make_rfftp_plan

numpy/fft/_pocketfft.c:1867–1887  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1865 }
1866
1867NOINLINE 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
1889NOINLINE static void destroy_rfftp_plan (rfftp_plan plan)
1890 {

Callers 1

make_rfft_planFunction · 0.85

Calls 3

rfftp_factorizeFunction · 0.85
rfftp_twsizeFunction · 0.85
rfftp_comp_twiddleFunction · 0.85

Tested by

no test coverage detected