SCM

SCM Repository

[matrix] Diff of /pkg/src/Mutils.h
ViewVC logotype

Diff of /pkg/src/Mutils.h

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

revision 766, Tue Jun 7 23:03:34 2005 UTC revision 862, Thu Aug 18 21:31:07 2005 UTC
# Line 60  Line 60 
60  double *full_to_packed(double *dest, const double *src, int n,  double *full_to_packed(double *dest, const double *src, int n,
61                         enum CBLAS_UPLO uplo, enum CBLAS_DIAG diag);                         enum CBLAS_UPLO uplo, enum CBLAS_DIAG diag);
62  double *packed_getDiag(double *dest, SEXP x);  double *packed_getDiag(double *dest, SEXP x);
63    SEXP Matrix_getElement(SEXP list, char *nm);
64    
65    
66  extern   /* stored pointers to symbols initialized in R_init_Matrix */  extern   /* stored pointers to symbols initialized in R_init_Matrix */
# Line 239  Line 240 
240    
241  SEXP Matrix_expand_pointers(SEXP pP);  SEXP Matrix_expand_pointers(SEXP pP);
242    
243    
244    /**
245     * Elementwise increment dest by src
246     *
247     * @param dest vector to be incremented
248     * @param src vector to be added to dest
249     * @param n length of vectors
250     *
251     * @return dest
252     */
253    static R_INLINE double*
254    vecIncrement(double dest[], const double src[], int n) {
255        int i;
256        for (i = 0; i < n; i++) dest[i] += src[i];
257        return dest;
258    }
259    
260    /**
261     * Elementwise sum of src1 and src2 into dest
262     *
263     * @param dest vector to be incremented
264     * @param src1 vector to be added
265     * @param src1 second vector to be added
266     * @param n length of vectors
267     *
268     * @return dest
269     */
270    static R_INLINE double*
271    vecSum(double dest[], const double src1[], const double src2[],
272           int n) {
273        int i;
274        for (i = 0; i < n; i++) dest[i] = src1[i] + src2[i];
275        return dest;
276    }
277    
278  #ifdef __cplusplus  #ifdef __cplusplus
279  }  }
280  #endif  #endif

Legend:
Removed from v.766  
changed lines
  Added in v.862

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