Content deleted Content added
scatter vs gather algorithm... I think this can be explained better |
|||
Line 29:
Data structures which rely heavily on [[pointer chasing]] can often produce poor locality of reference, although sorting can sometimes help.
==== random reads vs random writes ====▼
== Approaches ==
[[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 where this is handled by random reads + sequential writes [[gather (vector addressing)|gather]] , or sequential reads plus random writes [[scatter (vector addressing)|scatter]]. The scatter approach may bypass the need for caching since a [[processing element]] may dispatch writes in a 'fire and forget' manner. However, it may be harder to parallelise since there is no guarantee the writes do not interact. As such the gather approach is more common for [[gpgpu]] programming.
In the past, [[forward texture mapping]] attempted to handle the randomness with 'writes' (sequentially reading textures), but the inverse approach is now more widespread.
|