是否可以使 CLR JIT 在 WP7 中使用 C# 中的 SIMD?
比如说,如果我想在 Windows Phone 7 上乘以 4 个浮点数,是否有某种方法可以用 C# 编写它,以便 CLR JIT 使用 SIMD 指令对其进行优化?我正在尝试从我的 WP7 手机中获得更多计算密集型应用程序的性能。
我有一台 HTC 7 Trophy,配备 Snapdragon 处理器,支持 NEON(高级 SIMD)指令集和 VFPv3 浮点扩展。我只是想找出如何利用这些。
If I have, say, 4 floating point numbers that I want to multiply on Windows Phone 7, is there some way that I can write this in C# so that the CLR JIT will optimise this with an SIMD instruction? I'm trying to get more performance out of my WP7 phone for a very calculation intensive app.
I have an HTC 7 Trophy with a Snapdragon processor which supports the NEON (Advanced SIMD) instruction set and VFPv3 floating-point extensions. I'm just trying to find out how I can make use of these.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来 SIMD 支持已添加到 Windows Phone 'Mango' http://blogs.msdn.com/b/abhinaba/archive/2011/04/10/simd-support-in-netcf.aspx。
It seems that SIMD support is added to Windows Phone 'Mango' http://blogs.msdn.com/b/abhinaba/archive/2011/04/10/simd-support-in-netcf.aspx.
不幸的是没有。您必须依赖平台开发人员所做的事情(内核本身可能被构建为使用任何内置 FPU)。如果内核没有使用 NEON 指令,那么即使有处理器级别的支持,您也很不幸。您无法在 Windows Phone 上 P/Invoke,因此除非手机中内置的 JITter 正在为您拨打这些电话,否则您无法更改它。
Unfortunately no. You have to rely on what the platform developers did (the kernel itself may be built to use any built-in FPU). If the kernel isn't making use of NEON instructions, you're out of luck, even if there is support at the processor level. You cannot P/Invoke on Windows Phone, so unless the JITter already built into the phone is making those calls for you, you have no way to alter it.