如何在C#中使用Assembly来计算欧式距离 [英] How to use assembly in c# to calculate euclidean distance
问题描述
如何在Visual Studio的C#代码中放置一些汇编指令?
我真的需要一个我受够了并且不明白该怎么办的帮助.
现在,我正在使用c#上的一个非常简单的代码来计算欧几里德距离. O想要使用simd对其进行优化,而我的处理器是Intel.我已经阅读了更多有关此的内容,但实际上我不知道从哪里可以得到simd的标准代码.
当我得到它时,如何将它放入我的C#代码中,因为许多人告诉我simd将在汇编中.另外,当我将其放入代码中时,如何使其在我的代码上起作用以及如何调用它.我确实需要帮助,感谢您的所有答复,但我确实无法获得所需的东西
感谢
How can I put some assembly instruction in a c# code on visual studio?
I really need a help I''m fed up and couldn''t understand what to do.
Now I''m working on a very simple code on c# for computing euclidean distance. O want to optimize it using simd and my processor is intel. I''ve read more about this but really I didn''t know from where can I got a standard code for simd.
When I got it how can I put it in my c# code since many people told me that simd will be in assembly. Also when I put it in my code how can I make it work on my code and how will I call it. I really need help and thanks for all replies but I really couldn''t get what I need
thanks
推荐答案
在这里,使用非托管代码和汇编器在C# [ ^ ]
如果真的,真的,真的必须看来这几乎是可能的.
看看此 [
If you really, really, really must it seems that it is sort of almost nearly possible.
Take a look at this[^] article for how.
Well! I did say nearly and almost didn''t I?
这篇关于如何在C#中使用Assembly来计算欧式距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!