Allocating Memory Aligned To Cache Lines
It would be beneficial to allocate memory aligned to cache lines. If an array is partitioned for more than one thread to operate on, having the sub-array boundaries unaligned to cache lines could lead to performance degradation. Here is an example to allocate memory (double array of size 10) aligned to cache of 64 bytes.
#includeRead more about this topic: Data Structure Alignment
Famous quotes containing the words memory and/or lines:
“A work which is not here: a covenant
Twill be between us; but, whatever fate
Befal thee, I shall love thee to the last,
And bear thy memory with me to the grave.”
—William Wordsworth (17701850)
“Child of Light! thy limbs are burning
Through the vest which seems to hide them;
As the radiant lines of morning
Through the clouds ere they divide them;
And this atmosphere divinest
Shrouds thee wheresoeer thou shinest.”
—Percy Bysshe Shelley (17921822)