summaryrefslogtreecommitdiff
path: root/packages/base/src/C/lapack-aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/C/lapack-aux.c')
-rw-r--r--packages/base/src/C/lapack-aux.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/packages/base/src/C/lapack-aux.c b/packages/base/src/C/lapack-aux.c
index c2cdc62..72f2382 100644
--- a/packages/base/src/C/lapack-aux.c
+++ b/packages/base/src/C/lapack-aux.c
@@ -1535,24 +1535,24 @@ int conjugateC(KCVEC(x),CVEC(t)) {
1535 1535
1536//////////////////// step ///////////////////////// 1536//////////////////// step /////////////////////////
1537 1537
1538int stepF(FVEC(x),FVEC(y)) { 1538#define STEP_IMP \
1539 DEBUGMSG("stepF") 1539 int k; \
1540 int k; 1540 for(k=0;k<xn;k++) { \
1541 for(k=0;k<xn;k++) { 1541 yp[k]=xp[k]>0; \
1542 yp[k]=xp[k]>0; 1542 } \
1543 }
1544 OK 1543 OK
1544
1545int stepF(KFVEC(x),FVEC(y)) {
1546 STEP_IMP
1545} 1547}
1546 1548
1547int stepD(DVEC(x),DVEC(y)) { 1549int stepD(KDVEC(x),DVEC(y)) {
1548 DEBUGMSG("stepD") 1550 STEP_IMP
1549 int k;
1550 for(k=0;k<xn;k++) {
1551 yp[k]=xp[k]>0;
1552 }
1553 OK
1554} 1551}
1555 1552
1553int stepI(KIVEC(x),IVEC(y)) {
1554 STEP_IMP
1555}
1556 1556
1557//////////////////// cond ///////////////////////// 1557//////////////////// cond /////////////////////////
1558 1558
@@ -1576,25 +1576,24 @@ int compareD(KDVEC(x),KDVEC(y),IVEC(r)) {
1576 OK 1576 OK
1577} 1577}
1578 1578
1579#define COND_IMP \
1580 REQUIRES(xn==yn && xn==ltn && xn==eqn && xn==gtn && xn==rn ,BAD_SIZE); \
1581 int k; \
1582 for(k=0;k<xn;k++) { \
1583 rp[k] = xp[k]<yp[k]?ltp[k]:(xp[k]>yp[k]?gtp[k]:eqp[k]); \
1584 } \
1585 OK
1579 1586
1580int condF(FVEC(x),FVEC(y),FVEC(lt),FVEC(eq),FVEC(gt),FVEC(r)) { 1587int condF(FVEC(x),FVEC(y),FVEC(lt),FVEC(eq),FVEC(gt),FVEC(r)) {
1581 REQUIRES(xn==yn && xn==ltn && xn==eqn && xn==gtn && xn==rn ,BAD_SIZE); 1588 COND_IMP
1582 DEBUGMSG("condF")
1583 int k;
1584 for(k=0;k<xn;k++) {
1585 rp[k] = xp[k]<yp[k]?ltp[k]:(xp[k]>yp[k]?gtp[k]:eqp[k]);
1586 }
1587 OK
1588} 1589}
1589 1590
1590int condD(DVEC(x),DVEC(y),DVEC(lt),DVEC(eq),DVEC(gt),DVEC(r)) { 1591int condD(DVEC(x),DVEC(y),DVEC(lt),DVEC(eq),DVEC(gt),DVEC(r)) {
1591 REQUIRES(xn==yn && xn==ltn && xn==eqn && xn==gtn && xn==rn ,BAD_SIZE); 1592 COND_IMP
1592 DEBUGMSG("condD") 1593}
1593 int k; 1594
1594 for(k=0;k<xn;k++) { 1595int condI(KIVEC(x),KIVEC(y),KIVEC(lt),KIVEC(eq),KIVEC(gt),IVEC(r)) {
1595 rp[k] = xp[k]<yp[k]?ltp[k]:(xp[k]>yp[k]?gtp[k]:eqp[k]); 1596 COND_IMP
1596 }
1597 OK
1598} 1597}
1599 1598
1600 1599