octave: fix build with SuiteSparse-7.1.0
This commit is contained in:
parent
7048b53070
commit
243fc01c7f
166
srcpkgs/octave/patches/fix-suitesparse-7.1.patch
Normal file
166
srcpkgs/octave/patches/fix-suitesparse-7.1.patch
Normal file
@ -0,0 +1,166 @@
|
||||
--- a/liboctave/numeric/sparse-qr.cc 2023-04-13 13:43:35.000000000 -0300
|
||||
+++ b/liboctave/numeric/sparse-qr.cc 2023-07-02 17:56:48.485762203 -0300
|
||||
@@ -804,17 +804,17 @@
|
||||
Matrix ret (nrows, nc);
|
||||
cholmod_dense *q;
|
||||
|
||||
- // I is nrows x nrows identity matrix
|
||||
- cholmod_dense *I
|
||||
+ // Id is nrows x nrows identity matrix
|
||||
+ cholmod_dense *Id
|
||||
= cholmod_l_allocate_dense (nrows, nrows, nrows, CHOLMOD_REAL, &m_cc);
|
||||
|
||||
for (octave_idx_type i = 0; i < nrows * nrows; i++)
|
||||
- (reinterpret_cast<double *> (I->x))[i] = 0.0;
|
||||
+ (reinterpret_cast<double *> (Id->x))[i] = 0.0;
|
||||
|
||||
for (octave_idx_type i = 0; i < nrows; i++)
|
||||
- (reinterpret_cast<double *> (I->x))[i * nrows + i] = 1.0;
|
||||
+ (reinterpret_cast<double *> (Id->x))[i * nrows + i] = 1.0;
|
||||
|
||||
- q = SuiteSparseQR_qmult<double> (SPQR_QX, m_H, m_Htau, m_HPinv, I, &m_cc);
|
||||
+ q = SuiteSparseQR_qmult<double> (SPQR_QX, m_H, m_Htau, m_HPinv, Id, &m_cc);
|
||||
spqr_error_handler (&m_cc);
|
||||
|
||||
double *q_x = reinterpret_cast<double *> (q->x);
|
||||
@@ -824,7 +824,7 @@
|
||||
ret_vec[j * nrows + i] = q_x[j * nrows + i];
|
||||
|
||||
cholmod_l_free_dense (&q, &m_cc);
|
||||
- cholmod_l_free_dense (&I, &m_cc);
|
||||
+ cholmod_l_free_dense (&Id, &m_cc);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -1738,18 +1738,18 @@
|
||||
ComplexMatrix ret (nrows, nc);
|
||||
cholmod_dense *q;
|
||||
|
||||
- // I is nrows x nrows identity matrix
|
||||
- cholmod_dense *I
|
||||
+ // Id is nrows x nrows identity matrix
|
||||
+ cholmod_dense *Id
|
||||
= reinterpret_cast<cholmod_dense *>
|
||||
(cholmod_l_allocate_dense (nrows, nrows, nrows, CHOLMOD_COMPLEX, &m_cc));
|
||||
|
||||
for (octave_idx_type i = 0; i < nrows * nrows; i++)
|
||||
- (reinterpret_cast<Complex *> (I->x))[i] = 0.0;
|
||||
+ (reinterpret_cast<Complex *> (Id->x))[i] = 0.0;
|
||||
|
||||
for (octave_idx_type i = 0; i < nrows; i++)
|
||||
- (reinterpret_cast<Complex *> (I->x))[i * nrows + i] = 1.0;
|
||||
+ (reinterpret_cast<Complex *> (Id->x))[i * nrows + i] = 1.0;
|
||||
|
||||
- q = SuiteSparseQR_qmult<Complex> (SPQR_QX, m_H, m_Htau, m_HPinv, I,
|
||||
+ q = SuiteSparseQR_qmult<Complex> (SPQR_QX, m_H, m_Htau, m_HPinv, Id,
|
||||
&m_cc);
|
||||
spqr_error_handler (&m_cc);
|
||||
|
||||
@@ -1761,7 +1761,7 @@
|
||||
ret_vec[j * nrows + i] = q_x[j * nrows + i];
|
||||
|
||||
cholmod_l_free_dense (&q, &m_cc);
|
||||
- cholmod_l_free_dense (&I, &m_cc);
|
||||
+ cholmod_l_free_dense (&Id, &m_cc);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -1786,7 +1786,7 @@
|
||||
OCTAVE_LOCAL_BUFFER (cs_complex_t, bvec, nr);
|
||||
|
||||
for (octave_idx_type i = 0; i < nr; i++)
|
||||
- bvec[i] = cs_complex_t (0.0, 0.0);
|
||||
+ bvec[i] = (cs_complex_t) 0.0;
|
||||
|
||||
OCTAVE_LOCAL_BUFFER (Complex, buf, S->m2);
|
||||
|
||||
@@ -1794,7 +1794,7 @@
|
||||
{
|
||||
octave_quit ();
|
||||
|
||||
- bvec[j] = cs_complex_t (1.0, 0.0);
|
||||
+ bvec[j] = (cs_complex_t) 1.0;
|
||||
|
||||
volatile octave_idx_type nm = (nr < nc ? nr : nc);
|
||||
|
||||
@@ -1813,7 +1813,7 @@
|
||||
for (octave_idx_type i = 0; i < nr; i++)
|
||||
vec[i+idx] = buf[i];
|
||||
|
||||
- bvec[j] = cs_complex_t (0.0, 0.0);
|
||||
+ bvec[j] = (cs_complex_t) 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2073,7 +2073,7 @@
|
||||
Xx[j] = b.xelem (j, i);
|
||||
|
||||
for (octave_idx_type j = nr; j < S->m2; j++)
|
||||
- buf[j] = cs_complex_t (0.0, 0.0);
|
||||
+ buf[j] = (cs_complex_t) 0.0;
|
||||
|
||||
CXSPARSE_ZNAME (_ipvec) (S->pinv,
|
||||
reinterpret_cast<cs_complex_t *>(Xx),
|
||||
@@ -2143,7 +2143,7 @@
|
||||
Xx[j] = b.xelem (j, i);
|
||||
|
||||
for (octave_idx_type j = nr; j < nbuf; j++)
|
||||
- buf[j] = cs_complex_t (0.0, 0.0);
|
||||
+ buf[j] = (cs_complex_t) 0.0;
|
||||
|
||||
CXSPARSE_ZNAME (_pvec) (S->q, reinterpret_cast<cs_complex_t *> (Xx),
|
||||
buf, nr);
|
||||
@@ -2206,7 +2206,7 @@
|
||||
Xx[j] = b.xelem (j, i);
|
||||
|
||||
for (octave_idx_type j = nr; j < S->m2; j++)
|
||||
- buf[j] = cs_complex_t (0.0, 0.0);
|
||||
+ buf[j] = (cs_complex_t) 0.0;
|
||||
|
||||
CXSPARSE_ZNAME (_ipvec) (S->pinv,
|
||||
reinterpret_cast<cs_complex_t *> (Xx),
|
||||
@@ -2304,7 +2304,7 @@
|
||||
Xx[j] = b.xelem (j, i);
|
||||
|
||||
for (octave_idx_type j = nr; j < nbuf; j++)
|
||||
- buf[j] = cs_complex_t (0.0, 0.0);
|
||||
+ buf[j] = (cs_complex_t) 0.0;
|
||||
|
||||
CXSPARSE_ZNAME (_pvec) (S->q,
|
||||
reinterpret_cast<cs_complex_t *> (Xx),
|
||||
@@ -2392,7 +2392,7 @@
|
||||
octave_quit ();
|
||||
|
||||
for (octave_idx_type j = nr; j < S->m2; j++)
|
||||
- buf[j] = cs_complex_t (0.0, 0.0);
|
||||
+ buf[j] = (cs_complex_t) 0.0;
|
||||
|
||||
CXSPARSE_ZNAME (_ipvec) (S->pinv, bvec + bidx, buf, nr);
|
||||
|
||||
@@ -2460,7 +2460,7 @@
|
||||
octave_quit ();
|
||||
|
||||
for (octave_idx_type j = nr; j < nbuf; j++)
|
||||
- buf[j] = cs_complex_t (0.0, 0.0);
|
||||
+ buf[j] = (cs_complex_t) 0.0;
|
||||
|
||||
CXSPARSE_ZNAME (_pvec) (S->q, bvec + bidx, buf, nr);
|
||||
CXSPARSE_ZNAME (_utsolve) (N->U, buf);
|
||||
@@ -2522,7 +2522,7 @@
|
||||
Xx[j] = b.xelem (j, i);
|
||||
|
||||
for (octave_idx_type j = nr; j < S->m2; j++)
|
||||
- buf[j] = cs_complex_t (0.0, 0.0);
|
||||
+ buf[j] = (cs_complex_t) 0.0;
|
||||
|
||||
CXSPARSE_ZNAME (_ipvec) (S->pinv,
|
||||
reinterpret_cast<cs_complex_t *> (Xx),
|
||||
@@ -2620,7 +2620,7 @@
|
||||
Xx[j] = b.xelem (j, i);
|
||||
|
||||
for (octave_idx_type j = nr; j < nbuf; j++)
|
||||
- buf[j] = cs_complex_t (0.0, 0.0);
|
||||
+ buf[j] = (cs_complex_t) 0.0;
|
||||
|
||||
CXSPARSE_ZNAME (_pvec) (S->q, reinterpret_cast<cs_complex_t *>(Xx),
|
||||
buf, nr);
|
Loading…
Reference in New Issue
Block a user