<?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 Probably x86 does not in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/c-Marshalling-LAPACKE-zgesvxx/m-p/1070062#M22216</link>
    <description>&lt;P&gt;Probably x86 does not correctly interprets 'long' type, which is 8-byte in C#. Did you try replacing 'long' with 'int'?&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2015 12:27:57 GMT</pubDate>
    <dc:creator>Dmitry_B_Intel</dc:creator>
    <dc:date>2015-11-17T12:27:57Z</dc:date>
    <item>
      <title>c# Marshalling LAPACKE_zgesvxx</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/c-Marshalling-LAPACKE-zgesvxx/m-p/1070061#M22215</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I implemented a C# program that test LAPACKE_zgesvxx function.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	The example works with x64 platform but fail with x86 platform, return info=-7 error!&lt;/P&gt;

&lt;P&gt;I suppose there are difference in function declaration, but I don't know where, and how to solve it.&lt;/P&gt;

&lt;P&gt;I did many changes in the declaration part, but with 25 parameters became quite difficult to find the solution.&lt;/P&gt;

&lt;P&gt;any ideas?&lt;/P&gt;

&lt;P&gt;I Attach the example code and the data files used to test.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	Thank you&lt;/P&gt;

&lt;P&gt;Gianluca&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 15:36:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/c-Marshalling-LAPACKE-zgesvxx/m-p/1070061#M22215</guid>
      <dc:creator>Gianluca_G_1</dc:creator>
      <dc:date>2015-11-16T15:36:03Z</dc:date>
    </item>
    <item>
      <title>Probably x86 does not</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/c-Marshalling-LAPACKE-zgesvxx/m-p/1070062#M22216</link>
      <description>&lt;P&gt;Probably x86 does not correctly interprets 'long' type, which is 8-byte in C#. Did you try replacing 'long' with 'int'?&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 12:27:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/c-Marshalling-LAPACKE-zgesvxx/m-p/1070062#M22216</guid>
      <dc:creator>Dmitry_B_Intel</dc:creator>
      <dc:date>2015-11-17T12:27:57Z</dc:date>
    </item>
    <item>
      <title>Hi Dmitry,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/c-Marshalling-LAPACKE-zgesvxx/m-p/1070063#M22217</link>
      <description>&lt;P&gt;Hi Dmitry,&lt;/P&gt;

&lt;PRE class="brush:csharp;"&gt; [DllImport("mkl_rt.dll", ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
        internal static extern int LAPACKE_zgesvxx(
            int matrix_layout,
            char fact,
            char trans,
            int n,
            int nrhs,
            [In, Out] Complex* A,
            int lda,
            [In, Out] Complex* af,
            int ldaf,
            [In, Out] int[] ipiv,
            ref char equed,
            [In, Out] double[] r,
            [In, Out] double[] c,
            [In, Out] Complex* B,
            int ldb,
            [In, Out] Complex* x,
            int ldx,
            ref double rcond,
            ref double rpvgrw,
            [In, Out] double[] berr,//ref double berr,
            int n_err_bnds,
            [In, Out] double[] err_bnds_norm,
            [In, Out] double[] err_bnds_comp,
            int nparams,
            [In, Out] double[] parameters
        );&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I replaced long with int and now it works on both platforms&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;

&lt;P&gt;&amp;nbsp;BR&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Gianluca&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 14:53:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/c-Marshalling-LAPACKE-zgesvxx/m-p/1070063#M22217</guid>
      <dc:creator>Gianluca_G_1</dc:creator>
      <dc:date>2015-11-17T14:53:43Z</dc:date>
    </item>
  </channel>
</rss>

