summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/LAPACK
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-09-11 09:10:24 +0000
committerAlberto Ruiz <aruiz@um.es>2010-09-11 09:10:24 +0000
commitec9965371be5b37234684ba392f55a1a1e24f053 (patch)
treefae00b984fc8499e19952200f1b3f9f7ee5f2d20 /lib/Numeric/LinearAlgebra/LAPACK
parentae6d18808cef554979b99cc55f46d5324518df01 (diff)
optimized conjugate
Diffstat (limited to 'lib/Numeric/LinearAlgebra/LAPACK')
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
index 9e44431..2c4c647 100644
--- a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
+++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
@@ -1201,3 +1201,28 @@ int double2float(DVEC(x),FVEC(y)) {
1201 } 1201 }
1202 OK 1202 OK
1203} 1203}
1204
1205//////////////////// conjugate /////////////////////////
1206
1207int conjugateQ(KQVEC(x),QVEC(t)) {
1208 REQUIRES(xn==tn,BAD_SIZE);
1209 DEBUGMSG("conjugateQ");
1210 int k;
1211 for(k=0;k<xn;k++) {
1212 ((complex*)tp)[k].r=((complex*)xp)[k].r;
1213 ((complex*)tp)[k].i=-((complex*)xp)[k].i;
1214 }
1215 OK
1216}
1217
1218int conjugateC(KCVEC(x),CVEC(t)) {
1219 REQUIRES(xn==tn,BAD_SIZE);
1220 DEBUGMSG("conjugateC");
1221 int k;
1222 for(k=0;k<xn;k++) {
1223 ((doublecomplex*)tp)[k].r=((doublecomplex*)xp)[k].r;
1224 ((doublecomplex*)tp)[k].i=-((doublecomplex*)xp)[k].i;
1225 }
1226 OK
1227}
1228