Calling mono c# code from Microsoft .net?

前端 未结 3 1951
醉梦人生
醉梦人生 2020-12-17 01:02

I have some neural net code written in c# that would benefit from using SIMD support. Mono 2.2 just came out that supports SIMD but Microsoft\'s c# does not support this yet

3条回答
  •  太阳男子
    2020-12-17 01:07

    From Miguel de Icaza's blog:

    Our library provides C# fallbacks for all of the accelerated instructions. This means that if your code runs on a machine that does not provide any SIMD support, or one of the operations that you are using is not supported in your machine, the code will continue to work correctly.

    This also means that you can use the Mono.Simd API with Microsoft's .NET on Windows to prototype and develop your code, and then run it at full speed using Mono.

    As I understand it, this means that you can write code that uses Mono.Simd, and will be able to run it under .Net, but it won't be any faster than regular code, because the .Net runtime doesn't support SIMD yet.

提交回复
热议问题