c# - 从 Microsoft .net 调用单声道 c# 代码?

标签 c# compiler-construction mono

我有一些用 c# 编写的神经网络代码,可以从使用 SIMD 中获益支持。 Mono 2.2刚刚出来支持 SIMD 但微软的 c# 还不支持这个。对我的 c# 设置感到满意,我想知道我是否可以为该作品编写一个单声道的库并从 .net 调用它。

编辑: 我想我真正想知道的是可以编译 mono简化为 DLL 之类的东西,然后我可以从 dotnet 调用它。我听说Miguel de Icazapodcast 上说对于 iphone,mono 编译器将允许他们编译为 moonlight 的 exe,因此它没有违反 iphone 的服务条款,这让我想到你还能编译成什么。

我在另一个播客节目中听到了 Miguel de Icaza Herding Code Episode 28假设您可以使用单声道编译器编译为 exe 而不仅仅是中间代码。这意味着什么?

这激起了我的好奇心,所以我想我会悬赏它。

最佳答案

来自 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.

据我了解,这意味着您可以编写使用 Mono.Simd 的代码,并且能够在 .Net 下运行它,但它不会比常规代码快多少,因为 .Net 运行时不会'目前还支持 SIMD。

关于c# - 从 Microsoft .net 调用单声道 c# 代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/476486/

相关文章:

c# - .NET Core 中的 'System.Diagnostics' 和 nix*es 上的 Mono 中不存在“事件”命名空间

c# - 在单声道 3.2.8 Ubuntu Server 14 上使用 HttpWebRequest

c# - 使用 JSON.net 序列化 Dictionary<int,object>?

c# - 我可以在 Entity Framework 6 中制作全局查询过滤器吗?通过 OnModelCreating?

c# - 我的 Controller 方法是异步执行的吗?

java - 堆栈由编译器或操作系统/架构创建

c# - 是否可以在 C# 中简化嵌套泛型?

Objective-C 属性赋值返回赋值?

c - Solaris cc 是否在可执行文件中嵌入了不同编译的不同信息?

c# - 尝试导入库 (DLLImport) 获取 System.DLLNotFoundException