summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
diff options
context:
space:
mode:
authorVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-09-19 10:25:39 +0000
committerVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-09-19 10:25:39 +0000
commit503f598801b67886028d9ffdfdef38813954e46f (patch)
treee114d895cf0fe757117e32589883c15c13f04b91 /lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
parent9593058746aaf1f5afd9ce78c1dd5d64ef7b05a6 (diff)
C functions for Storable a => transdata, constantD
Diffstat (limited to 'lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c')
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
index 09979cd..e8bbbdb 100644
--- a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
+++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
@@ -1139,6 +1139,19 @@ int transC(KCMAT(x),CMAT(t)) {
1139 OK 1139 OK
1140} 1140}
1141 1141
1142int transP(KPMAT(x), PMAT(t)) {
1143 REQUIRES(xr==tc && xc==tr,BAD_SIZE);
1144 REQUIRES(xs==ts,NOCONVER);
1145 DEBUGMSG("transP");
1146 int i,j;
1147 for (i=0; i<tr; i++) {
1148 for (j=0; j<tc; j++) {
1149 memcpy(tp+(i*tc+j)*xs,xp +(j*xc+i)*xs,xs);
1150 }
1151 }
1152 OK
1153}
1154
1142//////////////////// constant ///////////////////////// 1155//////////////////// constant /////////////////////////
1143 1156
1144int constantF(float * pval, FVEC(r)) { 1157int constantF(float * pval, FVEC(r)) {
@@ -1181,6 +1194,15 @@ int constantC(doublecomplex* pval, CVEC(r)) {
1181 OK 1194 OK
1182} 1195}
1183 1196
1197int constantP(void* pval, PVEC(r)) {
1198 DEBUGMSG("constantP")
1199 int k;
1200 for(k=0;k<rn;k++) {
1201 memcpy(rp+k*rs,pval,rs);
1202 }
1203 OK
1204}
1205
1184//////////////////// float-double conversion ///////////////////////// 1206//////////////////// float-double conversion /////////////////////////
1185 1207
1186int float2double(FVEC(x),DVEC(y)) { 1208int float2double(FVEC(x),DVEC(y)) {