Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there still any development on SIMD in Mono?

Tags:

c#

mono

simd

sse

I want to know if there has been/is any development on Mono.SIMD (or SIMD-support in general inside Mono) ever since it came out 5(!) years ago. I personally think this was a great step in improving speed for c#. However, I've used it for some time now and I'm feeling that Mono.SIMD is falling behind, as lots of functions are missing.

Some of the problems i'm facing include:

  1. The lack of a dot product, which can be implemented in 1 operation ever since SSE4.1 (which came out in 2006 and is now supported on 70% of the computers), while it takes 3 operations inside Mono.SIMD. In addition to this, the programmer has to write a function for every version of SSE, a job the JIT should do (since it is created specifically to let the programmer stop worrying about CPU-versions).
  2. No possibility of adding/multiplying Vector4f and Vector4i (or any other vectors that are different).
  3. No proper casting of vectors (the bits don't seem change at all, so the results are very strange and almost entirely useless).
  4. Lots of other function which are not included, such as rounding.

So, does anyone know if something is happening with Mono.SIMD or SIMD-support in general(and if so, what)? Or, alternatively, does anyone know a good solution for any of the problems mentioned?

like image 296
me me Avatar asked Oct 22 '13 13:10

me me


2 Answers

AFAIR the development is not in progress. The project is open source and the machinery is not too complicated, so one can improve current implementation. I considered adding some instructions, but then, as usual, there was not enough time to do that (also the application was eventually canceled). You may be interested in looking at the thread: http://lists.ximian.com/pipermail/mono-devel-list/2012-February/038632.html

like image 78
konrad.kruczynski Avatar answered Oct 04 '22 13:10

konrad.kruczynski


The other answer was made a few years ago. Thus, I wrote this one to list all the necessary bits for 2018 readers.

When Mono started to support SIMD, they were requested by Unity guys,

http://tirania.org/blog/archive/2008/Nov-03.html

It seemed to be in a hurry, so the overall API design still has room to grow.

Microsoft started to work on a more complete and standardized SIMD enabled library, and that was a few years later in 2014,

https://www.infoq.com/news/2014/04/SIMD-CLR

Therefore, attention should be paid to this newer option.

Microsoft open sourced .NET Core in 2015, and since then the SIMD work has been accelerated.

It was in last year that Mono 5.0 announced the obsoleteness of Mono.SIMD in favor of Microsoft's work,

http://www.mono-project.com/docs/about-mono/releases/5.0.0/ (SIMD Acceleration support section).

like image 39
Lex Li Avatar answered Oct 04 '22 15:10

Lex Li