SCM

SCM Repository

[matrix] Diff of /pkg/src/dsyMatrix.c
ViewVC logotype

Diff of /pkg/src/dsyMatrix.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2037, Mon Aug 6 12:56:56 2007 UTC revision 2038, Mon Aug 6 16:43:03 2007 UTC
# Line 116  Line 116 
116          *bdims = INTEGER(GET_SLOT(val, Matrix_DimSym)),          *bdims = INTEGER(GET_SLOT(val, Matrix_DimSym)),
117          m = bdims[0], n = bdims[1];          m = bdims[0], n = bdims[1];
118      double one = 1., zero = 0.;      double one = 1., zero = 0.;
119        double *vx = REAL(GET_SLOT(val, Matrix_xSym));
120        double *bcp = Memcpy(Alloca(m * n, double), vx, m * n);
121        R_CheckStack();
122    
123      if ((rt && n != adims[0]) || (!rt && m != adims[0]))      if ((rt && n != adims[0]) || (!rt && m != adims[0]))
124          error(_("Matrices are not conformable for multiplication"));          error(_("Matrices are not conformable for multiplication"));
125      if (m < 1 || n < 1)      if (m < 1 || n < 1)
126          error(_("Matrices with zero extents cannot be multiplied"));          error(_("Matrices with zero extents cannot be multiplied"));
127      F77_CALL(dsymm)(rt ? "R" :"L", uplo_P(a), &m, &n, &one,      F77_CALL(dsymm)(rt ? "R" :"L", uplo_P(a), &m, &n, &one,
128                      REAL(GET_SLOT(a, Matrix_xSym)), adims,                      REAL(GET_SLOT(a, Matrix_xSym)), adims, bcp,
129                      REAL(GET_SLOT(b, Matrix_xSym)), &m,                      &m, &zero, vx, &m);
                     &zero, REAL(GET_SLOT(val, Matrix_xSym)), &m);  
130      UNPROTECT(1);      UNPROTECT(1);
131      return val;      return val;
132  }  }

Legend:
Removed from v.2037  
changed lines
  Added in v.2038

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge