Memory access pattern: Difference between revisions

Content deleted Content added
m References: Removed stub tag
Line 72:
 
''[[Locality of reference]]'' refers to a property exhibited by ''memory access patterns''.
A programmer will ''change'' the memory access pattern (by reworking algorithms) to ''improve'' the locality of reference
<ref>{{cite web|title=optimize-data-structures-and-memory-access-patterns-to-improve-data-locality|url=https://software.intel.com/en-us/articles/optimize-data-structures-and-memory-access-patterns-to-improve-data-locality}}</ref>, ''and'' to increase potential for parallelism<ref name="gpu gems2"/>.
A programmer or system designer may create frameworks or abstractions (e.g [[C++ templates]] or [[higher-order functions]]) that encapsulate a specific memory access pattern.
Line 78:
<ref>{{cite web|title=Multi-Target Vectorization With MTPS C++ Generic Library|url=http://www.metz.supelec.fr/metz/recherche/publis_pdf/Supelec753.pdf}}a C++ template library for producing optimised memory access patterns</ref>
 
Different considerations for memory access patterns appear in parallelism beyond locality of reference, namely the separation of reads and writes. (eE.g.: even if the reads and writes are 'perfectly' local, it can be impossible to parallelise due to dependancies; separating the reads and writes into separate areas yields a ''different'' memory access pattern, maybe initially appear worse in pure ''locality'' terms, but desirable to leverage modern parallel hardware.)
 
Locality of reference may also refer to individual variables (e.g. the ability of a compiler to cache them in registers), whist the term memory access pattern only refers to data held in an indexable memory (especially [[main memory]]).
 
== See also ==