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

Function make_cfftp_plan

numpy/fft/_pocketfft.c:1046–1066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1044 }
1045
1046static cfftp_plan make_cfftp_plan (size_t length)
1047 {
1048 if (length==0) return NULL;
1049 cfftp_plan plan = RALLOC(cfftp_plan_i,1);
1050 if (!plan) return NULL;
1051 plan->length=length;
1052 plan->nfct=0;
1053 for (size_t i=0; i<NFCT; ++i)
1054 plan->fct[i]=(cfftp_fctdata){0,0,0};
1055 plan->mem=0;
1056 if (length==1) return plan;
1057 if (cfftp_factorize(plan)!=0) { DEALLOC(plan); return NULL; }
1058 size_t tws=cfftp_twsize(plan);
1059 if (tws != 0) {
1060 plan->mem=RALLOC(cmplx,tws);
1061 if (!plan->mem) { DEALLOC(plan); return NULL; }
1062 }
1063 if (cfftp_comp_twiddle(plan)!=0)
1064 { DEALLOC(plan->mem); DEALLOC(plan); return NULL; }
1065 return plan;
1066 }
1067
1068static void destroy_cfftp_plan (cfftp_plan plan)
1069 {

Callers 2

make_fftblue_planFunction · 0.85
make_cfft_planFunction · 0.85

Calls 3

cfftp_factorizeFunction · 0.85
cfftp_twsizeFunction · 0.85
cfftp_comp_twiddleFunction · 0.85

Tested by

no test coverage detected