Re: NET/Link return array from C++
- To: mathgroup at smc.vnet.net
- Subject: [mg61159] Re: NET/Link return array from C++
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Tue, 11 Oct 2005 04:49:55 -0400 (EDT)
- Organization: Uni Leipzig
- References: <di2m5s$8d6$1@smc.vnet.net><di5915$3bl$1@smc.vnet.net> <difr8h$feb$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi I mean send it manual and create a Wolfram.NETLink.Expr that you can return. Regards Jens "Lasr Schouw" <schouw at gmail.com> schrieb im Newsbeitrag news:difr8h$feb$1 at smc.vnet.net... | Jens | | What do you mean? | | In the meanwhile I got some help from Wolfram support. So it works now. | C++ | void Test123(double x[], int size, double result[]) | { | for (long i = 0 ; i < size; i ++) result[i] = 100.; | } | Notebook | TEST123 = DefineDLLFunction["Test123", strFilename, "Void", | {"double[]", "long", "double[]"}]; | | input1=MakeNETObject[{1., 2., 3.}]; | res=MakeNETObject[{0.0,0.0, 0.0}]; | | TEST123[input1, 3, res] | | NETObjectToExpression[res] | {100.,100.,100.} | | Then I tried to so the same with 1 mio numbers and can see that the | perfmance is really slow in the MakeNETObject and NETObjectToExpression | parts. So the NETLink does not solve my problem since it still has | performance problems... except of I can do this part better somehow. | | Regards | Lars Schouw | Tokyo, Japan |