Silence compiler warnings about unused variables

This commit is contained in:
Richard Berger
2021-04-14 17:02:12 -04:00
parent f07fa3d266
commit 91dfc6875b

View File

@ -69,7 +69,6 @@
void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
{
int i,total,length,offset,num;
FFT_SCALAR norm;
#if defined(FFT_FFTW3)
FFT_SCALAR *out_ptr;
@ -99,9 +98,6 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
// 1d FFTs along fast axis
total = plan->total1;
length = plan->length1;
#if defined(FFT_MKL)
if (flag == 1)
DftiComputeForward(plan->handle_fast,data);
@ -114,11 +110,14 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
theplan=plan->plan_fast_backward;
FFTW_API(execute_dft)(theplan,data,data);
#else
int total = plan->total1;
int length = plan->length1;
if (flag == 1)
for (offset = 0; offset < total; offset += length)
for (int offset = 0; offset < total; offset += length)
kiss_fft(plan->cfg_fast_forward,&data[offset],&data[offset]);
else
for (offset = 0; offset < total; offset += length)
for (int offset = 0; offset < total; offset += length)
kiss_fft(plan->cfg_fast_backward,&data[offset],&data[offset]);
#endif
@ -133,9 +132,6 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
// 1d FFTs along mid axis
total = plan->total2;
length = plan->length2;
#if defined(FFT_MKL)
if (flag == 1)
DftiComputeForward(plan->handle_mid,data);
@ -148,11 +144,14 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
theplan=plan->plan_mid_backward;
FFTW_API(execute_dft)(theplan,data,data);
#else
total = plan->total2;
length = plan->length2;
if (flag == 1)
for (offset = 0; offset < total; offset += length)
for (int offset = 0; offset < total; offset += length)
kiss_fft(plan->cfg_mid_forward,&data[offset],&data[offset]);
else
for (offset = 0; offset < total; offset += length)
for (int offset = 0; offset < total; offset += length)
kiss_fft(plan->cfg_mid_backward,&data[offset],&data[offset]);
#endif
@ -167,9 +166,6 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
// 1d FFTs along slow axis
total = plan->total3;
length = plan->length3;
#if defined(FFT_MKL)
if (flag == 1)
DftiComputeForward(plan->handle_slow,data);
@ -182,11 +178,14 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
theplan=plan->plan_slow_backward;
FFTW_API(execute_dft)(theplan,data,data);
#else
total = plan->total3;
length = plan->length3;
if (flag == 1)
for (offset = 0; offset < total; offset += length)
for (int offset = 0; offset < total; offset += length)
kiss_fft(plan->cfg_slow_forward,&data[offset],&data[offset]);
else
for (offset = 0; offset < total; offset += length)
for (int offset = 0; offset < total; offset += length)
kiss_fft(plan->cfg_slow_backward,&data[offset],&data[offset]);
#endif
@ -201,11 +200,11 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
if (flag == -1 && plan->scaled) {
norm = plan->norm;
num = plan->normnum;
const int num = plan->normnum;
#if defined(FFT_FFTW3)
out_ptr = (FFT_SCALAR *)out;
#endif
for (i = 0; i < num; i++) {
for (int i = 0; i < num; i++) {
#if defined(FFT_FFTW3)
*(out_ptr++) *= norm;
*(out_ptr++) *= norm;