[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: conv2 performance
From: |
Jaroslav Hajek |
Subject: |
Re: conv2 performance |
Date: |
Thu, 4 Mar 2010 18:40:42 +0100 |
On Thu, Mar 4, 2010 at 5:30 PM, John W. Eaton <address@hidden> wrote:
> On 4-Mar-2010, Jaroslav Hajek wrote:
>
> | The main problem with calling BLAS functions repeatedly in a loop from
> | C++ is that the F77_XFCN macro involves a nontrivial setup to make the
> | computation breakable. If you want to avoid that setup repeatedly
> | (which I do), you'd need to use F77_FCN and
> | do the interrupt and error handling explicitly outside the loop or
> | just code the innermost loops in Fortran side and call that with
> | F77_XFCN.
>
> OK. The {BEGIN,END}_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE macros in
> libcruft/misc/quit.h should make that somewhat easier.
>
> | Besides that, when >2D arrays are involved, Fortran handles that more
> | naturally than C's pointer arithmetics (yet usually equally
> | efficiently).
> |
> | The only problem is that in Fortran you typically need to duplicate
> | the code for each type; I have sed scripts for that, so it's usually
> | little problem for me, but maybe it would be better if I used m4
> | instead?
>
> It doesn't matter to me whether it is sed, awk, or m4. But it might
> be better to put your actual source code in the archive along with the
> script so that if someone has to modify the sources later, they don't
> have to do it N times, or write their own script. That's one reason
> that it seems better to me to use C++ templates in a case like this.
>
> | And lastly, I like coding in Fortran. Is it a problem having Fortran
> | stuff in Octave?
>
> I'm not saying don't ever do it, but I would prefer to avoid adding
> more Fortran code to Octave unless there is some good reason to do
> so.
>
How is a good reason defined? Yes, it can be done without the Fortran
code. Should I remove it then?
--
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- Re: conv2 performance, (continued)
- Re: conv2 performance, Jaroslav Hajek, 2010/03/02
- Re: conv2 performance, Jaroslav Hajek, 2010/03/02
- Re: conv2 performance, Jaroslav Hajek, 2010/03/03
- Re: conv2 performance, Michael D. Godfrey, 2010/03/03
- Re: conv2 performance, Jaroslav Hajek, 2010/03/03
- Re: conv2 performance, John W. Eaton, 2010/03/03
- Re: conv2 performance, Michael D. Godfrey, 2010/03/03
- Re: conv2 performance, Jaroslav Hajek, 2010/03/04
- Re: conv2 performance, Michael Goffioul, 2010/03/04
- Re: conv2 performance, John W. Eaton, 2010/03/04
- Re: conv2 performance,
Jaroslav Hajek <=
- Re: conv2 performance, John W. Eaton, 2010/03/04
Re: conv2 performance, Søren Hauberg, 2010/03/01
Re: conv2 performance, John Swensen, 2010/03/01
conv2 performance, Lukas Reichlin, 2010/03/03