[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FFTs in IDL



In article <4fug1n$9br@morrow.stanford.edu>, tom@quake.Stanford.EDU
(Thomas Berger) wrote:

> A related question: if I end up having to not be lazy and type in a book
> algorithm, would it be faster to implement as a CALL_EXTERNAL or a native
> IDL routine? I have no experience with external calls; someone told me they 
> can be slow due to translation (?).

Depends on how long the routine is.  Short routines that are clear and
easy to translate, do it in IDL -- more than a couple of pages, especially
if you have the code already on the machine, use CALL_EXTERNAL.

My experience is that CALL_EXTERNAL is not too difficult to use, but it is
very difficult to debug external routines using IDL.  Make sure they work
standalone before you try to link them to IDL with CALL_EXTERNAL, then
test them with test programs within IDL that are similar to your external
test programs.

External routines usually need to be compiled and linked differently on
different platforms, but the IDL side of things is pretty portable.  I
don't know any reason why external calls would be slow.  (Except for slow
external algorithms, of course. :-) )

Regards, Ken Bowman

-- 
Kenneth P. Bowman, Assoc. Prof.                  409-862-4060
Department of Meteorology                        409-862-4132 fax
Texas A&M University                             bowman@csrp.tamu.edu
College Station, TX   77843-3150
     On the Internet, everyone will be famous for 15 milliseconds.