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:
“All vital truth contains the memory of all that for which it is not true.”
—D.H. (David Herbert)
“When first my lines of heavenly joys made mention,
Such was their luster, they did so excel,
That I sought out quaint words and trim invention;
My thoughts began to burnish, sprout, and swell,
Curling with metaphors a plain intention,
Decking the sense as if it were to sell.”
—George Herbert (15931633)