93 #include "proto_f77.h" 96 double *trigo_ini(
int n )
101 static double *table_trigo[NMAX] ;
102 static int nwork = 0 ;
103 static int tbn[NMAX] ;
104 static int trois = 3 ;
111 for ( i=0 ; i < nwork ; i++ ) {
112 if ( tbn[i] == n ) indice = i ;
117 if ( nwork >= NMAX ) {
118 cout <<
"trigo_ini : nwork >= NMAX !" << endl ;
121 indice = nwork ; nwork++ ; tbn[indice] = n ;
124 table_trigo[indice] = (
double *) malloc(
sizeof(
double) * (3*n/2 + 1) ) ;
125 if ( table_trigo[indice] == 0 ) {
126 cout <<
"trigo_ini : malloc error !" << endl ;
130 F77_fftrig( table_trigo[indice], &n, &trois ) ;
136 return table_trigo[indice] ;