octave-maintainers
[Top][All Lists]
Advanced

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

Re: [PATCH 0 of 4] Implement basic sparse op diag and diag op sparse sup


From: John W. Eaton
Subject: Re: [PATCH 0 of 4] Implement basic sparse op diag and diag op sparse support.
Date: Tue, 10 Mar 2009 16:10:58 -0400

On 10-Mar-2009, Jason Riedy wrote:

| And Jaroslav Hajek writes:
| > 2. I see you didn't reuse the existing mechanism Sparse-op-defs.h /
| > sparse-mx-ops / sparse-mk-ops.awk.
| 
| As I mentioned in my commit message, the macros destroy compiler
| errors and debugging information.  Also, I cannot use
| sparse-mx-ops without hacking around element-wise multiplication
| and division.  I don't want to open that can right now.  The
| "right" result with structured matrices is open to many
| legitimate interpretations.
| 
| So if I cannot use sparse-mx-ops without introducing changes that
| could destabilize other features, there's no point in sticking to
| the macrology.
| 
| Also, touching Sparse-op-defs.h triggers a massive recompilation
| throughout liboctave *and* src.  Modifying Sparse-diag-op-defs.h
| only triggers rebuilding dSparse.o and CSparse.o along with
| relinking.  Very handy.

I'd certainly be in favor of splitting these things up and using
templates instead of macros where possible.  The reason we have a lot
of ugly macros is partly because much of Octave was written before
templates were a reasonable choice for C++ code.  It's not like I
think macros are really wonderful.  But using macros seemed better
than cutting and pasting massive amounts of code.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]