Re: linking with call_external [message #4480] |
Mon, 19 June 1995 00:00 |
Jon Twichell
Messages: 1 Registered: June 1995
|
Junior Member |
|
|
theil@bogart.Colorado.EDU ("Dynamo" Dave Theil) wrote:
> I am using call_external with c routines. There is one minor glitch
> that MUST be conquerable. If a change is made to the external routine
> and it is recompiled, but the image file has been called before in the
> current IDL session by call_external, the new file does not appear to
> be relinked into idl:
> deleted
> Any suggestions?
The call_external only loads the image on the initial call. Thereafter,
the image is locked into memory (for non-memory-mapped systems e.g., the
mac) and the name cached in a table. This reduces the amount of time
needed to invoke the routine from 10's of milliseconds (dominated by the
file lookup) to about one microsecond (on a Mac PowerPC). The fast
response is nessary for many applications.
My (unheaded) suggestion was to make call_external more like linkimage.
Have a load_external, and then just refer to the code by name instead of
the clumsy call_external(...). The easy interface and calling mechanism
could be retained.
Lacking that, your only option would seem to be to use linkimage (unless
you are running on a 68K Mac which does not support this option).
Generally linkimage provides a more powerful set of tools and
capabilities (variable creation, memory allocation and deallocation, and
access to internal routines). IMHO is the preferable interface to
external code.
Hope this helps!
|
|
|