scs 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/scs/version.rb +1 -1
- data/vendor/scs/CITATION.cff +1 -1
- data/vendor/scs/CMakeLists.txt +1 -1
- data/vendor/scs/README.md +1 -1
- data/vendor/scs/include/glbopts.h +1 -1
- data/vendor/scs/linsys/external/amd/amd_1.c +1 -1
- data/vendor/scs/linsys/external/amd/amd_2.c +44 -44
- data/vendor/scs/linsys/external/amd/amd_aat.c +5 -5
- data/vendor/scs/linsys/external/amd/amd_dump.c +12 -12
- data/vendor/scs/linsys/external/amd/amd_post_tree.c +3 -3
- data/vendor/scs/linsys/external/amd/amd_postorder.c +8 -8
- data/vendor/scs/linsys/external/amd/amd_valid.c +5 -5
- data/vendor/scs/src/cones.c +26 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeed1416207f6d2c942081c3d046cb3e09105eb94abcbb5a88bbce456269db8c
|
4
|
+
data.tar.gz: ae588cf5b0c1cb952a778ea830fa621b4c49c52b371d456e0496a60e7671cb3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47655b59c03e1e72adddb183e94dc5b7071188bd0e3bb546f2c55a58eeded0cb2cf11746d369597c2b05df609b2a23b90b85ee9f09c13441f31a251126721237
|
7
|
+
data.tar.gz: 3445ab3c1cfe5d318c556230a6cfef67326012be3aa9f3fa2db8ff5440f7276d9d3d9ba519bc026ee529793c8ae1053e47c7f8b10a640686330be80971cfae81
|
data/CHANGELOG.md
CHANGED
data/lib/scs/version.rb
CHANGED
data/vendor/scs/CITATION.cff
CHANGED
data/vendor/scs/CMakeLists.txt
CHANGED
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.5)
|
|
6
6
|
project(
|
7
7
|
scs
|
8
8
|
LANGUAGES C
|
9
|
-
VERSION 3.2.
|
9
|
+
VERSION 3.2.9)
|
10
10
|
|
11
11
|
# Defines the CMAKE_INSTALL_LIBDIR, CMAKE_INSTALL_BINDIR and many other useful
|
12
12
|
# macros. See https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
|
data/vendor/scs/README.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
SCS (`splitting conic solver`) is a numerical optimization package for solving
|
11
|
-
large-scale convex cone problems. The current version is `3.2.
|
11
|
+
large-scale convex cone problems. The current version is `3.2.9`.
|
12
12
|
|
13
13
|
The full documentation is available [here](https://www.cvxgrp.org/scs/).
|
14
14
|
|
@@ -14,7 +14,7 @@ extern "C" {
|
|
14
14
|
|
15
15
|
/* SCS VERSION NUMBER ---------------------------------------------- */
|
16
16
|
/* string literals automatically null-terminated */
|
17
|
-
#define SCS_VERSION ("3.2.
|
17
|
+
#define SCS_VERSION ("3.2.9")
|
18
18
|
|
19
19
|
/* verbosity level */
|
20
20
|
#ifndef VERBOSITY
|
@@ -604,7 +604,7 @@ GLOBAL void AMD_2
|
|
604
604
|
}
|
605
605
|
dense = MAX (16, dense) ;
|
606
606
|
dense = MIN (n, dense) ;
|
607
|
-
AMD_DEBUG1 (("\n\nAMD (debug), alpha %g, aggr. "ID"\n",
|
607
|
+
AMD_DEBUG1 (("\n\nAMD (debug), alpha %g, aggr. " ID "\n",
|
608
608
|
alpha, aggressive)) ;
|
609
609
|
|
610
610
|
for (i = 0 ; i < n ; i++)
|
@@ -622,7 +622,7 @@ GLOBAL void AMD_2
|
|
622
622
|
}
|
623
623
|
|
624
624
|
#ifndef NDEBUG
|
625
|
-
AMD_DEBUG1 (("\n======Nel "ID" initial\n", nel)) ;
|
625
|
+
AMD_DEBUG1 (("\n======Nel " ID " initial\n", nel)) ;
|
626
626
|
AMD_dump (n, Pe, Iw, Len, iwlen, pfree, Nv, Next, Last,
|
627
627
|
Head, Elen, Degree, W, -1) ;
|
628
628
|
#endif
|
@@ -667,7 +667,7 @@ GLOBAL void AMD_2
|
|
667
667
|
* version does not have this option.
|
668
668
|
* ------------------------------------------------------------- */
|
669
669
|
|
670
|
-
AMD_DEBUG1 (("Dense node "ID" degree "ID"\n", i, deg)) ;
|
670
|
+
AMD_DEBUG1 (("Dense node " ID " degree " ID "\n", i, deg)) ;
|
671
671
|
ndense++ ;
|
672
672
|
Nv [i] = 0 ; /* do not postorder this node */
|
673
673
|
Elen [i] = EMPTY ;
|
@@ -699,7 +699,7 @@ GLOBAL void AMD_2
|
|
699
699
|
{
|
700
700
|
|
701
701
|
#ifndef NDEBUG
|
702
|
-
AMD_DEBUG1 (("\n======Nel "ID"\n", nel)) ;
|
702
|
+
AMD_DEBUG1 (("\n======Nel " ID "\n", nel)) ;
|
703
703
|
if (AMD_debug >= 2)
|
704
704
|
{
|
705
705
|
AMD_dump (n, Pe, Iw, Len, iwlen, pfree, Nv, Next,
|
@@ -723,7 +723,7 @@ GLOBAL void AMD_2
|
|
723
723
|
}
|
724
724
|
mindeg = deg ;
|
725
725
|
ASSERT (me >= 0 && me < n) ;
|
726
|
-
AMD_DEBUG1 (("=================me: "ID"\n", me)) ;
|
726
|
+
AMD_DEBUG1 (("=================me: " ID "\n", me)) ;
|
727
727
|
|
728
728
|
/* ----------------------------------------------------------------- */
|
729
729
|
/* remove chosen variable from link list */
|
@@ -831,7 +831,7 @@ GLOBAL void AMD_2
|
|
831
831
|
e = me ;
|
832
832
|
pj = p ;
|
833
833
|
ln = slenme ;
|
834
|
-
AMD_DEBUG2 (("Search sv: "ID" "ID" "ID"\n", me,pj,ln)) ;
|
834
|
+
AMD_DEBUG2 (("Search sv: " ID " " ID " " ID "\n", me,pj,ln)) ;
|
835
835
|
}
|
836
836
|
else
|
837
837
|
{
|
@@ -840,7 +840,7 @@ GLOBAL void AMD_2
|
|
840
840
|
ASSERT (e >= 0 && e < n) ;
|
841
841
|
pj = Pe [e] ;
|
842
842
|
ln = Len [e] ;
|
843
|
-
AMD_DEBUG2 (("Search element e "ID" in me "ID"\n", e,me)) ;
|
843
|
+
AMD_DEBUG2 (("Search element e " ID " in me " ID "\n", e,me)) ;
|
844
844
|
ASSERT (Elen [e] < EMPTY && W [e] > 0 && pj >= 0) ;
|
845
845
|
}
|
846
846
|
ASSERT (ln >= 0 && (ln == 0 || (pj >= 0 && pj < iwlen))) ;
|
@@ -857,7 +857,7 @@ GLOBAL void AMD_2
|
|
857
857
|
i = Iw [pj++] ;
|
858
858
|
ASSERT (i >= 0 && i < n && (i == me || Elen [i] >= EMPTY));
|
859
859
|
nvi = Nv [i] ;
|
860
|
-
AMD_DEBUG2 ((": "ID" "ID" "ID" "ID"\n",
|
860
|
+
AMD_DEBUG2 ((": " ID " " ID " " ID " " ID "\n",
|
861
861
|
i, Elen [i], Nv [i], wflg)) ;
|
862
862
|
|
863
863
|
if (nvi > 0)
|
@@ -912,7 +912,7 @@ GLOBAL void AMD_2
|
|
912
912
|
j = FLIP (Iw [psrc++]) ;
|
913
913
|
if (j >= 0)
|
914
914
|
{
|
915
|
-
AMD_DEBUG2 (("Got object j: "ID"\n", j)) ;
|
915
|
+
AMD_DEBUG2 (("Got object j: " ID "\n", j)) ;
|
916
916
|
Iw [pdst] = Pe [j] ;
|
917
917
|
Pe [j] = pdst++ ;
|
918
918
|
lenj = Len [j] ;
|
@@ -946,7 +946,7 @@ GLOBAL void AMD_2
|
|
946
946
|
degme += nvi ;
|
947
947
|
Nv [i] = -nvi ;
|
948
948
|
Iw [pfree++] = i ;
|
949
|
-
AMD_DEBUG2 ((" s: "ID" nv "ID"\n", i, Nv [i]));
|
949
|
+
AMD_DEBUG2 ((" s: " ID " nv " ID "\n", i, Nv [i]));
|
950
950
|
|
951
951
|
/* ------------------------------------------------- */
|
952
952
|
/* remove variable i from degree link list */
|
@@ -974,7 +974,7 @@ GLOBAL void AMD_2
|
|
974
974
|
{
|
975
975
|
/* set tree pointer and flag to indicate element e is
|
976
976
|
* absorbed into new element me (the parent of e is me) */
|
977
|
-
AMD_DEBUG1 ((" Element "ID" => "ID"\n", e, me)) ;
|
977
|
+
AMD_DEBUG1 ((" Element " ID " => " ID "\n", e, me)) ;
|
978
978
|
Pe [e] = FLIP (me) ;
|
979
979
|
W [e] = 0 ;
|
980
980
|
}
|
@@ -998,8 +998,8 @@ GLOBAL void AMD_2
|
|
998
998
|
* diagonal part). */
|
999
999
|
|
1000
1000
|
#ifndef NDEBUG
|
1001
|
-
AMD_DEBUG2 (("New element structure: length= "ID"\n", pme2-pme1+1)) ;
|
1002
|
-
for (pme = pme1 ; pme <= pme2 ; pme++) AMD_DEBUG3 ((" "ID"", Iw[pme]));
|
1001
|
+
AMD_DEBUG2 (("New element structure: length= " ID "\n", pme2-pme1+1)) ;
|
1002
|
+
for (pme = pme1 ; pme <= pme2 ; pme++) AMD_DEBUG3 ((" " ID "", Iw[pme]));
|
1003
1003
|
AMD_DEBUG3 (("\n")) ;
|
1004
1004
|
#endif
|
1005
1005
|
|
@@ -1036,7 +1036,7 @@ GLOBAL void AMD_2
|
|
1036
1036
|
i = Iw [pme] ;
|
1037
1037
|
ASSERT (i >= 0 && i < n) ;
|
1038
1038
|
eln = Elen [i] ;
|
1039
|
-
AMD_DEBUG3 ((""ID" Elen "ID": \n", i, eln)) ;
|
1039
|
+
AMD_DEBUG3 (("" ID " Elen " ID ": \n", i, eln)) ;
|
1040
1040
|
if (eln > 0)
|
1041
1041
|
{
|
1042
1042
|
/* note that Nv [i] has been negated to denote i in Lme: */
|
@@ -1048,7 +1048,7 @@ GLOBAL void AMD_2
|
|
1048
1048
|
e = Iw [p] ;
|
1049
1049
|
ASSERT (e >= 0 && e < n) ;
|
1050
1050
|
we = W [e] ;
|
1051
|
-
AMD_DEBUG4 ((" e "ID" we "ID" ", e, we)) ;
|
1051
|
+
AMD_DEBUG4 ((" e " ID " we " ID " ", e, we)) ;
|
1052
1052
|
if (we >= wflg)
|
1053
1053
|
{
|
1054
1054
|
/* unabsorbed element e has been seen in this loop */
|
@@ -1084,7 +1084,7 @@ GLOBAL void AMD_2
|
|
1084
1084
|
{
|
1085
1085
|
i = Iw [pme] ;
|
1086
1086
|
ASSERT (i >= 0 && i < n && Nv [i] < 0 && Elen [i] >= 0) ;
|
1087
|
-
AMD_DEBUG2 (("Updating: i "ID" "ID" "ID"\n", i, Elen[i], Len [i]));
|
1087
|
+
AMD_DEBUG2 (("Updating: i " ID " " ID " " ID "\n", i, Elen[i], Len [i]));
|
1088
1088
|
p1 = Pe [i] ;
|
1089
1089
|
p2 = p1 + Elen [i] - 1 ;
|
1090
1090
|
pn = p1 ;
|
@@ -1114,12 +1114,12 @@ GLOBAL void AMD_2
|
|
1114
1114
|
deg += dext ;
|
1115
1115
|
Iw [pn++] = e ;
|
1116
1116
|
hash += e ;
|
1117
|
-
AMD_DEBUG4 ((" e: "ID" hash = "ID"\n",e,hash)) ;
|
1117
|
+
AMD_DEBUG4 ((" e: " ID " hash = " ID "\n",e,hash)) ;
|
1118
1118
|
}
|
1119
1119
|
else
|
1120
1120
|
{
|
1121
1121
|
/* external degree of e is zero, absorb e into me*/
|
1122
|
-
AMD_DEBUG1 ((" Element "ID" =>"ID" (aggressive)\n",
|
1122
|
+
AMD_DEBUG1 ((" Element " ID " =>" ID " (aggressive)\n",
|
1123
1123
|
e, me)) ;
|
1124
1124
|
ASSERT (dext == 0) ;
|
1125
1125
|
Pe [e] = FLIP (me) ;
|
@@ -1143,7 +1143,7 @@ GLOBAL void AMD_2
|
|
1143
1143
|
deg += dext ;
|
1144
1144
|
Iw [pn++] = e ;
|
1145
1145
|
hash += e ;
|
1146
|
-
AMD_DEBUG4 ((" e: "ID" hash = "ID"\n",e,hash)) ;
|
1146
|
+
AMD_DEBUG4 ((" e: " ID " hash = " ID "\n",e,hash)) ;
|
1147
1147
|
}
|
1148
1148
|
}
|
1149
1149
|
}
|
@@ -1172,7 +1172,7 @@ GLOBAL void AMD_2
|
|
1172
1172
|
deg += nvj ;
|
1173
1173
|
Iw [pn++] = j ;
|
1174
1174
|
hash += j ;
|
1175
|
-
AMD_DEBUG4 ((" s: "ID" hash "ID" Nv[j]= "ID"\n",
|
1175
|
+
AMD_DEBUG4 ((" s: " ID " hash " ID " Nv[j]= " ID "\n",
|
1176
1176
|
j, hash, nvj)) ;
|
1177
1177
|
}
|
1178
1178
|
}
|
@@ -1212,7 +1212,7 @@ GLOBAL void AMD_2
|
|
1212
1212
|
* flop count analysis. It also means that the post-ordering
|
1213
1213
|
* is not an exact elimination tree post-ordering. */
|
1214
1214
|
|
1215
|
-
AMD_DEBUG1 ((" MASS i "ID" => parent e "ID"\n", i, me)) ;
|
1215
|
+
AMD_DEBUG1 ((" MASS i " ID " => parent e " ID "\n", i, me)) ;
|
1216
1216
|
Pe [i] = FLIP (me) ;
|
1217
1217
|
nvi = -Nv [i] ;
|
1218
1218
|
degme -= nvi ;
|
@@ -1304,7 +1304,7 @@ GLOBAL void AMD_2
|
|
1304
1304
|
{
|
1305
1305
|
i = Iw [pme] ;
|
1306
1306
|
ASSERT (i >= 0 && i < n) ;
|
1307
|
-
AMD_DEBUG2 (("Consider i "ID" nv "ID"\n", i, Nv [i])) ;
|
1307
|
+
AMD_DEBUG2 (("Consider i " ID " nv " ID "\n", i, Nv [i])) ;
|
1308
1308
|
if (Nv [i] < 0)
|
1309
1309
|
{
|
1310
1310
|
/* i is a principal variable in Lme */
|
@@ -1345,7 +1345,7 @@ GLOBAL void AMD_2
|
|
1345
1345
|
*/
|
1346
1346
|
|
1347
1347
|
ASSERT (i >= EMPTY && i < n) ;
|
1348
|
-
AMD_DEBUG2 (("----i "ID" hash "ID"\n", i, hash)) ;
|
1348
|
+
AMD_DEBUG2 (("----i " ID " hash " ID "\n", i, hash)) ;
|
1349
1349
|
|
1350
1350
|
while (i != EMPTY && Next [i] != EMPTY)
|
1351
1351
|
{
|
@@ -1381,7 +1381,7 @@ GLOBAL void AMD_2
|
|
1381
1381
|
/* check if j and i have identical nonzero pattern */
|
1382
1382
|
/* ------------------------------------------------- */
|
1383
1383
|
|
1384
|
-
AMD_DEBUG3 (("compare i "ID" and j "ID"\n", i,j)) ;
|
1384
|
+
AMD_DEBUG3 (("compare i " ID " and j " ID "\n", i,j)) ;
|
1385
1385
|
|
1386
1386
|
/* check if i and j have the same Len and Elen */
|
1387
1387
|
ASSERT (Len [j] >= 0 && Elen [j] >= 0) ;
|
@@ -1399,7 +1399,7 @@ GLOBAL void AMD_2
|
|
1399
1399
|
/* found it! j can be absorbed into i */
|
1400
1400
|
/* --------------------------------------------- */
|
1401
1401
|
|
1402
|
-
AMD_DEBUG1 (("found it! j "ID" => i "ID"\n", j,i));
|
1402
|
+
AMD_DEBUG1 (("found it! j " ID " => i " ID "\n", j,i));
|
1403
1403
|
Pe [j] = FLIP (i) ;
|
1404
1404
|
/* both Nv [i] and Nv [j] are negated since they */
|
1405
1405
|
/* are in Lme, and the absolute values of each */
|
@@ -1448,7 +1448,7 @@ GLOBAL void AMD_2
|
|
1448
1448
|
i = Iw [pme] ;
|
1449
1449
|
ASSERT (i >= 0 && i < n) ;
|
1450
1450
|
nvi = -Nv [i] ;
|
1451
|
-
AMD_DEBUG3 (("Restore i "ID" "ID"\n", i, nvi)) ;
|
1451
|
+
AMD_DEBUG3 (("Restore i " ID " " ID "\n", i, nvi)) ;
|
1452
1452
|
if (nvi > 0)
|
1453
1453
|
{
|
1454
1454
|
/* i is a principal variable in Lme */
|
@@ -1495,7 +1495,7 @@ GLOBAL void AMD_2
|
|
1495
1495
|
/* FINALIZE THE NEW ELEMENT */
|
1496
1496
|
/* ========================================================================= */
|
1497
1497
|
|
1498
|
-
AMD_DEBUG2 (("ME = "ID" DONE\n", me)) ;
|
1498
|
+
AMD_DEBUG2 (("ME = " ID " DONE\n", me)) ;
|
1499
1499
|
Nv [me] = nvpiv ;
|
1500
1500
|
/* save the length of the list for the new element me */
|
1501
1501
|
Len [me] = p - pme1 ;
|
@@ -1542,10 +1542,10 @@ GLOBAL void AMD_2
|
|
1542
1542
|
}
|
1543
1543
|
|
1544
1544
|
#ifndef NDEBUG
|
1545
|
-
AMD_DEBUG2 (("finalize done nel "ID" n "ID"\n ::::\n", nel, n)) ;
|
1545
|
+
AMD_DEBUG2 (("finalize done nel " ID " n " ID "\n ::::\n", nel, n)) ;
|
1546
1546
|
for (pme = Pe [me] ; pme <= Pe [me] + Len [me] - 1 ; pme++)
|
1547
1547
|
{
|
1548
|
-
AMD_DEBUG3 ((" "ID"", Iw [pme])) ;
|
1548
|
+
AMD_DEBUG3 ((" " ID "", Iw [pme])) ;
|
1549
1549
|
}
|
1550
1550
|
AMD_DEBUG3 (("\n")) ;
|
1551
1551
|
#endif
|
@@ -1649,13 +1649,13 @@ GLOBAL void AMD_2
|
|
1649
1649
|
AMD_DEBUG2 (("\nTree:\n")) ;
|
1650
1650
|
for (i = 0 ; i < n ; i++)
|
1651
1651
|
{
|
1652
|
-
AMD_DEBUG2 ((" "ID" parent: "ID" ", i, Pe [i])) ;
|
1652
|
+
AMD_DEBUG2 ((" " ID " parent: " ID " ", i, Pe [i])) ;
|
1653
1653
|
ASSERT (Pe [i] >= EMPTY && Pe [i] < n) ;
|
1654
1654
|
if (Nv [i] > 0)
|
1655
1655
|
{
|
1656
1656
|
/* this is an element */
|
1657
1657
|
e = i ;
|
1658
|
-
AMD_DEBUG2 ((" element, size is "ID"\n", Elen [i])) ;
|
1658
|
+
AMD_DEBUG2 ((" element, size is " ID "\n", Elen [i])) ;
|
1659
1659
|
ASSERT (Elen [e] > 0) ;
|
1660
1660
|
}
|
1661
1661
|
AMD_DEBUG2 (("\n")) ;
|
@@ -1665,7 +1665,7 @@ GLOBAL void AMD_2
|
|
1665
1665
|
{
|
1666
1666
|
if (Nv [e] > 0)
|
1667
1667
|
{
|
1668
|
-
AMD_DEBUG3 (("Element e= "ID" size "ID" nv "ID" \n", e,
|
1668
|
+
AMD_DEBUG3 (("Element e= " ID " size " ID " nv " ID " \n", e,
|
1669
1669
|
Elen [e], Nv [e])) ;
|
1670
1670
|
}
|
1671
1671
|
}
|
@@ -1675,10 +1675,10 @@ GLOBAL void AMD_2
|
|
1675
1675
|
Int cnt ;
|
1676
1676
|
if (Nv [i] == 0)
|
1677
1677
|
{
|
1678
|
-
AMD_DEBUG3 (("i unordered: "ID"\n", i)) ;
|
1678
|
+
AMD_DEBUG3 (("i unordered: " ID "\n", i)) ;
|
1679
1679
|
j = Pe [i] ;
|
1680
1680
|
cnt = 0 ;
|
1681
|
-
AMD_DEBUG3 ((" j: "ID"\n", j)) ;
|
1681
|
+
AMD_DEBUG3 ((" j: " ID "\n", j)) ;
|
1682
1682
|
if (j == EMPTY)
|
1683
1683
|
{
|
1684
1684
|
AMD_DEBUG3 ((" i is a dense variable\n")) ;
|
@@ -1688,14 +1688,14 @@ GLOBAL void AMD_2
|
|
1688
1688
|
ASSERT (j >= 0 && j < n) ;
|
1689
1689
|
while (Nv [j] == 0)
|
1690
1690
|
{
|
1691
|
-
AMD_DEBUG3 ((" j : "ID"\n", j)) ;
|
1691
|
+
AMD_DEBUG3 ((" j : " ID "\n", j)) ;
|
1692
1692
|
j = Pe [j] ;
|
1693
|
-
AMD_DEBUG3 ((" j:: "ID"\n", j)) ;
|
1693
|
+
AMD_DEBUG3 ((" j:: " ID "\n", j)) ;
|
1694
1694
|
cnt++ ;
|
1695
1695
|
if (cnt > n) break ;
|
1696
1696
|
}
|
1697
1697
|
e = j ;
|
1698
|
-
AMD_DEBUG3 ((" got to e: "ID"\n", e)) ;
|
1698
|
+
AMD_DEBUG3 ((" got to e: " ID "\n", e)) ;
|
1699
1699
|
}
|
1700
1700
|
}
|
1701
1701
|
}
|
@@ -1717,10 +1717,10 @@ GLOBAL void AMD_2
|
|
1717
1717
|
* was selected as pivot.
|
1718
1718
|
* ------------------------------------------------------------- */
|
1719
1719
|
|
1720
|
-
AMD_DEBUG1 (("Path compression, i unordered: "ID"\n", i)) ;
|
1720
|
+
AMD_DEBUG1 (("Path compression, i unordered: " ID "\n", i)) ;
|
1721
1721
|
j = Pe [i] ;
|
1722
1722
|
ASSERT (j >= EMPTY && j < n) ;
|
1723
|
-
AMD_DEBUG3 ((" j: "ID"\n", j)) ;
|
1723
|
+
AMD_DEBUG3 ((" j: " ID "\n", j)) ;
|
1724
1724
|
if (j == EMPTY)
|
1725
1725
|
{
|
1726
1726
|
/* Skip a dense variable. It has no parent. */
|
@@ -1731,14 +1731,14 @@ GLOBAL void AMD_2
|
|
1731
1731
|
/* while (j is a variable) */
|
1732
1732
|
while (Nv [j] == 0)
|
1733
1733
|
{
|
1734
|
-
AMD_DEBUG3 ((" j : "ID"\n", j)) ;
|
1734
|
+
AMD_DEBUG3 ((" j : " ID "\n", j)) ;
|
1735
1735
|
j = Pe [j] ;
|
1736
|
-
AMD_DEBUG3 ((" j:: "ID"\n", j)) ;
|
1736
|
+
AMD_DEBUG3 ((" j:: " ID "\n", j)) ;
|
1737
1737
|
ASSERT (j >= 0 && j < n) ;
|
1738
1738
|
}
|
1739
1739
|
/* got to an element e */
|
1740
1740
|
e = j ;
|
1741
|
-
AMD_DEBUG3 (("got to e: "ID"\n", e)) ;
|
1741
|
+
AMD_DEBUG3 (("got to e: " ID "\n", e)) ;
|
1742
1742
|
|
1743
1743
|
/* -------------------------------------------------------------
|
1744
1744
|
* traverse the path again from i to e, and compress the path
|
@@ -1751,7 +1751,7 @@ GLOBAL void AMD_2
|
|
1751
1751
|
while (Nv [j] == 0)
|
1752
1752
|
{
|
1753
1753
|
jnext = Pe [j] ;
|
1754
|
-
AMD_DEBUG3 (("j "ID" jnext "ID"\n", j, jnext)) ;
|
1754
|
+
AMD_DEBUG3 (("j " ID " jnext " ID "\n", j, jnext)) ;
|
1755
1755
|
Pe [j] = e ;
|
1756
1756
|
j = jnext ;
|
1757
1757
|
ASSERT (j >= 0 && j < n) ;
|
@@ -1837,6 +1837,6 @@ GLOBAL void AMD_2
|
|
1837
1837
|
k = Next [i] ;
|
1838
1838
|
ASSERT (k >= 0 && k < n) ;
|
1839
1839
|
Last [k] = i ;
|
1840
|
-
AMD_DEBUG2 ((" perm ["ID"] = "ID"\n", k, i)) ;
|
1840
|
+
AMD_DEBUG2 ((" perm [" ID "] = " ID "\n", k, i)) ;
|
1841
1841
|
}
|
1842
1842
|
}
|
@@ -60,7 +60,7 @@ GLOBAL size_t AMD_aat /* returns nz in A+A' */
|
|
60
60
|
{
|
61
61
|
p1 = Ap [k] ;
|
62
62
|
p2 = Ap [k+1] ;
|
63
|
-
AMD_DEBUG2 (("\nAAT Column: "ID" p1: "ID" p2: "ID"\n", k, p1, p2)) ;
|
63
|
+
AMD_DEBUG2 (("\nAAT Column: " ID " p1: " ID " p2: " ID "\n", k, p1, p2)) ;
|
64
64
|
|
65
65
|
/* construct A+A' */
|
66
66
|
for (p = p1 ; p < p2 ; )
|
@@ -73,7 +73,7 @@ GLOBAL size_t AMD_aat /* returns nz in A+A' */
|
|
73
73
|
* add both A (j,k) and A (k,j) to the matrix A+A' */
|
74
74
|
Len [j]++ ;
|
75
75
|
Len [k]++ ;
|
76
|
-
AMD_DEBUG3 ((" upper ("ID","ID") ("ID","ID")\n", j,k, k,j));
|
76
|
+
AMD_DEBUG3 ((" upper (" ID "," ID ") (" ID "," ID ")\n", j,k, k,j));
|
77
77
|
p++ ;
|
78
78
|
}
|
79
79
|
else if (j == k)
|
@@ -102,7 +102,7 @@ GLOBAL size_t AMD_aat /* returns nz in A+A' */
|
|
102
102
|
* add both A (i,j) and A (j,i) to the matrix A+A' */
|
103
103
|
Len [i]++ ;
|
104
104
|
Len [j]++ ;
|
105
|
-
AMD_DEBUG3 ((" lower ("ID","ID") ("ID","ID")\n",
|
105
|
+
AMD_DEBUG3 ((" lower (" ID "," ID ") (" ID "," ID ")\n",
|
106
106
|
i,j, j,i)) ;
|
107
107
|
pj++ ;
|
108
108
|
}
|
@@ -135,7 +135,7 @@ GLOBAL size_t AMD_aat /* returns nz in A+A' */
|
|
135
135
|
* add both A (i,j) and A (j,i) to the matrix A+A' */
|
136
136
|
Len [i]++ ;
|
137
137
|
Len [j]++ ;
|
138
|
-
AMD_DEBUG3 ((" lower cleanup ("ID","ID") ("ID","ID")\n",
|
138
|
+
AMD_DEBUG3 ((" lower cleanup (" ID "," ID ") (" ID "," ID ")\n",
|
139
139
|
i,j, j,i)) ;
|
140
140
|
}
|
141
141
|
}
|
@@ -167,7 +167,7 @@ GLOBAL size_t AMD_aat /* returns nz in A+A' */
|
|
167
167
|
|
168
168
|
AMD_DEBUG1 (("AMD nz in A+A', excluding diagonal (nzaat) = %g\n",
|
169
169
|
(scs_float) nzaat)) ;
|
170
|
-
AMD_DEBUG1 ((" nzboth: "ID" nz: "ID" nzdiag: "ID" symmetry: %g\n",
|
170
|
+
AMD_DEBUG1 ((" nzboth: " ID " nz: " ID " nzdiag: " ID " symmetry: %g\n",
|
171
171
|
nzboth, nz, nzdiag, sym)) ;
|
172
172
|
|
173
173
|
if (Info != (scs_float *) NULL)
|
@@ -41,7 +41,7 @@ GLOBAL void AMD_debug_init ( char *s )
|
|
41
41
|
}
|
42
42
|
if (AMD_debug >= 0)
|
43
43
|
{
|
44
|
-
printf ("%s: AMD_debug_init, D= "ID"\n", s, AMD_debug) ;
|
44
|
+
printf ("%s: AMD_debug_init, D= " ID "\n", s, AMD_debug) ;
|
45
45
|
}
|
46
46
|
}
|
47
47
|
|
@@ -75,7 +75,7 @@ GLOBAL void AMD_dump (
|
|
75
75
|
|
76
76
|
if (AMD_debug < 0) return ;
|
77
77
|
ASSERT (pfree <= iwlen) ;
|
78
|
-
AMD_DEBUG3 (("\nAMD dump, pfree: "ID"\n", pfree)) ;
|
78
|
+
AMD_DEBUG3 (("\nAMD dump, pfree: " ID "\n", pfree)) ;
|
79
79
|
for (i = 0 ; i < n ; i++)
|
80
80
|
{
|
81
81
|
pe = Pe [i] ;
|
@@ -88,7 +88,7 @@ GLOBAL void AMD_dump (
|
|
88
88
|
{
|
89
89
|
if (nv == 0)
|
90
90
|
{
|
91
|
-
AMD_DEBUG3 (("\nI "ID": nonprincipal: ", i)) ;
|
91
|
+
AMD_DEBUG3 (("\nI " ID ": nonprincipal: ", i)) ;
|
92
92
|
ASSERT (elen == EMPTY) ;
|
93
93
|
if (pe == EMPTY)
|
94
94
|
{
|
@@ -98,13 +98,13 @@ GLOBAL void AMD_dump (
|
|
98
98
|
else
|
99
99
|
{
|
100
100
|
ASSERT (pe < EMPTY) ;
|
101
|
-
AMD_DEBUG3 ((" i "ID" -> parent "ID"\n", i, FLIP (Pe[i])));
|
101
|
+
AMD_DEBUG3 ((" i " ID " -> parent " ID "\n", i, FLIP (Pe[i])));
|
102
102
|
}
|
103
103
|
}
|
104
104
|
else
|
105
105
|
{
|
106
|
-
AMD_DEBUG3 (("\nI "ID": active principal supervariable:\n",i));
|
107
|
-
AMD_DEBUG3 ((" nv(i): "ID" Flag: %d\n", nv, (nv < 0))) ;
|
106
|
+
AMD_DEBUG3 (("\nI " ID ": active principal supervariable:\n",i));
|
107
|
+
AMD_DEBUG3 ((" nv(i): " ID " Flag: %d\n", nv, (nv < 0))) ;
|
108
108
|
ASSERT (elen >= 0) ;
|
109
109
|
ASSERT (nv > 0 && pe >= 0) ;
|
110
110
|
p = pe ;
|
@@ -114,7 +114,7 @@ GLOBAL void AMD_dump (
|
|
114
114
|
for (k = 0 ; k < len ; k++)
|
115
115
|
{
|
116
116
|
j = Iw [p] ;
|
117
|
-
AMD_DEBUG3 ((" "ID"", j)) ;
|
117
|
+
AMD_DEBUG3 ((" " ID "", j)) ;
|
118
118
|
ASSERT (j >= 0 && j < n) ;
|
119
119
|
if (k == elen-1) AMD_DEBUG3 ((" : ")) ;
|
120
120
|
p++ ;
|
@@ -127,13 +127,13 @@ GLOBAL void AMD_dump (
|
|
127
127
|
e = i ;
|
128
128
|
if (w == 0)
|
129
129
|
{
|
130
|
-
AMD_DEBUG3 (("\nE "ID": absorbed element: w "ID"\n", e, w)) ;
|
130
|
+
AMD_DEBUG3 (("\nE " ID ": absorbed element: w " ID "\n", e, w)) ;
|
131
131
|
ASSERT (nv > 0 && pe < 0) ;
|
132
|
-
AMD_DEBUG3 ((" e "ID" -> parent "ID"\n", e, FLIP (Pe [e]))) ;
|
132
|
+
AMD_DEBUG3 ((" e " ID " -> parent " ID "\n", e, FLIP (Pe [e]))) ;
|
133
133
|
}
|
134
134
|
else
|
135
135
|
{
|
136
|
-
AMD_DEBUG3 (("\nE "ID": unabsorbed element: w "ID"\n", e, w)) ;
|
136
|
+
AMD_DEBUG3 (("\nE " ID ": unabsorbed element: w " ID "\n", e, w)) ;
|
137
137
|
ASSERT (nv > 0 && pe >= 0) ;
|
138
138
|
p = pe ;
|
139
139
|
AMD_DEBUG3 ((" : ")) ;
|
@@ -141,7 +141,7 @@ GLOBAL void AMD_dump (
|
|
141
141
|
for (k = 0 ; k < len ; k++)
|
142
142
|
{
|
143
143
|
j = Iw [p] ;
|
144
|
-
AMD_DEBUG3 ((" "ID"", j)) ;
|
144
|
+
AMD_DEBUG3 ((" " ID "", j)) ;
|
145
145
|
ASSERT (j >= 0 && j < n) ;
|
146
146
|
p++ ;
|
147
147
|
}
|
@@ -162,7 +162,7 @@ GLOBAL void AMD_dump (
|
|
162
162
|
AMD_DEBUG3 ((ID": \n", deg)) ;
|
163
163
|
for (i = Head [deg] ; i != EMPTY ; i = Next [i])
|
164
164
|
{
|
165
|
-
AMD_DEBUG3 ((" "ID" : next "ID" last "ID" deg "ID"\n",
|
165
|
+
AMD_DEBUG3 ((" " ID " : next " ID " last " ID " deg " ID "\n",
|
166
166
|
i, Next [i], Last [i], Degree [i])) ;
|
167
167
|
ASSERT (i >= 0 && i < n && ilast == Last [i] &&
|
168
168
|
deg == Degree [i]) ;
|
@@ -64,7 +64,7 @@ GLOBAL Int AMD_post_tree
|
|
64
64
|
/* get head of stack */
|
65
65
|
ASSERT (head < nn) ;
|
66
66
|
i = Stack [head] ;
|
67
|
-
AMD_DEBUG1 (("head of stack "ID" \n", i)) ;
|
67
|
+
AMD_DEBUG1 (("head of stack " ID " \n", i)) ;
|
68
68
|
ASSERT (i >= 0 && i < nn) ;
|
69
69
|
|
70
70
|
if (Child [i] != EMPTY)
|
@@ -85,7 +85,7 @@ GLOBAL Int AMD_post_tree
|
|
85
85
|
{
|
86
86
|
ASSERT (h > 0) ;
|
87
87
|
Stack [h--] = f ;
|
88
|
-
AMD_DEBUG1 (("push "ID" on stack\n", f)) ;
|
88
|
+
AMD_DEBUG1 (("push " ID " on stack\n", f)) ;
|
89
89
|
ASSERT (f >= 0 && f < nn) ;
|
90
90
|
}
|
91
91
|
ASSERT (Stack [h] == i) ;
|
@@ -98,7 +98,7 @@ GLOBAL Int AMD_post_tree
|
|
98
98
|
/* the children of i (if there were any) are already ordered */
|
99
99
|
/* remove i from the stack and order it. Front i is kth front */
|
100
100
|
head-- ;
|
101
|
-
AMD_DEBUG1 (("pop "ID" order "ID"\n", i, k)) ;
|
101
|
+
AMD_DEBUG1 (("pop " ID " order " ID "\n", i, k)) ;
|
102
102
|
Order [i] = k++ ;
|
103
103
|
ASSERT (k <= nn) ;
|
104
104
|
}
|
@@ -67,8 +67,8 @@ GLOBAL void AMD_postorder
|
|
67
67
|
{
|
68
68
|
if (Nv [j] > 0)
|
69
69
|
{
|
70
|
-
AMD_DEBUG1 (( ""ID" : nels "ID" npiv "ID" size "ID
|
71
|
-
" parent "ID" maxfr "ID"\n", j, nels,
|
70
|
+
AMD_DEBUG1 (( "" ID " : nels " ID " npiv " ID " size "ID
|
71
|
+
" parent " ID " maxfr " ID "\n", j, nels,
|
72
72
|
Nv [j], Fsize [j], Parent [j], Fsize [j])) ;
|
73
73
|
/* this is an element */
|
74
74
|
/* dump the link list of children */
|
@@ -106,12 +106,12 @@ GLOBAL void AMD_postorder
|
|
106
106
|
|
107
107
|
#ifndef NDEBUG
|
108
108
|
Int nchild ;
|
109
|
-
AMD_DEBUG1 (("Before partial sort, element "ID"\n", i)) ;
|
109
|
+
AMD_DEBUG1 (("Before partial sort, element " ID "\n", i)) ;
|
110
110
|
nchild = 0 ;
|
111
111
|
for (f = Child [i] ; f != EMPTY ; f = Sibling [f])
|
112
112
|
{
|
113
113
|
ASSERT (f >= 0 && f < nn) ;
|
114
|
-
AMD_DEBUG1 ((" f: "ID" size: "ID"\n", f, Fsize [f])) ;
|
114
|
+
AMD_DEBUG1 ((" f: " ID " size: " ID "\n", f, Fsize [f])) ;
|
115
115
|
nchild++ ;
|
116
116
|
ASSERT (nchild <= nn) ;
|
117
117
|
}
|
@@ -139,7 +139,7 @@ GLOBAL void AMD_postorder
|
|
139
139
|
|
140
140
|
fnext = Sibling [bigf] ;
|
141
141
|
|
142
|
-
AMD_DEBUG1 (("bigf "ID" maxfrsize "ID" bigfprev "ID" fnext "ID
|
142
|
+
AMD_DEBUG1 (("bigf " ID " maxfrsize " ID " bigfprev " ID " fnext " ID
|
143
143
|
" fprev " ID"\n", bigf, maxfrsize, bigfprev, fnext, fprev)) ;
|
144
144
|
|
145
145
|
if (fnext != EMPTY)
|
@@ -166,11 +166,11 @@ GLOBAL void AMD_postorder
|
|
166
166
|
}
|
167
167
|
|
168
168
|
#ifndef NDEBUG
|
169
|
-
AMD_DEBUG1 (("After partial sort, element "ID"\n", i)) ;
|
169
|
+
AMD_DEBUG1 (("After partial sort, element " ID "\n", i)) ;
|
170
170
|
for (f = Child [i] ; f != EMPTY ; f = Sibling [f])
|
171
171
|
{
|
172
172
|
ASSERT (f >= 0 && f < nn) ;
|
173
|
-
AMD_DEBUG1 ((" "ID" "ID"\n", f, Fsize [f])) ;
|
173
|
+
AMD_DEBUG1 ((" " ID " " ID "\n", f, Fsize [f])) ;
|
174
174
|
ASSERT (Nv [f] > 0) ;
|
175
175
|
nchild-- ;
|
176
176
|
}
|
@@ -195,7 +195,7 @@ GLOBAL void AMD_postorder
|
|
195
195
|
{
|
196
196
|
if (Parent [i] == EMPTY && Nv [i] > 0)
|
197
197
|
{
|
198
|
-
AMD_DEBUG1 (("Root of assembly tree "ID"\n", i)) ;
|
198
|
+
AMD_DEBUG1 (("Root of assembly tree " ID "\n", i)) ;
|
199
199
|
k = AMD_post_tree (i, k, Child, Sibling, Order, Stack
|
200
200
|
#ifndef NDEBUG
|
201
201
|
, nn
|
@@ -61,28 +61,28 @@ GLOBAL Int AMD_valid
|
|
61
61
|
{
|
62
62
|
p1 = Ap [j] ;
|
63
63
|
p2 = Ap [j+1] ;
|
64
|
-
AMD_DEBUG2 (("\nColumn: "ID" p1: "ID" p2: "ID"\n", j, p1, p2)) ;
|
64
|
+
AMD_DEBUG2 (("\nColumn: " ID " p1: " ID " p2: " ID "\n", j, p1, p2)) ;
|
65
65
|
if (p1 > p2)
|
66
66
|
{
|
67
67
|
/* column pointers must be ascending */
|
68
|
-
AMD_DEBUG0 (("column "ID" pointer bad\n", j)) ;
|
68
|
+
AMD_DEBUG0 (("column " ID " pointer bad\n", j)) ;
|
69
69
|
return (AMD_INVALID) ;
|
70
70
|
}
|
71
71
|
ilast = EMPTY ;
|
72
72
|
for (p = p1 ; p < p2 ; p++)
|
73
73
|
{
|
74
74
|
i = Ai [p] ;
|
75
|
-
AMD_DEBUG3 (("row: "ID"\n", i)) ;
|
75
|
+
AMD_DEBUG3 (("row: " ID "\n", i)) ;
|
76
76
|
if (i < 0 || i >= n_row)
|
77
77
|
{
|
78
78
|
/* row index out of range */
|
79
|
-
AMD_DEBUG0 (("index out of range, col "ID" row "ID"\n", j, i));
|
79
|
+
AMD_DEBUG0 (("index out of range, col " ID " row " ID "\n", j, i));
|
80
80
|
return (AMD_INVALID) ;
|
81
81
|
}
|
82
82
|
if (i <= ilast)
|
83
83
|
{
|
84
84
|
/* row index unsorted, or duplicate entry present */
|
85
|
-
AMD_DEBUG1 (("index unsorted/dupl col "ID" row "ID"\n", j, i));
|
85
|
+
AMD_DEBUG1 (("index unsorted/dupl col " ID " row " ID "\n", j, i));
|
86
86
|
result = AMD_OK_BUT_JUMBLED ;
|
87
87
|
}
|
88
88
|
ilast = i ;
|
data/vendor/scs/src/cones.c
CHANGED
@@ -3,18 +3,36 @@
|
|
3
3
|
#include "scs.h"
|
4
4
|
#include "scs_blas.h" /* contains BLAS(X) macros and type info */
|
5
5
|
#include "util.h"
|
6
|
-
#
|
6
|
+
#if defined(_MSC_VER)
|
7
|
+
/* MSVC: no C99 <complex.h> */
|
8
|
+
#else
|
9
|
+
#include <complex.h>
|
10
|
+
#endif
|
7
11
|
|
8
12
|
// We need these definitions here to avoid including complex.h in scs_types.h.
|
9
13
|
// Including complex.h in scs_types.h causes issues when building with C++
|
10
14
|
// compilers. Reach out to Daniel Cederberg if you have any questions about the
|
11
15
|
// following 7 lines of code.
|
12
|
-
#
|
13
|
-
|
14
|
-
|
16
|
+
#if defined(_MSC_VER)
|
17
|
+
/* MSVC C: use POD layout compatible with interleaved BLAS complex */
|
18
|
+
typedef struct { double real, imag; } scs_blas_cdouble;
|
19
|
+
typedef struct { float real, imag; } scs_blas_cfloat;
|
20
|
+
#ifndef SFLOAT
|
21
|
+
#define SCS_BLAS_COMPLEX_TYPE scs_blas_cdouble
|
22
|
+
#define SCS_BLAS_COMPLEX_CAST(x) ((scs_blas_cdouble *)(x))
|
23
|
+
#else
|
24
|
+
#define SCS_BLAS_COMPLEX_TYPE scs_blas_cfloat
|
25
|
+
#define SCS_BLAS_COMPLEX_CAST(x) ((scs_blas_cfloat *)(x))
|
26
|
+
#endif
|
15
27
|
#else
|
16
|
-
|
17
|
-
#
|
28
|
+
/* GCC/Clang: keep using C99 _Complex */
|
29
|
+
#ifndef SFLOAT
|
30
|
+
#define SCS_BLAS_COMPLEX_CAST(x) ((double _Complex *)(x))
|
31
|
+
#define SCS_BLAS_COMPLEX_TYPE double _Complex
|
32
|
+
#else
|
33
|
+
#define SCS_BLAS_COMPLEX_CAST(x) ((float _Complex *)(x))
|
34
|
+
#define SCS_BLAS_COMPLEX_TYPE float _Complex
|
35
|
+
#endif
|
18
36
|
#endif
|
19
37
|
|
20
38
|
#define BOX_CONE_MAX_ITERS (25)
|
@@ -245,7 +263,7 @@ static inline scs_int get_csd_cone_size(scs_int cs) {
|
|
245
263
|
void set_cone_boundaries(const ScsCone *k, ScsConeWork *c) {
|
246
264
|
scs_int i, s_cone_sz, cs_cone_sz, count = 0;
|
247
265
|
#ifdef USE_SPECTRAL_CONES
|
248
|
-
scs_int cone_boundaries_len = 1 + k->qsize + k->ssize +
|
266
|
+
scs_int cone_boundaries_len = 1 + k->qsize + k->ssize + k->cssize + k->ed +
|
249
267
|
k->ep + k->psize + k->dsize + k->nucsize +
|
250
268
|
k->ell1_size + k->sl_size;
|
251
269
|
#else
|
@@ -602,7 +620,7 @@ char *SCS(get_cone_header)(const ScsCone *k) {
|
|
602
620
|
for (i = 0; i < k->cssize; i++) {
|
603
621
|
csd_vars += get_csd_cone_size(k->cs[i]);
|
604
622
|
}
|
605
|
-
sprintf(tmp + strlen(tmp), "\t cs: complex psd vars: %li,
|
623
|
+
sprintf(tmp + strlen(tmp), "\t cs: complex psd vars: %li, cssize: %li\n",
|
606
624
|
(long)csd_vars, (long)k->cssize);
|
607
625
|
}
|
608
626
|
if (k->ep || k->ed) {
|