| 2054 | } |
| 2055 | |
| 2056 | WARN_UNUSED_RESULT |
| 2057 | static int rfftblue_forward(fftblue_plan plan, double c[], double fct) |
| 2058 | { |
| 2059 | size_t n=plan->n; |
| 2060 | double *tmp = RALLOC(double,2*n); |
| 2061 | if (!tmp) return -1; |
| 2062 | for (size_t m=0; m<n; ++m) |
| 2063 | { |
| 2064 | tmp[2*m] = c[m]; |
| 2065 | tmp[2*m+1] = 0.; |
| 2066 | } |
| 2067 | if (fftblue_fft(plan,tmp,-1,fct)!=0) |
| 2068 | { DEALLOC(tmp); return -1; } |
| 2069 | c[0] = tmp[0]; |
| 2070 | memcpy (c+1, tmp+2, (n-1)*sizeof(double)); |
| 2071 | DEALLOC(tmp); |
| 2072 | return 0; |
| 2073 | } |
| 2074 | |
| 2075 | typedef struct cfft_plan_i |
| 2076 | { |
no test coverage detected