Using SSE in c# is it possible?

后端 未结 10 1961
借酒劲吻你
借酒劲吻你 2020-11-29 11:02

I was reading a question about c# code optimization and one solution was to use c++ with SSE. Is it possible to do SSE directly from a c# program?

10条回答
  •  醉话见心
    2020-11-29 11:57

    Sure you can (the more important question is - why would you? Just leave it to the runtime; that's its job).

    C# lets you map a delegate to a memory address. That memory address can contain raw assembly codes. You can read more on Michael Giagnocavo's blog.

    Although I have not tried myself, it may be possible to use Marshal.GetDelegateForFunctionPointer as well.

提交回复
热议问题