Using SSE in c# is it possible?

The upcoming Mono 2.2 release will have SIMD support. Miguel de Icaza blogged about the upcoming feature here, and the API is here.

Although there will be a library that will support development under Microsoft's .NET Windows runtime, it will not have the performance benefits that you are looking for unless you run the code under the Mono runtime. Which might be doable depending on your circumstances.

Update: Mono 2.2 is released


Can C# explicitly make an SSE call?

No. C# cannot produce inline IL much less inline x86/amd64 assembly.

The CLR, and more specifically the JIT, will use SSE if it's available removing the need to force it in most circumstances. I say most because I'm not an SSE expert and I'm sure that there are cases where it could be beneficial and the JIT does not make the optimization.


SIMD for .NET will be available in the near future. RyuJIT (the next-generation JIT compiler for .NET) required for this feature ATM.

You should use Microsoft.Numerics.Vectors.Vector<T> class from Microsoft.Bcl.Simd package to take advantage of this feature. Sample code here.

Tags:

C#

Sse