comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Can't pass data with CALL_EXTERNAL to C function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Can't pass data with CALL_EXTERNAL to C function [message #60849 is a reply to message #60847] Thu, 19 June 2008 11:46 Go to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
I have had these same issues and they are maddening. The issue is
with pass by reference, pass by value.

The key ends up being in the VALUE keyword to CALL_EXTERNAL. I am
trying to get ready for a meeting next week so I can't type more but I
will point you to a working example.

On this page I have a bit of explanation on how I did this as well as
the c and idl codes.
http://people.bu.edu/balarsen/Home/IDL/Entries/2008/4/15_Gen erating_Sobol_Sequence_with_GSL_in_IDL.html

What I did there was write a C wrapper for the C routine I wanted to
run to handle the array passing. Since the C routine needs to be
called N times and IDL-C calls are slow I reduced that number of calls
to 1 IDL-C call using the wrapper. Then there is an IDL code that
calls the wrapper and gives the answer. Seems to work well.

Let me know what you learn as this always drives me crazy and I have
to figure it our each time.


Cheers,

Brian

------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
http://people.bu.edu/balarsen/Home/IDL
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Implementation of G Statistic in IDL
Next Topic: Multidimensional arrays and CALL_EXTERNAL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:04:12 PDT 2025

Total time taken to generate the page: 0.00462 seconds