Memory access pattern: Difference between revisions

Content deleted Content added
Line 35:
[[Data oriented design]] is an approach intended to maximise the locality of reference, by organising data according to how it is traversed in various stages of a program, contrasting with the more common [[object oriented]] approach.
 
=== random reads vs random writes ====
 
An task may have some inherent randomness, with alternative solutions for handling this either through reads or writes, with scatter or gather alternatives. These choices appear in GPGPU and graphics applications:-
Line 41:
==== sequential reads with scatter ====
 
The scatter approach may bypassplace theless needload foron a cache cachinghierarchy since a [[processing element]] may dispatch writes in a 'fire and forget' manner (bypassing a cache altogether), whilst prefetching (or even using DMA) for it's source data. However, it may be harder to parallelise since there is no guarantee the writes do not interact.
 
In the past, [[forward texture mapping]] attempted to handle the randomness with 'writes' (sequentially reading textures). The [[playstation 2]] console used conventional inverse texture mapping, but handled any randomness 'on-chip' using EDRAM, whilst data from main memory was fed by DMA. (hence it's lack of support for indexed primitives, and need to explicitly upload a limited number of textures, managed up-front in the [[display list]]).
In the past, [[forward texture mapping]] attempted to handle the randomness with 'writes', whilst sequentially reading source texture information.
 
In the past, [[forward texture mapping]] attempted to handle the randomness with 'writes' (sequentially reading textures). The [[playstation 2]] console used conventional inverse texture mapping, but handled any randomness 'on-chip' using EDRAM, whilst 3D model (and a lot of texture data) from main memory was fed by DMA. (henceThis is why it's lacklacked of support for indexed primitives, and needsometimes needed to explicitly upload a limited number ofmanage textures, managed'up up-front' in the [[display list]]).
 
==== gather with sequential writes ====