Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Synatx error

$
0
0
Hi,

I am a newbie to C and I have been trying to compile a program of the of the DSP-Kernel: interger scaling FFT.
The following is the main program.

#ifdef __PROF56__
#include <stdio.h>
#endif

#define STORAGE_CLASS register
#define TYPE int

#define N_FFT 16
#define NUMBER_OF_BITS 13 /* fract format 1.NUMBER_OF_BITS = 1.13 */

#define BITS_PER_TWID 13 /* bits per twiddle coefficient */
#define SHIFT BITS_PER_TWID /* fractional shift after each multiplication */

#include "twids16-13.dat" /* precalculated twiddle factors 
for an integer 16 point FFT 
in format 1.13 => table twidtable[2*(N_FFT-1)] ; */

#include "input16.dat" /* 16 real values as
input data in float format */

#include "convert.c" /* conversion function to 1.NUMBER_OF_BITS format */

#ifdef __PROF56__
volatile extern __time;
volatile int t;
#include "debug.c"
#endif

#include "fft_bit_reduct.c"

void
pin_down(input_data)
TYPE input_data[] ; 
{

#ifdef __DEBUG__
pin_down_debug();
#endif

/* conversion from input16.dat to a 1.13 format */

float2fract() ; 

{
int *pd, *ps, f; 

pd = &input_data[0];
ps = &inputfract[0] ; 

for (f = 0; f < N_FFT; f++) 
{
*pd++ = *ps++ ; /* fill in with real data */
*pd++ = 0 ; /* imaginary data is equal zero */
} 
}
}


TYPE
main()
{
STORAGE_CLASS TYPE input_data[2*N_FFT]; 

pin_down(&input_data[0]) ; 


fft_bit_reduct(&input_data[0]); 

#ifdef __DEBUG__
dump_to_file(&input_data[0]);
#endif

return (0) ; 

}



On compiling, I get the message
"error: address of register variable ‘input_data’ requested"

Any help will be greatly appreciated.
Thanks in Advance.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>