Content deleted Content added
Line 56:
In a [[gather (vector addressing)|gather]] memory access pattern, reads are randomly addressed or indexed, whilst the writes are sequential (or [[#LINEAR|linear]]). An example is found in [[inverse texture mapping]], where data can be written out linearly across scanlines, whilst random access texture addresses are calculated per pixel. Compared to [[#SCATTER|scatter]], the disadvantage is that caching (and bypassing latencies) is now essential for reads, however it is easier to parallelise since the writes are guaranteed to not overlap. As such the gather approach is more common for [[gpgpu]] programming<ref name="gpu gems"/>, where the massive threading (enabled by parallelism) is used to hide read latencies.
<ref name = "gpu gems">{{cite web|title = GPU gems|url=https://books.google.co.uk/books?id=lGMzmbUhpiAC&pg=PA51&lpg=PA51&dq=scatter+memory+access+pattern&source=bl&ots=nwKeqfQHeV&sig=lsFTC52P_Fu7EU1-JIlwqDdZozg&hl=en&sa=X&ved=0ahUKEwjtxZOHxqXNAhWEOxoKHWPsAJgQ6AEISTAG#v=onepage&q=scatter%20memory%20access%20pattern&f=false}}deals with 'scatter memory access patterns' and 'gather memory access patterns' in the text</ref>
=== Combined scatter - gather pattern ===
A traversal may gather data from one source, perform some computation in local or on chip memory, and scatter results elsewhere. This is essentially the full operation of a [[GPU]] pipeline when performing [[3D rendering]]- gathering indexed vertices and textures, and scattering shaded pixels. Rasterization of opaque primitives using a depth buffer is 'commutative', allowing reordering, which facilitates parallel execution. In the general case synchronisation primitives would be needed.
=== Random ===
|