| 2031 | { return fftblue_fft(plan,c,-1,fct); } |
| 2032 | |
| 2033 | WARN_UNUSED_RESULT |
| 2034 | static int rfftblue_backward(fftblue_plan plan, double c[], double fct) |
| 2035 | { |
| 2036 | size_t n=plan->n; |
| 2037 | double *tmp = RALLOC(double,2*n); |
| 2038 | if (!tmp) return -1; |
| 2039 | tmp[0]=c[0]; |
| 2040 | tmp[1]=0.; |
| 2041 | memcpy (tmp+2,c+1, (n-1)*sizeof(double)); |
| 2042 | if ((n&1)==0) tmp[n+1]=0.; |
| 2043 | for (size_t m=2; m<n; m+=2) |
| 2044 | { |
| 2045 | tmp[2*n-m]=tmp[m]; |
| 2046 | tmp[2*n-m+1]=-tmp[m+1]; |
| 2047 | } |
| 2048 | if (fftblue_fft(plan,tmp,1,fct)!=0) |
| 2049 | { DEALLOC(tmp); return -1; } |
| 2050 | for (size_t m=0; m<n; ++m) |
| 2051 | c[m] = tmp[2*m]; |
| 2052 | DEALLOC(tmp); |
| 2053 | return 0; |
| 2054 | } |
| 2055 | |
| 2056 | WARN_UNUSED_RESULT |
| 2057 | static int rfftblue_forward(fftblue_plan plan, double c[], double fct) |
no test coverage detected