c12-6 (779562), страница 2
Текст из файла (страница 2)
It is a simple matter to perform multiple reads for a muchlarger KBF, thus reducing the number of passes by a few.Another modification of fourfs would be for the case where your virtual memorymachine has sufficient address space, but not sufficient physical memory, to do an efficientFFT by the conventional algorithm (whose memory references are extremely nonlocal). Inthat case, you will need to replace the reads, writes, and rewinds by mappings of the arraysSample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use.
Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).}fourew(file,&na,&nb,&nc,&nd);jk >>= 1;if (jk > 1) continue;mm=n;do {if (nv < ndim) jk=nn[++nv];else {free_vector(afc,1,KBF);free_vector(afb,1,KBF);free_vector(afa,1,KBF);return;}} while (jk == 1);536Chapter 12.Fast Fourier Transformafa, afb, and afc into your address space.
In other words, these arrays are replaced byreferences to a single data array, with offsets that get modified wherever fourfs performs anI/O operation. The resulting algorithm will have its memory references local within blocksof size KBF. Execution speed is thereby sometimes increased enormously, albeit at the costof requiring twice as much virtual memory as an in-place FFT.Singleton, R.C. 1967, IEEE Transactions on Audio and Electroacoustics, vol. AU-15, pp.
91–97.[1]Oppenheim, A.V., and Schafer, R.W. 1989, Discrete-Time Signal Processing (Englewood Cliffs,NJ: Prentice-Hall), Chapter 9.Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use.
Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).CITED REFERENCES AND FURTHER READING:.