c# - Using SIMD in a CLR C++ library -


c# , visual basic , .net clr excellent development environments user interfaces , line-of-business applications, etc.

however, i've been writing lot of code execution timings go around o(n^3): n > 1000, , in couple of places, higher that. these loops read 1 large array, little math , make 5 or 6 tests, , write result second array of identical size.

most of code ported intel fortran programs, in order bring them 64-bit world. i've noted without auto-vectorization of code, execution times slower. .net has no support use of simd operations found on every intel processor sold today.

since functions written in tight algorithm can ported skilled programmer, thought asking programmer port code c++ clr library might approach.

  • is possible c++ library auto-vectorized , presents clr interface c#/vb program call?
  • if no, workarounds exist? com interface 1 such workaround?
  • if yes, form have take?

sure, no problem. c++/cli class library project gives way write managed wrapper, ref class, can directly call native c++ code. such class directly usable managed code.

vs2012 or higher required auto-vectorization , auto-parallelization in native c++ code. designing interop layer number of transitions managed unmanaged code , minimized can important. in other words, don't copy single double value @ time.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -