octave-maintainers
[Top][All Lists]
Advanced

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

Re: CXSparse v2.0


From: David Bateman
Subject: Re: CXSparse v2.0
Date: Thu, 04 May 2006 15:37:54 +0200
User-agent: Thunderbird 1.5 (Windows/20051201)

John W. Eaton wrote:
On  4-May-2006, David Bateman wrote:

| David Bateman wrote:
| | >There was a discussion a month or so ago about the interface changes in
| >CXSparse v2.0 and how to treat these. In the end its not a major issue
| >to allow both versions prior to and after v2.0.0 to be used, and the
| >attached patch to the CVS allows this
| >
| >Regards
| >David
| >
| >2006-05-04  David Bateman  <address@hidden>
| >
| >    * SparseQR.cc, SparseQR.h, SparseCmplxQR.cc, SparseCmplxQR.h,
| >    sparse-dmsolve.cc : Allow compilation with versions v2.0.0 of
| >    CXSparse or later
| >
| >2006-05-04  David Bateman  <address@hidden>
| >
| >    * DLD-FUNCTIONS/spqr.cc (Fdmperm): Allow compilation with versions
| >    v2.0.0 of CXSparse or later.
| | Sorry, here is the same patch without the extraneous muck...

Is there any reason we shouldn't just require version 2 or later?
CXSparse v2.0 is available as a separate package at the moment but not part of UFsparse and so there is no appropriate upstream release for the distributions to build against yet. This minimizes the pain of the transition will adding a little cruft that can be removed in a few months time..
Would it be worth having a feature check in configure instead of
looking at the version number?
Perhaps, but I don't see the interface will change again in the near future, so a check against the version number seems just as good and avoids changes to the autoconf stuff.
What about using some macros to avoid repeating the #ifdefs
everywhere?  Something like

  #if defined(CS_VER) && (CS_VER >= 2)
  #define CXSPARSE_SQR(ORDER, A, QR) \
    CXSPARSE_ZNAME (_sqr) (ORDER, A, QR)
  #else
  #define CXSPARSE_SQR(ORDER, A, QR) \
    CXSPARSE_ZNAME (_sqr) (A, ORDER-1, QR)
  #endif

and then

  S = CXSPARSE_SQR (order, &A, 1);

instead of

  #if defined(CS_VER) && (CS_VER >= 2)
    S = CXSPARSE_ZNAME (_sqr) (order, &A, 1);
  #else
    S = CXSPARSE_ZNAME (_sqr) (&A, order - 1, 1);
  #endif

Ok, this seems like a good idea. I'll do it this way..

D.



reply via email to

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