Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Non-temporal stores

nupshur
Beginner
455 Views

Hi,

Is there some way to indicate to the compiler that nontemporal stores should be used for an array? I have several large arrays that I construct for the purpose of later passing them off to the MKL library functions, so I don't want these arrays wasting valuable L1 cache space.I know that there are instrinsics for doing non-temporal stores, but it seems inefficient to do it element-by-element, since there's overhead associated with putting things into appropriate registers.

Thanks,

~Nafis

0 Kudos
2 Replies
TimP
Honored Contributor III
455 Views
#pragma vector nontemporal
requires a following aligned for() loop to use nontemporal stores. I would have thought the usual concern about cache capacity would relate to L2. If your data don't overflow L2, your MKL functions might perform better when you allow the data to remain in cache.
0 Kudos
nupshur
Beginner
455 Views
i was aware of this pragma, but does it help in situations where vectorization cannot be performed? also, my concern over L1 arises from the fact that there is one "read-only" array being used to fill the other "write-only" arrays for MKL processing. i want the read-only array to remain in the cache, instead of having its entries kicked out every time I do a write.
0 Kudos
Reply