Previous | Next --- Slide 50 of 64
Back to Lecture Thumbnails
neonachronism

This requires moving items in memory, right? Wouldn't that introduce many of the same problems (with regards to communication and cache performance) that we're trying to avoid?

nba16235

@neonachronism, I think this slide basically just focus on how we store the data. The 2D layout is the ordinary one but not fully utilizes the cache capacity, while the 4D layout allows the blocked assignment to align with the blocked data layout, thus improves the cache performance.

Split_Personality_Computer

It's important to remember that this whole 4D array concept is still just an abstraction; all it's saying is that you should try to order memory in a way where items that are accessed together are close to each other. Perhaps a cleaner way to solve this problem would be to have a 2D array of structs where each struct is one block; this way the design is easier to visualize.