octave-maintainers
[Top][All Lists]
Advanced

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

Re: CXSparse v2.0


From: John W. Eaton
Subject: Re: CXSparse v2.0
Date: Thu, 4 May 2006 09:02:35 -0400

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?

Would it be worth having a feature check in configure instead of
looking at the version number?

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

jwe


reply via email to

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