Community
cancel
Showing results for 
Search instead for 
Did you mean: 
2032
Beginner
55 Views

Calling djacobi from CSharp

Hi,

I'm attempting to call djacobi() from csharp (for a nonlinear optimisation problem).

Can anybody advise on how to pass the objective function (fcn) parameter.

I'm importing the dll as follows:

[DllImport("mkl_rt", CallingConvention = CallingConvention.Cdecl,

ExactSpelling = true, SetLastError = false)]

internal static extern int djacobix(ref int fcn,

ref int n, ref int m, [Out] double[] fjac, [In] double[] x, ref double [] jac_eps,

ref MathLib.Optimiser.my_data m_data);

Obviously, this is not working, since the fcn parameter is not passed correctly. Do I need to use a delegate?

Thanks

Ernest

0 Kudos
1 Reply
Gennady_F_Intel
Moderator
55 Views

Ernest,

Please check with this Article "http://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program/", You can find there several examples how to do that. In the case if you will experience the further problem, then please give us the example of your*.cs file.

--Gennady

Reply