<< Chapter < Page Chapter >> Page >

One might get the impression that there is a strict dichotomy that divides cache-aware and cache-oblivious algorithms, but the two arenot mutually exclusive in practice. Given an implementation of a cache-oblivious strategy, one can further optimize it for the cachecharacteristics of a particular machine in order to improve the constant factors. For example, one can tune the radices used, thetransition point between the radix- n algorithm and the bounded-radix algorithm, or other algorithmic choices as describedin "Memory strategies in FFTW" . The advantage of starting cache-aware tuning with a cache-oblivious approach is that the starting point already exploitsall levels of the cache to some extent, and one has reason to hope that good performance on one machine will be more portable to otherarchitectures than for a purely cache-aware “blocking” approach. In practice, we have found this combination to be very successful withFFTW.

Memory strategies in fftw

The recursive cache-oblivious strategies described above form a useful starting point, but FFTW supplements them with a number ofadditional tricks, and also exploits cache-obliviousness in less-obvious forms.

We currently find that the general radix- n algorithm is beneficial only when n becomes very large, on the order of 2 20 10 6 . In practice, this means that we use at most a single step of radix- n (two steps would only be used for n 2 40 ). The reason for this is that the implementation of radix n is less efficient than for a bounded radix: the latter has the advantage that an entire radix butterfly can beperformed in hard-coded loop-free code within local variables/registers, including the necessary permutations and twiddlefactors.

Thus, for more moderate n , FFTW uses depth-first recursion with a bounded radix, similar in spirit to the algorithm of [link] but with much larger radices (radix 32 is common) and base cases (size 32 or 64 iscommon) as produced by the code generator of "Generating Small FFT Kernels" . The self-optimization described in "Adaptive Composition of FFT Algorithms" allows the choice of radix and the transition to the radix- n algorithm to be tuned in a cache-aware (but entirely automatic) fashion.

For small n (including the radix butterflies and the base cases of the recursion), hard-coded FFTs (FFTW's codelets ) are employed. However, this gives rise to an interesting problem: acodelet for (e.g.) n = 64 is 2000 lines long, with hundreds of variables and over 1000 arithmetic operations that can be executed inmany orders, so what order should be chosen? The key problem here is the efficient use of the CPU registers, which essentially form anearly ideal, fully associative cache. Normally, one relies on the compiler for all code scheduling and register allocation, but but thecompiler needs help with such long blocks of code (indeed, the general register-allocation problem is NP-complete). In particular, FFTW'sgenerator knows more about the code than the compiler—the generator knows it is an FFT, and therefore it can use an optimalcache-oblivious schedule (analogous to the radix- n algorithm) to order the code independent of the number ofregisters [link] . The compiler is then used only for local “cache-aware” tuning (both for register allocation and the CPUpipeline). One practical difficulty is that some “optimizing” compilers will tend to greatly re-order the code,destroying FFTW's optimal schedule. With GNU gcc, we circumvent this problem by using compiler flags that explicitly disable certain stages of theoptimizer. As a practical matter, one consequence of this scheduler is that FFTW's machine-independent codelets are no slower thanmachine-specific codelets generated by an automated search and optimization over many possible codelet implementations, as performedby the SPIRAL project [link] .

Questions & Answers

where we get a research paper on Nano chemistry....?
Maira Reply
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
Jyoti Reply
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
yes that's correct
I think
Nasa has use it in the 60's, copper as water purification in the moon travel.
nanocopper obvius
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
scanning tunneling microscope
how nano science is used for hydrophobicity
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
what is differents between GO and RGO?
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
analytical skills graphene is prepared to kill any type viruses .
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

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?