<< Chapter < Page Chapter >> Page >

There exists a different recursive FFT that is optimal cache-oblivious, however, and that is the radix- n “four-step” Cooley-Tukey algorithm (again executed recursively, depth-first) [link] . The cache complexity Q o of this algorithm satisfies the recurrence:

Q o ( n ; Z ) = n n Z 2 n Q o ( n ; Z ) + Θ ( n ) otherwise .

That is, at each stage one performs n DFTs of size n (recursively), then multiplies by the Θ ( n ) twiddle factors (and does a matrix transposition to obtain in-order output),then finally performs another n DFTs of size n . The solution of [link] is Q o ( n ; Z ) = Θ ( n log Z n ) , the same as the optimal cache complexity [link] !

These algorithms illustrate the basic features of most optimal cache-oblivious algorithms: they employ a recursive divide-and-conquerstrategy to subdivide the problem until it fits into cache, at which point the subdivision continues but no further cache misses arerequired. Moreover, a cache-oblivious algorithm exploits all levelsof the cache in the same way, so an optimal cache-oblivious algorithm exploits a multi-level cache optimally as well as a two-levelcache [link] : the multi-level “blocking” is implicit in the recursion.

Cache-obliviousness in practice

Even though the radix- n algorithm is optimal cache-oblivious, it does not follow that FFT implementation is a solved problem. Theoptimality is only in an asymptotic sense, ignoring constant factors, O ( n ) terms, etcetera, all of which can matter a great deal in practice. For small or moderate n , quite different algorithms may be superior, as discussed in "Memory strategies in FFTW" . Moreover, real caches are inferior to an ideal cache in several ways. Theunsurprising consequence of all this is that cache-obliviousness, like any complexity-based algorithm property, does not absolve one from theordinary process of software optimization. At best, it reduces the amount of memory/cache tuning that one needs to perform, structuringthe implementation to make further optimization easier and more portable.

Perhaps most importantly, one needs to perform an optimization that has almost nothing to do with the caches: the recursion must be“coarsened” to amortize the function-call overhead and to enable compiler optimization. For example, the simple pedagogical code of thealgorithm in [link] recurses all the way down to n = 1 , and hence there are 2 n function calls in total, so that every data point incurs a two-function-call overhead on average. Moreover, thecompiler cannot fully exploit the large register sets and instruction-level parallelism of modern processors with an n = 1 function body. In principle, it might be possible for a compiler to automatically coarsen the recursion, similar to how compilers canpartially unroll loops. We are currently unaware of any general-purpose compiler that performs this optimization, however. These problems can be effectively erased, however, simply by making the base cases larger, e.g. the recursion could stop when n = 32 is reached, at which point a highly optimized hard-coded FFT of thatsize would be executed. In FFTW, we produced this sort of large base-case using a specialized code-generation program described in "Generating Small FFT Kernels" .

Questions & Answers

why economics is difficult for 2nd school students.
Siraj Reply
what does mean opportunity cost?
Aster Reply
what is poetive effect of population growth
Solomon Reply
what is inflation
Nasir Reply
what is demand
Eleni
what is economics
IMLAN Reply
economics theory describes individual behavior as the result of a process of optimization under constraints the objective to be reached being determined by
Kalkidan
Economics is a branch of social science that deal with How to wise use of resource ,s
Kassie
need
WARKISA
Economic Needs: In economics, needs are goods or services that are necessary for maintaining a certain standard of living. This includes things like healthcare, education, and transportation.
Kalkidan
What is demand and supply
EMPEROR Reply
deman means?
Alex
what is supply?
Alex
ex play supply?
Alex
Money market is a branch or segment of financial market where short-term debt instruments are traded upon. The instruments in this market includes Treasury bills, Bonds, Commercial Papers, Call money among other.
murana Reply
good
Kayode
what is money market
umar Reply
Examine the distinction between theory of comparative cost Advantage and theory of factor proportion
Fatima Reply
What is inflation
Bright Reply
a general and ongoing rise in the level of prices in an economy
AI-Robot
What are the factors that affect demand for a commodity
Florence Reply
price
Kenu
differentiate between demand and supply giving examples
Lambiv Reply
differentiated between demand and supply using examples
Lambiv
what is labour ?
Lambiv
how will I do?
Venny Reply
how is the graph works?I don't fully understand
Rezat Reply
information
Eliyee
devaluation
Eliyee
t
WARKISA
hi guys good evening to all
Lambiv
multiple choice question
Aster Reply
appreciation
Eliyee
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Fast fourier transforms. OpenStax CNX. Nov 18, 2012 Download for free at http://cnx.org/content/col10550/1.22
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Fast fourier transforms' conversation and receive update notifications?

Ask