开发者

prefetch to a specific level of cache

GCC has __builtin_prefetch to support prefetching. My question is how can I prefetch the data to a specific level of cache. For exa开发者_Go百科mple, I only would like to prefetch the data to L2 cache instead of all the way to L1 cache.


__builtin_prefetch has three arguments; the third one is the cache level. AFAICT, this has only effect on SSE, where it generates prefetchnta, prefetcht1, prefetcht2, prefetcht3, respectively.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜