SCM

SCM Repository

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

Diff of /pkg/Matrix/src/t_gCMatrix_colSums.c

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

revision 1959, Fri Jul 6 16:40:47 2007 UTC revision 1960, Fri Jul 6 16:54:43 2007 UTC
# Line 153  Line 153 
153  {  {
154      int mn = asLogical(means), sp = asLogical(spRes), tr = asLogical(trans);      int mn = asLogical(means), sp = asLogical(spRes), tr = asLogical(trans);
155      /* cholmod_sparse: drawback of coercing lgC to double: */      /* cholmod_sparse: drawback of coercing lgC to double: */
156      cholmod_sparse *cx = as_cholmod_sparse(x);      CHM_SP cx = AS_CHM_SP(x);
157        R_CheckStack();
158    
159      if (tr) {      if (tr) {
160          cholmod_sparse *cxt = cholmod_transpose(cx, (int)cx->xtype, &c);          cholmod_sparse *cxt = cholmod_transpose(cx, (int)cx->xtype, &c);
         Free(cx);  
161          cx = cxt;          cx = cxt;
162      }      }
163    
164      /* everything else *after* the above potential transpose : */      /* everything else *after* the above potential transpose : */
165        /* Don't declarations here require the C99 standard?  Can we assume C99? */
166    
167      int j, nc = cx->ncol;      int j, nc = cx->ncol;
168      int *xp = (int *)(cx -> p);      int *xp = (int *)(cx -> p);
169  #ifdef _has_x_slot_  #ifdef _has_x_slot_
# Line 202  Line 206 
206          }          }
207      }      }
208    
209      if (tr) cholmod_free_sparse(&cx, &c); else Free(cx);      if (tr) cholmod_free_sparse(&cx, &c);
210      UNPROTECT(1);      UNPROTECT(1);
211      return ans;      return ans;
212  }  }

Legend:
Removed from v.1959  
changed lines
  Added in v.1960

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