<< Chapter < Page Chapter >> Page >
Q b ( n ; Z ) = Θ ( n log Z n ) .

In fact, this complexity is rigorously optimal for Cooley-Tukey FFT algorithms [link] , and immediately points us towards large radices (not radix 2!) to exploit caches effectively in FFTs.

However, there is one shortcoming of any blocked FFT algorithm: it is cache aware , meaning that the implementation depends explicitly on the cache size Z . The implementation must be modified (e.g. changing the radix) to adapt to different machines as the cachesize changes. Worse, as mentioned above, actual machines have multiple levels of cache, and to exploit these one must performmultiple levels of blocking, each parameterized by the corresponding cache size. In the above example, if there were a smaller and fastercache of size z < Z , the size- Z sub-FFTs should themselves be performed via radix- z Cooley-Tukey using blocks of size z . And so on. There are two paths out of these difficulties: one isself-optimization, where the implementation automatically adapts itself to the hardware (implicitly including any cache sizes), asdescribed in "Adaptive Composition of FFT Algorithms" ; the other is to exploit cache-oblivious algorithms. FFTW employs both of these techniques.

The goal of cache-obliviousness is to structure the algorithm so that it exploits the cache without having the cache size as a parameter:the same code achieves the same asymptotic cache complexity regardless of the cache size Z . An optimal cache-oblivious algorithm achieves the optimal cache complexity (that is, in an asymptotic sense, ignoring constant factors). Remarkably, optimalcache-oblivious algorithms exist for many problems, such as matrix multiplication, sorting, transposition, and FFTs [link] . Not all cache-oblivious algorithms are optimal, of course—forexample, the textbook radix-2 algorithm discussed above is “pessimal” cache-oblivious (its cache complexity is independent of Z because it always achieves the worst case!).

For instance, [link] (right) and the algorithm of [link] shows a way to obliviously exploit the cache with a radix-2 Cooley-Tukey algorithm,by ordering the computation depth-first rather than breadth-first. That is, the DFT of size n is divided into two DFTs of size n / 2 , and one DFT of size n / 2 is completely finished before doing any computations for the second DFT of size n / 2 . The two subtransforms are then combined using n / 2 radix-2 butterflies, which requires a pass over the array and (hence n cache misses if n > Z ). This process is repeated recursively until a base-case (e.g. size 2) is reached. The cache complexity Q 2 ( n ; Z ) of this algorithm satisfies the recurrence

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

The key property is this: once the recursion reaches a size n Z , the subtransform fits into the cache and no further misses are incurred. The algorithm does not “know” this and continuessubdividing the problem, of course, but all of those further subdivisions are in-cache because they are performed in the samedepth-first branch of the tree. The solution of [link] is

Q 2 ( n ; Z ) = Θ ( n log [ n / Z ] ) .

This is worse than the theoretical optimum Q b ( n ; Z ) from [link] , but it is cache-oblivious ( Z never entered the algorithm) and exploits at least some temporal locality. This advantage of depth-first recursive implementation of the radix-2 FFT was pointed out many years agoby Singleton (where the “cache” was core memory) [link] . On the other hand, when it is combined with FFTW's self-optimization and larger radices in "Adaptive Composition of FFT Algorithms" , this algorithm actually performs very well until n becomes extremely large. By itself, however, the algorithm of [link] must be modified to attain adequate performance for reasons that havenothing to do with the cache. These practical issues are discussed further in "Cache-obliviousness in practice" .

Questions & Answers

I'm interested in biological psychology and cognitive psychology
Tanya Reply
what does preconceived mean
sammie Reply
physiological Psychology
Nwosu Reply
How can I develope my cognitive domain
Amanyire Reply
why is communication effective
Dakolo Reply
Communication is effective because it allows individuals to share ideas, thoughts, and information with others.
effective communication can lead to improved outcomes in various settings, including personal relationships, business environments, and educational settings. By communicating effectively, individuals can negotiate effectively, solve problems collaboratively, and work towards common goals.
it starts up serve and return practice/assessments.it helps find voice talking therapy also assessments through relaxed conversation.
miss
Every time someone flushes a toilet in the apartment building, the person begins to jumb back automatically after hearing the flush, before the water temperature changes. Identify the types of learning, if it is classical conditioning identify the NS, UCS, CS and CR. If it is operant conditioning, identify the type of consequence positive reinforcement, negative reinforcement or punishment
Wekolamo Reply
please i need answer
Wekolamo
because it helps many people around the world to understand how to interact with other people and understand them well, for example at work (job).
Manix Reply
Agreed 👍 There are many parts of our brains and behaviors, we really need to get to know. Blessings for everyone and happy Sunday!
ARC
A child is a member of community not society elucidate ?
JESSY Reply
Isn't practices worldwide, be it psychology, be it science. isn't much just a false belief of control over something the mind cannot truly comprehend?
Simon Reply
compare and contrast skinner's perspective on personality development on freud
namakula Reply
Skinner skipped the whole unconscious phenomenon and rather emphasized on classical conditioning
war
explain how nature and nurture affect the development and later the productivity of an individual.
Amesalu Reply
nature is an hereditary factor while nurture is an environmental factor which constitute an individual personality. so if an individual's parent has a deviant behavior and was also brought up in an deviant environment, observation of the behavior and the inborn trait we make the individual deviant.
Samuel
I am taking this course because I am hoping that I could somehow learn more about my chosen field of interest and due to the fact that being a PsyD really ignites my passion as an individual the more I hope to learn about developing and literally explore the complexity of my critical thinking skills
Zyryn Reply
good👍
Jonathan
and having a good philosophy of the world is like a sandwich and a peanut butter 👍
Jonathan
generally amnesi how long yrs memory loss
Kelu Reply
interpersonal relationships
Abdulfatai Reply
What would be the best educational aid(s) for gifted kids/savants?
Heidi Reply
treat them normal, if they want help then give them. that will make everyone happy
Saurabh
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