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:45:24 +0200
User-agent: Thunderbird 1.5 (Windows/20051201)

John W. Eaton wrote:
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

On second thoughts this is not such a good idea, as the names of some of the elements of the structures in CXSparse have also changes; For example "Pinv" became "pinv", "Q" became "q", etc. And so I'd also need macros to represent all of these arguments. Perhaps it is better to keep the patch as I originally sent it and assume that in a few months we will require CXSparse v2.0..

D.


reply via email to

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