<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic .NET Interop and the Math Kernel Library LAPACK Routines in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815352#M4263</link>
    <description>Hello,&lt;BR /&gt;You do not need to write wrappers. Please see examples of using MKL in C#:&lt;BR /&gt;&lt;A href="http://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program/"&gt;http://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program/&lt;/A&gt;&lt;BR /&gt;You need not also to build custom dll if you use MKL 10.3.&lt;BR /&gt;Thanks,&lt;BR /&gt;Vladimir&lt;BR /&gt;</description>
    <pubDate>Fri, 28 Jan 2011 08:37:31 GMT</pubDate>
    <dc:creator>Vladimir_Koldakov__I</dc:creator>
    <dc:date>2011-01-28T08:37:31Z</dc:date>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815350#M4261</link>
      <description>I am building a program in C# and would like to use the DSYEV LAPACK routine within it. I have built a wrapper DLL in Fortran (code is below) linked against the MKL sequentially. This DLL is then linked into the C# via the System.Runtime.InteropServices.DllImport attribute.&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Additionally, due to the differences between multi-dimensional arrays in C# and Fortran, I have added two additional methods to convert a 2-dimensional array into a 1-dimensional one and vice versa.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The Fortran DLL compiles without a problem, but the DSYEV function within C# is not functioning properly. The INFO parameter returns as -1, so a link seems to have been made, but the arrays A and W are returning with only 1 element when A should have N*N elements (to be reconverted back into 2D array) and W should have N elements.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;More information on the DSYEV subroutine can be found &lt;A href="http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/mklxe/mkl_manual_win_mac/lse/functn_syev.htm"&gt;here&lt;/A&gt;.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Basically, my question is: what am I doing wrong?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;INTEROP DECLARATION:&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;[csharp]public static extern void DSYEV_INTEROP(string JOBZ, string UPLO, int N, ref double[] A, int LDA, ref double[] W, ref double[] WORK, int LWORK, ref int INFO);[/csharp]&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;FORTRAN DLL:&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;[fortran]SUBROUTINE DSYEV_INTEROP(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO)

    !DEC$ ATTRIBUTES DLLEXPORT::DSYEV_INTEROP
    !DEC$ ATTRIBUTES STDCALL::DSYEV_INTEROP
    !DEC$ ATTRIBUTES ALIAS:"DSYEV_INTEROP"::DSYEV_INTEROP

    !DEC$ ATTRIBUTES VALUE::JOBZ
    !DEC$ ATTRIBUTES VALUE::UPLO
    !DEC$ ATTRIBUTES VALUE::N
    !DEC$ ATTRIBUTES REFERENCE::A
    !DEC$ ATTRIBUTES VALUE::LDA
    !DEC$ ATTRIBUTES REFERENCE::W
    !DEC$ ATTRIBUTES REFERENCE::WORK
    !DEC$ ATTRIBUTES VALUE::LWORK
    !DEC$ ATTRIBUTES REFERENCE::INFO

    CHARACTER(LEN=1), INTENT(IN) :: JOBZ, UPLO
    INTEGER, INTENT(IN) :: N, LDA, LWORK
    INTEGER, INTENT(OUT) :: INFO
    !REAL*8, DIMENSION(:,:), INTENT(INOUT) :: A
    REAL*8, POINTER, DIMENSION(:,:) :: A
    REAL*8, DIMENSION(:), INTENT(INOUT) :: W, WORK

    CALL dsyev(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO)

END SUBROUTINE DSYEV_INTEROP[/fortran]&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Jan 2011 15:08:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815350#M4261</guid>
      <dc:creator>bwhazel</dc:creator>
      <dc:date>2011-01-27T15:08:16Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815351#M4262</link>
      <description>Please check the first parameter first. the info == -1 points thatthe &lt;SPAN style="font-family: verdana, sans-serif;"&gt;&lt;I&gt;1&lt;/I&gt;&lt;/SPAN&gt;-th parameter had an illegal value.</description>
      <pubDate>Fri, 28 Jan 2011 07:19:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815351#M4262</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2011-01-28T07:19:15Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815352#M4263</link>
      <description>Hello,&lt;BR /&gt;You do not need to write wrappers. Please see examples of using MKL in C#:&lt;BR /&gt;&lt;A href="http://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program/"&gt;http://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program/&lt;/A&gt;&lt;BR /&gt;You need not also to build custom dll if you use MKL 10.3.&lt;BR /&gt;Thanks,&lt;BR /&gt;Vladimir&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Jan 2011 08:37:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815352#M4263</guid>
      <dc:creator>Vladimir_Koldakov__I</dc:creator>
      <dc:date>2011-01-28T08:37:31Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815353#M4264</link>
      <description>Many thanks for the responses, and apologies for my delayed reply! I am looking into this option for .NET. Is there a simple way of knowing which data types should be passed by reference or value?</description>
      <pubDate>Wed, 16 Feb 2011 15:37:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815353#M4264</guid>
      <dc:creator>bwhazel</dc:creator>
      <dc:date>2011-02-16T15:37:43Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815354#M4265</link>
      <description>by reference.&lt;DIV&gt;as an example, the Pardiso calling will be looks like&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;phase = 11;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;		Pardiso.pardiso (pt, ref maxfct, ref mnum, ref mtype, ref phase,&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;			ref n, a, ia, ja, idum, ref nrhs,&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;			iparm, ref msglvl, ddum, ddum, ref error);&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 16 Feb 2011 15:42:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815354#M4265</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2011-02-16T15:42:28Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815355#M4266</link>
      <description>I've tried the example in the download: the C# code is written. I am, however, experiencing some difficulty building the custom mkl.dll for the DSYEV routine.&lt;BR /&gt;&lt;BR /&gt;I am not using the makefile, but am using it as an example to follow. I first compiled the _fseeki64.c file as in the makefile using the Microsoft C compiler (I don't have the Intel one). I then tried a variation on the link command, having set additional environment variables for the MKL libraries and compiler libraries:&lt;BR /&gt;&lt;BR /&gt;MKLROOT=C:\Program Files (x86)\Intel\ComposerXE-2011\mkl\lib\intel64&lt;BR /&gt;OMPLIB=C:\Program Files (x86)\Intel\ComposerXE-2011\compiler\lib\intel64&lt;BR /&gt;&lt;BR /&gt;where each file was preceeded with the necessary environment variable:&lt;BR /&gt;&lt;BR /&gt;link /DLL /MACHINE:X64 /def:user.def _fseeki64.obj %MKLROOT%\mkl_intel_lp64_dll.lib %MKLROOT%\mkl_intel_thread_dll.lib %MKLROOT%\mkl_core_dll.lib %OMPLIB%\libiomp5md.lib msvcrt.lib user32.lib /out:mkl.dll&lt;BR /&gt;&lt;BR /&gt;All files are found, but then I get the error:&lt;BR /&gt;&lt;BR /&gt;LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup&lt;BR /&gt;mkl.dll : fatal error LNK1120: 1 unresolved externals&lt;BR /&gt;&lt;BR /&gt;Basically, what am I doing wrong?</description>
      <pubDate>Thu, 17 Feb 2011 15:53:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815355#M4266</guid>
      <dc:creator>bwhazel</dc:creator>
      <dc:date>2011-02-17T15:53:36Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815356#M4267</link>
      <description>may be You didn't set the MKLROOT?&lt;DIV&gt;I checked how it works.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;nmake ia32 MKLROOT=C:\APPS\Intel\MKL\10.2.7&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Microsoft  Program Maintenance Utility Version 8.00.50727.42&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Add path of the MKL libraries to the lib environment variable&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;   set lib=%MKLROOT%\ia32\lib;%lib%&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;MKL entries for custom dll&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Workaround for pardiso&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Microsoft  32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;_fseeki64.c&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Build MKL custom dll&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;   nmake mkl.dll MACHINE=IX86 MKL_LIB="mkl_intel_c_dll.lib mkl_intel_threa&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;d_dll.lib mkl_core_dll.lib" MSLIB=user32.lib&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Microsoft  Program Maintenance Utility Version 8.00.50727.42&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;   link /DLL /MACHINE:IX86 /def:user.def _fseeki64.obj mkl_intel_c_dll.lib&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;mkl_intel_thread_dll.lib mkl_core_dll.lib libiomp5md.lib user32.lib /out:mkl.dl&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;l&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Microsoft  Incremental Linker Version 8.00.50727.42&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; Creating library mkl.lib and object mkl.exp&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Add path of the mkl.dll and path of the MKL binaries to the path environment var&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;iable&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;   set path=c:\!!;%MKLROOT%\ia32\bin;%path%&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Build and run examples&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;   nmake /a dgemm.exe dgeev.exe dfti_d1.exe pardiso.exe vddiv.exe&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Microsoft  Program Maintenance Utility Version 8.00.50727.42&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Compile dgemm.cs&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;   csc .\dgemm.cs&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Microsoft  Visual C# 2005 Compiler version 8.00.50727.4927&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;for Microsoft  Windows  2005 Framework version 2.0.50727&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;Run dgemm example&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;   dgemm.exe&lt;/B&gt;&lt;/DIV&gt;....................&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Feb 2011 18:30:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815356#M4267</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2011-02-17T18:30:03Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815357#M4268</link>
      <description>Right - I've got it working! I didn't realise I could just link the provided DLLs rather than build a custom one from the static libraries!&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Many thanks for all the assistance!&lt;/DIV&gt;</description>
      <pubDate>Sun, 13 Mar 2011 15:34:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815357#M4268</guid>
      <dc:creator>bwhazel</dc:creator>
      <dc:date>2011-03-13T15:34:20Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815358#M4269</link>
      <description>&lt;PRE&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;PRE&gt;Hi,&lt;/PRE&gt;&lt;PRE&gt;I am using eigen values/vectors decomposition DSYEV in mkl for a university project and I need results to be reproductible.&lt;/PRE&gt;&lt;PRE&gt;I wrote a little wrapper (according to examples) to call DSYEV from C# :&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;namespace Eigen&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; class Solve&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; public double[,] decompo(double[,] A)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; int lwork = -1;&lt;/P&gt;&lt;P&gt; int n = A.GetLength(0);&lt;/P&gt;&lt;P&gt; int lda = n;&lt;/P&gt;&lt;P&gt; double[] A_bis = new double[n * n];&lt;/P&gt;&lt;P&gt; double[] w = new double&lt;N&gt;;&lt;/N&gt;&lt;/P&gt;&lt;P&gt; for (int i = 0; i &amp;lt; n; i++)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; int cte = i * n;&lt;/P&gt;&lt;P&gt; for (int j = 0; j &amp;lt; n; j++)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; A_bis[cte + j] = A[j, i];&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;
&lt;P&gt; lwork = -1;&lt;/P&gt;&lt;P&gt; double[] work_1 = new double[1];&lt;/P&gt;&lt;P&gt; int info = LAPACK_mkl.dsyev('V', 'U', n, A_bis, lda, w, work_1, lwork);&lt;/P&gt;&lt;P&gt; lwork = (int)work_1[0];&lt;/P&gt;&lt;P&gt; double[] work = new double[lwork];&lt;/P&gt;&lt;P&gt; info = LAPACK_mkl.dsyev('V', 'U', n, A_bis, lda, w, work, lwork);&lt;/P&gt;&lt;P&gt; double[,] res2 = new double[n, n + 1];&lt;/P&gt;&lt;P&gt; for (int i = 0; i &amp;lt; n; i++)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; res2[i, 0] = w&lt;I&gt;;&lt;/I&gt;&lt;/P&gt;&lt;P&gt; for (int j = 0; j &amp;lt; n; j++)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; res2[i, j + 1] = A_bis[i + j * n];&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; GC.Collect(0);&lt;/P&gt;&lt;P&gt; return res2;&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;namespace mkl&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; public sealed class LAPACK_mkl&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; private LAPACK_mkl() { }&lt;/P&gt;&lt;P&gt; public static int dsyev(char jobz, char uplo, int N, double[] A, int LDA, double[] w, double[] work, int lwork)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; LAPACKNative.kmp_set_warnings_off();&lt;/P&gt;&lt;P&gt; int num = Environment.ProcessorCount;&lt;/P&gt;&lt;P&gt; LAPACKNative.omp_set_num_threads(ref num);&lt;/P&gt;&lt;P&gt; int info = -1;&lt;/P&gt;&lt;P&gt; LAPACKNative.dsyev(ref jobz, ref uplo, ref N, A, ref LDA, w, work, ref lwork, ref info);&lt;/P&gt;&lt;P&gt; return info;&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;
&lt;P&gt; /** LAPACK native declarations */&lt;/P&gt;&lt;P&gt; [SuppressUnmanagedCodeSecurity]&lt;/P&gt;&lt;P&gt; internal sealed class LAPACKNative&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; [DllImport("libiomp5md", EntryPoint = "omp_set_num_threads")]&lt;/P&gt;&lt;P&gt; internal static extern void omp_set_num_threads(ref int num);&lt;/P&gt;&lt;P&gt; [DllImport("libiomp5md", EntryPoint = "kmp_set_warnings_off")]&lt;/P&gt;&lt;P&gt; internal static extern void kmp_set_warnings_off();&lt;/P&gt;&lt;P&gt; [DllImport("mkl", EntryPoint = "DSYEV", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]&lt;/P&gt;&lt;P&gt; internal static extern void dsyev(ref char jobz, ref char uplo, ref int n, double[] A, ref int lda, double[] w, double[] work, ref int lwork, ref int info);&lt;/P&gt;&lt;P&gt; private LAPACKNative()&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; kmp_set_warnings_off();&lt;/P&gt;&lt;P&gt; int num = Environment.ProcessorCount; &lt;/P&gt;&lt;P&gt; omp_set_num_threads(ref num); &lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;I red something about memory alignment and 16-byte boundaries... does this apply here ?&lt;/P&gt;

&lt;P&gt;Thank you for any answer or comment on my code&lt;/P&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Apr 2011 10:26:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815358#M4269</guid>
      <dc:creator>trombif</dc:creator>
      <dc:date>2011-04-12T10:26:07Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815359#M4270</link>
      <description>Yes, _aligned_malloc(size,16) rather than the default new for the arrays passed to MKL should improve numerical consistency and performance, at least on 32-bit Windows. On 64-bit Windows, perhaps new would default to 16-byte alignment.&lt;BR /&gt;I've seen an assertion that Intel C++ new would observe alignments specified by _declspec(align(16)). The &lt;A href="http://msdn.microsoft.com/en-us/library/83ythb65%28v=vs.80%29.aspx"&gt;Microsoft page&lt;/A&gt; states clearly that you must use _declspec, with _declspec(align(32)) preferred for improved caching and compatibility with AVX.&lt;BR /&gt;You omitted needed header definitions, which I wouldn't consider obvious.&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Apr 2011 13:13:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815359#M4270</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-04-12T13:13:27Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815360#M4271</link>
      <description>First, thank you for the quick reply !&lt;DIV&gt;As I mentionned in my previous post, this is C# code... and_aligned_malloc you are talking about is C++ (am I wrong?). Is there such a command, or a trick to work around and create arrays which are16-byte aligned, for C# ?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;And here is a list of definitions :&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;using System;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;using System.Collections.Generic;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;using System.Linq;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;using System.Text;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;using System.Security;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;using System.Runtime.InteropServices;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;using mkl;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thank you&lt;/DIV&gt;</description>
      <pubDate>Tue, 12 Apr 2011 14:33:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815360#M4271</guid>
      <dc:creator>trombif</dc:creator>
      <dc:date>2011-04-12T14:33:46Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815361#M4272</link>
      <description>_aligned_malloc is probably simply a wrapper around malloc. The usual technique is to allocate a region, say 12 bytes longer than the data size (as you should be able to depend on 4-byte aligned malloc). Then you use the sub-region beginning at the first 16-byte aligned address in that region. If you free the region, you must free the entire region, including the bytes you skip. You shouldn't need a loop to find the aligned address, such as some of the web search&lt;A href="http://stackoverflow.com/questions/1951290/memory-alignment-of-classes-in-c"&gt; references on c# data alignment&lt;/A&gt; show. You simply add 15 to the base pointer and mask off the low order bits, or find the remainder %16 of the base pointer and figure out how far up the region to start. For AVX, you probably want the extra 28 bytes, add 31 and mask to 32-byte alignment. I'm not fluent in C#, so should shut up now.</description>
      <pubDate>Tue, 12 Apr 2011 16:27:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815361#M4272</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-04-12T16:27:27Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815362#M4273</link>
      <description>I discussed with a colleague who uses C#, and we suggest you use the mkl_malloc() function rather than c# new.</description>
      <pubDate>Tue, 12 Apr 2011 18:30:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815362#M4273</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-04-12T18:30:45Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815363#M4274</link>
      <description>I am not fluent in C# either: the main resaon I have chosen C# instead of C++ is memory management, and it occurs to me that it becomes indeed more complex ...&lt;DIV&gt;Do you have a code example on how to use mkl_malloc() in C# ?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thank you very much&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 Apr 2011 11:37:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815363#M4274</guid>
      <dc:creator>trombif</dc:creator>
      <dc:date>2011-04-13T11:37:02Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815364#M4275</link>
      <description>No, I could get from my colleague an example of ipp malloc in C#. It should work like a plain malloc() with the addition of the alignment argument (by value).</description>
      <pubDate>Wed, 13 Apr 2011 14:12:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815364#M4275</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-04-13T14:12:31Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815365#M4276</link>
      <description>That would be great !</description>
      <pubDate>Wed, 13 Apr 2011 14:44:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815365#M4276</guid>
      <dc:creator>trombif</dc:creator>
      <dc:date>2011-04-13T14:44:00Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815366#M4277</link>
      <description>&lt;PRE&gt;[bash] [DllImport("ippcore-7.0.dll",EntryPoint="ippMalloc")] private static extern&lt;BR /&gt; IntPtr Malloc_x32 &lt;BR /&gt; (int length );&lt;BR /&gt; [DllImport("ippcoreem64t-7.0.dll",EntryPoint="ippMalloc")] private static extern&lt;BR /&gt; IntPtr Malloc_x64 &lt;BR /&gt; (int length );&lt;BR /&gt; public IntPtr Malloc (int length ) {&lt;BR /&gt;  if (IntPtr.Size == 8)  &lt;BR /&gt;   return Malloc_x64(length);&lt;BR /&gt;  else&lt;BR /&gt;   return Malloc_x32(length);&lt;BR /&gt; }&lt;BR /&gt;[/bash]&lt;/PRE&gt; He checks whether to use the 32-bit or X64 ipp .dll (according to IntPtr.Size), then uses the ippMalloc, which is said to return a 64-byte aligned region. You could use that one, if you don't mind involving another big .dll, or use mkl_malloc(length, alignment)&lt;BR /&gt;&lt;BR /&gt;For that matter, I would think you could still use the _aligned_malloc provided by Visual Studio.&lt;BR /&gt;&lt;BR /&gt;We just noticed that&lt;A href="http://msdn.microsoft.com/en-us/library/ycsb6wwf.aspx"&gt; VS2010 doc&lt;/A&gt; says the standard default malloc() provides 16-byte alignment. No idea if that would carry over to c# new. Prior to VS2010, malloc was 16-byte aligned only in the X64 version.</description>
      <pubDate>Wed, 13 Apr 2011 21:16:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815366#M4277</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-04-13T21:16:49Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815367#M4278</link>
      <description>Okay, thank you.&lt;DIV&gt;Using dependency walker on mkl_rt.dll, I foundMKL_MALLOC function, so it is ok.&lt;/DIV&gt;&lt;DIV&gt;In mkl documentation, it seems that syntax is :&lt;/DIV&gt;&lt;DIV&gt;&lt;H2 MSHELP="http://www.microsoft.com/MSHelp/"&gt;&lt;SPAN style="font-size: 11px; line-height: 16px; font-weight: normal;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/H2&gt;&lt;H2 MSHELP="http://www.microsoft.com/MSHelp/"&gt;&lt;SPAN style="font-size: 11px; line-height: 16px; font-weight: normal;"&gt;a_ptr=mkl_malloc(alloc_size,alignment);&lt;/SPAN&gt;&lt;/H2&gt;&lt;DIV&gt;&lt;SPAN style="line-height: 16px;"&gt;So i defined this :&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="line-height: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="line-height: 16px;"&gt;&lt;PRE&gt;[csharp]        public static unsafe IntPtr mkl_malloc(int length)
        {
            LAPACKNative.kmp_set_warnings_off();
            int align = 32;
            IntPtr pointer = LAPACKNative.Malloc(length, align);
            return pointer;
        }
        [DllImport("mkl_rt.dll", EntryPoint = "MKL_MALLOC", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
        internal static extern IntPtr Malloc(int length, int align);[/csharp]&lt;/PRE&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="line-height: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="line-height: 16px;"&gt;Problem is, when I call this function this way :&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="line-height: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="line-height: 16px;"&gt;IntPtr pointer_A_bis = LAPACK_mkl.mkl_malloc(n * n * sizeof(double));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="line-height: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="line-height: 16px;"&gt;I get an error concerning "an attempt to to read or write in protected memory. It often indicates another memory is damaged" ...&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;SPAN style="line-height: 16px;"&gt;Any idea ?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Apr 2011 11:37:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815367#M4278</guid>
      <dc:creator>trombif</dc:creator>
      <dc:date>2011-04-14T11:37:14Z</dc:date>
    </item>
    <item>
      <title>.NET Interop and the Math Kernel Library LAPACK Routines</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815368#M4279</link>
      <description>Finally, here is what I did (as I could not make mkl_malloc work...)&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;[csharp]public unsafe double[] linsolve(ref double[,] A, ref double[] B)
        {
            int m = A.GetLength(0);
            int n = A.GetLength(1);
            int lwork = -1;
            int lda = m;
            int ldb = m;
            int nrhs = 1;
            int rank = 0;
            int align = 128;
            IntPtr pointer_A_bis_ini = Marshal.AllocHGlobal(m * n * sizeof(double) + align);
            IntPtr pointer_A_bis = pointer_A_bis_ini;
            IntPtr pointer_B_bis_ini = Marshal.AllocHGlobal(n * nrhs * sizeof(double) + align);
            IntPtr pointer_B_bis = pointer_B_bis_ini;
            Int64 adresse_A_bis = pointer_A_bis.ToInt64() % align;
            Int64 adresse_B_bis = pointer_B_bis.ToInt64() % align;
            int offset = 0;
            while (adresse_A_bis != 0)
            {
                offset++;
                pointer_A_bis = new IntPtr(pointer_A_bis_ini.ToInt64() + offset);
                adresse_A_bis = pointer_A_bis.ToInt64() % align;
            }
            offset = 0;
            while (adresse_B_bis != 0)
            {
                offset++;
                pointer_B_bis = new IntPtr(pointer_B_bis_ini.ToInt64() + offset);
                adresse_B_bis = pointer_B_bis.ToInt64() % align;
            }
            double* A_bis = (double*)pointer_A_bis.ToPointer();
            double* B_bis = (double*)pointer_B_bis.ToPointer();
            for (int i = 0; i &amp;lt; nrhs; i++)
            {
                int cte = i * m;
                for (int j = 0; j &amp;lt; m; j++)
                {
                    B_bis[cte + j] = B&lt;J&gt;;
                }
            }
            for (int i = 0; i &amp;lt; n; i++)
            {
                int cte = i * m;
                for (int j = 0; j &amp;lt; m; j++)
                {
                    A_bis[cte + j] = A[j, i];
                }
            }
            if (m == n)
            {
                IntPtr pointer_IPIV_ini = Marshal.AllocHGlobal(m * sizeof(int) + align);
                IntPtr pointer_IPIV = pointer_IPIV_ini;
                Int64 adresse_IPIV = pointer_IPIV.ToInt64() % align;
                offset = 0;
                while (adresse_IPIV != 0)
                {
                    offset++;
                    pointer_IPIV = new IntPtr(pointer_IPIV_ini.ToInt64() + offset);
                    adresse_IPIV = pointer_IPIV.ToInt64() % align;
                }
                int* IPIV = (int*)pointer_IPIV.ToPointer();
                for (int i = 0; i &amp;lt; m; i++)
                {
                    IPIV&lt;I&gt; = 0;
                }
                LAPACK_mkl.dgetrf(m, m, A_bis, m, IPIV);
                LAPACK_mkl.dgetrs('N', m, nrhs, A_bis, m, IPIV, B_bis, m);
                double[] res2 = new double&lt;N&gt;;
                for (int i = 0; i &amp;lt; n; i++)
                {
                    res2&lt;I&gt; = B_bis&lt;I&gt;;
                }
                Marshal.FreeHGlobal(pointer_A_bis_ini);
                Marshal.FreeHGlobal(pointer_B_bis_ini);
                Marshal.FreeHGlobal(pointer_IPIV_ini);
                return res2;
            }
            else
            {
                int maxMN;
                if (m &amp;gt; n) { maxMN = m; } else { maxMN = n; }
                IntPtr pointer_JPVT_ini = Marshal.AllocHGlobal(n * sizeof(int) + align);
                IntPtr pointer_JPVT = pointer_JPVT_ini;
                Int64 adresse_JPVT = pointer_JPVT.ToInt64() % align;
                offset = 0;
                while (adresse_JPVT != 0)
                {
                    offset++;
                    pointer_JPVT = new IntPtr(pointer_JPVT_ini.ToInt64() + offset);
                    adresse_JPVT = pointer_JPVT.ToInt64() % align;
                }
                int* JPVT = (int*)pointer_JPVT.ToPointer();
                for (int i = 0; i &amp;lt; n; i++)
                {
                    JPVT&lt;I&gt; = 0;
                }
                double RCOND = 2.0E-16;
                IntPtr pointer_work_1 = Marshal.AllocHGlobal(sizeof(double));
                double* work_1 = (double*)pointer_work_1.ToPointer();
                LAPACK_mkl.dgelsy(m, n, nrhs, A_bis, lda, B_bis, maxMN, JPVT, RCOND, rank, work_1, lwork);
                lwork = (int)work_1[0];
                IntPtr pointer_work_ini = Marshal.AllocHGlobal(lwork * sizeof(double) + align);
                IntPtr pointer_work = pointer_work_ini;
                Int64 adresse_work = pointer_work.ToInt64() % align;
                offset = 0;
                while (adresse_work != 0)
                {
                    offset++;
                    pointer_work = new IntPtr(pointer_work_ini.ToInt64() + offset);
                    adresse_work = pointer_work.ToInt64() % align;
                }
                double* work = (double*)pointer_work.ToPointer();
                LAPACK_mkl.dgelsy(m, n, nrhs, A_bis, m, B_bis, maxMN, JPVT, RCOND, rank, work, lwork);
                
                double[] res2 = new double&lt;N&gt;;
                for (int i = 0; i &amp;lt; n; i++)
                {
                    res2&lt;I&gt; = B_bis&lt;I&gt;;
                }
                Marshal.FreeHGlobal(pointer_work_1);
                Marshal.FreeHGlobal(pointer_work_ini);
                Marshal.FreeHGlobal(pointer_A_bis_ini);
                Marshal.FreeHGlobal(pointer_B_bis_ini);
                Marshal.FreeHGlobal(pointer_JPVT_ini);
                GC.Collect(0);
                return res2;
            }
        }[/csharp]&lt;/I&gt;&lt;/I&gt;&lt;/N&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/N&gt;&lt;/I&gt;&lt;/J&gt;&lt;/PRE&gt; It seems it's working fine.&lt;/DIV&gt;&lt;DIV&gt;If anyone has a better idea, feel free to share !&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Best regards, Eric&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 May 2011 09:22:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/NET-Interop-and-the-Math-Kernel-Library-LAPACK-Routines/m-p/815368#M4279</guid>
      <dc:creator>trombif</dc:creator>
      <dc:date>2011-05-10T09:22:25Z</dc:date>
    </item>
  </channel>
</rss>

