[CLAM] FFTW vs GCC

Xavi Rubio xrubio at iua.upf.es
Thu Nov 6 02:01:42 PST 2003


Maybe you should send this kind of problems to linuxeros-upf (mailing list or web), because we can't give help for all the external libraries, gcc, etc.
Anyway, you can use octave insted of Matlab to do this operations, I think :-P.

Xavi

On Thu, 6 Nov 2003 00:50:35 +0000
Jordi Prats <jordi.prats02 at campus.upf.es> wrote:

> 
> Contestaria en angles però seria tant patètic q millor ho faig en català, ho
> sento.
> No estic fent servir CLAM, simplement sabia q a CLAM es fa servir la llibreria
> fftw i per això preguntava sobre el tema. En realitat estic intentant fer
> algunes coses que fem a classe de Procesament del Senyal 2 en C donat que
> encara no tinc baixat (vull dir comprat) el MatLab, bé, la versió q tinc no
> l'he pogut instalar, així que fins que no en disposi d'una q sí q pugui em
> dedico a provar aquestes llibreries, per pur plaer. Haig de dir que sense
> gaire d'èxit fins al moment.
> 
> --
> Jordi
> 
> 
> A Dijous 06 Novembre 2003 00:26, vàreu escriure:
> > > El codi es el següent:
> > > ////////////////////////////////////
> > > #include <fftw3.h>
> > >
> > > typedef unsigned int size;
> > >
> > > #define N 128
> > >
> > > void memset2(fftw_complex *mem, fftw_complex x, size s)
> > > {
> > > 	#define DOUBLE2 (sizeof(double)*2)
> > > 	unsigned int i;
> > > 	s=s/DOUBLE2;
> > > 	//for(i=0;i<s;i+=DOUBLE2)
> > > 	for(i=0;i<s;++i)
> > > 	{
> > > 		*(mem+i)[0]=x[0];
> > > 		*(mem+i)[1]=x[1];
> > > 	}
> > > }
> > >
> > > int main (void)
> > > {
> > > 	fftw_complex *in, *out;
> > > 	fftw_plan p;
> > >
> > > 	double relleno[2];
> > > 	relleno[0]=3;
> > > 	relleno[1]=0;
> > >
> > > 	in = fftw_malloc(sizeof(fftw_complex) * N*N);
> > > 	out = fftw_malloc(sizeof(fftw_complex) * N*N);
> > >
> > > 	memset2(in,relleno,sizeof(fftw_complex)*N*N);
> > > 	memset(out,0,sizeof(fftw_complex)*N*N);
> > >
> > > 	p = fftw_plan_dft_2d(N,N,in, out, FFTW_FORWARD, FFTW_ESTIMATE);
> > >
> > > 	fftw_execute(p); /* repeat as needed */
> > >
> > > 	fftw_destroy_plan(p);
> > >
> > > 	fftw_free(in);
> > > 	fftw_free(out);
> > > 	return 0;
> > > }
> > > /////////////////////////////////
> > >
> >
> > BTW, are you using CLAM? Since it is a Framework for Audio and Music I
> > find a bit strange that you have found any use for the 2D DFT...
> >
> > Miguel.
> >
> >
> > ___________________________________________________________________________
> >_____________ Este mensaje ha sido analizado y protegido por la tecnologia
> > antivirus www.trendmicro.es
> 
> 
> ________________________________________________________________________________________
> Este mensaje ha sido analizado y protegido por la tecnologia antivirus www.trendmicro.es
> 
> _______________________________________________
> CLAM mailing list
> CLAM at iua.upf.es
> http://www.iua.upf.es/mtg/clam
> 
> 






More information about the clam-users mailing list