Skip to content

SIMD StoreAlignedNonTemporal vs StoreAligned help/question #95386

Closed Answered by gfoidl
dbriard asked this question in Q&A
Discussion options

You must be logged in to vote

be read/written by the same CPU Core, using the Non-Temporal version should theoretically have no side effects, and the StoreFence might not be necessary, correct?

Imagine empty caches and you load the data as usual (i.e. temporal load). Then it goes RAM -> L3 -> L2 -> L1 -> cpu.
The you perform a non-temporal store (cpu -> RAM), and after that the same cpu needs the data again, so it will try to read from L1, and if it's there uses it w/o noticing that the data changed in the meantime.

So for "correct?" it's not in every case, especially if the same cpu reads the data again.

Non-temporal stores can be used when data is read once, then written back to memory bypassing the caches in a wo…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@dbriard
Comment options

@gfoidl
Comment options

Answer selected by dbriard
@dbriard
Comment options

@tannergooding
Comment options

@dbriard
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants