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:
“Mild brown eyes beckon me to the past, but memory provides no clue.”
—Mason Cooley (b. 1927)
“Was seizd by the spirit that trails in the lines underfoot,
The rim, the sediment that stands for all the water and all the land
of the globe.
Fascinated, my eyes reverting from the south, dropt, to follow those slender windrows,
Chaff, straw, splinters of wood, weeds, and the sea-gluten,
Scum, scales from shining rocks, leaves of salt-lettuce, left by the tide,”
—Walt Whitman (18191892)