[#absl-PrefetchToLocalCacheNta]
= xref:absl.adoc[absl]::PrefetchToLocalCacheNta
:relfileprefix: ../
:mrdocs:

Moves data into the L1 cache before it is read, or &quot;prefetches&quot; it&period;

== Synopsis

Declared in `&lt;absl&sol;base&sol;prefetch&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
PrefetchToLocalCacheNta(void const* addr);
----

== Description

This function is identical to `PrefetchToLocalCache()` except that it has non&hyphen;temporal locality&colon; the fetched data should not be left in any of the cache tiers&period; This is useful for cases where the data is used only once &sol; short term, for example, invoking a destructor on an object&period;

Incorrect or gratuitous use of this function can degrade performance&period; Use this function only when representative benchmarks show an improvement&period;

Example&colon;

template &lt;typename Iterator&gt; void DestroyPointers(Iterator begin, Iterator end) &lcub; size&lowbar;t distance &equals; std&colon;&colon;min(8U, bars&period;size())&semi;

int dist &equals; 8&semi; auto prefetch&lowbar;it &equals; begin&semi; while (prefetch&lowbar;it !&equals; end &amp;&amp; &hyphen;&hyphen;dist&semi;) &lcub; absl&colon;&colon;PrefetchToLocalCacheNta(&ast;prefetch&lowbar;it&plus;&plus;)&semi; &rcub; while (prefetch&lowbar;it !&equals; end) &lcub; delete &ast;begin&plus;&plus;&semi; absl&colon;&colon;PrefetchToLocalCacheNta(&ast;prefetch&lowbar;it&plus;&plus;)&semi; &rcub; while (begin !&equals; end) &lcub; delete &ast;begin&plus;&plus;&semi; &rcub; &rcub;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *addr*
| The address of the memory to prefetch&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
