Visual Studio 是否支持数据缓存操作?
阅读一些有关低延迟计算的精彩演示。他们参考了 IBM 的 XL C/C++ 编译器数据缓存操作 __dcbt(数据缓存块触摸)用于其 cell 编译器。该操作将一块内存加载到 L1 缓存中。
Visual Studio(或 G++ 或 Intel)是否对 Intel 处理器具有类似的功能?如果是这样,并且解决方案是特定于平台的(即仅限 Windows 或 *nix),请这么说。
Reading through some great presentations on low latency computing. They had a reference to IBM's XL C/C++ compiler data cache operation __dcbt (Data Cache Block Touch) for their cell compiler. The operation loads a block of memory into L1 cache.
Does Visual Studio (or G++ or Intel) have similar functionality for Intel Processors? If so and the solution is platform specific (i.e. Windows or *nix only) please say so.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,Visual Studio 支持所有 SSE 和 MMX 内部操作。这里简要描述缓存控制操作:http://www.tommesani.com/SSECacheabilityControl.html
并在英特尔指令集参考中详细解释。
Microsoft 在 MSDN 上记录了其缓存控制的内部函数 。尽管它们看起来像函数,但编译器实际上将它们归结为适当的硬件指令。请务必查看它们的 SSE1 和 SSE2 缓存控制指令,它们在不同的类别下列出(请参阅页面左侧的扩展树)。
与
dcbt
等效的 x86 是_mm_prefetch
。没有与dcbz
直接等效的东西,但最接近的类似物是_mm_stream_si128
。我相信 GCC 使用相同的内部名称(因为它们取自英特尔编译器)。
Yes, Visual Studio supports all the SSE and MMX intrinsic operations. The cache control operations are briefly described here: http://www.tommesani.com/SSECacheabilityControl.html
and explained at length in Intel's instruction set reference.
Microsoft documents their intrinsics for cache control at MSDN. Although they look like functions, the compiler actually boils them down to the appropriate hardware instruction. Be sure to look at both their SSE1 and SSE2 cache control instructions, which they list under separate categories (see the expanding tree on the left side of their page).
The x86 equivalent to
dcbt
is_mm_prefetch
. There is no direct equivalent todcbz
, but the closest analogue is_mm_stream_si128
.I believe GCC uses the same intrinsic names (as they are taken from the Intel compiler).