3

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.

Curyous
  • 8,716
  • 15
  • 58
  • 83
  • 1
    I would be _shocked_ if this were possible. – SLaks Mar 21 '11 at 21:53
  • What specific WP7 device do you have? A lot of "mobile applications processors" have DSP co-processors, which have a lot in common with SIMD. – Ben Voigt Mar 21 '11 at 22:06
  • No one on the Microsoft forums seems to know either. http://social.msdn.microsoft.com/Forums/en/windowsphone7series/thread/b6da91a4-cde6-44a5-8772-1148728c5748 I'll ask the Phone MVPs. – Ben Voigt Mar 22 '11 at 00:34

2 Answers2

4

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.

Tomas Voracek
  • 5,886
  • 1
  • 25
  • 41
  • It's worth noting that it's only "targeted" support, meaning some (and only some) built-in types will get SIMD support, but no user-defined types will take advantage of it. – ctacke Jun 05 '11 at 15:19
  • I added some suggestions for more general case, non Xna-specific SIMD intrinsics in the comments of that blog post. – Jeremy Bell Aug 04 '11 at 19:49
2

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.

ctacke
  • 66,480
  • 18
  • 94
  • 155