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 man is the prisoner of his power. A topical memory makes him an almanac; a talent for debate, disputant; skill to get money makes him a miser, that is, a beggar. Culture reduces these inflammations by invoking the aid of other powers against the dominant talent, and by appealing to the rank of powers. It watches success.”
—Ralph Waldo Emerson (18031882)
“While you are divided from us by geographical lines, which are imaginary, and by a language which is not the same, you have not come to an alien people or land. In the realm of the heart, in the domain of the mind, there are no geographical lines dividing the nations.”
—Anna Howard Shaw (18471919)