plusblk.c

Go to the documentation of this file.
00001 /* Copyright INRIA */
00002 #include "machine.h"
00003 
00004 /* Element wise som */
00005 
00006 void 
00007 plusblk(flag,nevprt,t,xd,x,nx,z,nz,tvec,ntvec,rpar,nrpar,
00008                ipar,nipar,inptr,insz,nin,outptr,outsz,nout)
00009      integer *flag,*nevprt,*nx,*nz,*ntvec,*nrpar,ipar[],*nipar,insz[];
00010      integer *nin,outsz[],*nout;
00011      double x[],xd[],z[],tvec[],rpar[];
00012      double *inptr[],*outptr[],*t;
00013 {
00014     int k,i,n;
00015     double *y;
00016     double *u;
00017 
00018     n=outsz[0]; /* insz[0]==insz[1] .. ==insz[*nin]== outsz[0] */
00019 
00020     y=(double *)outptr[0];
00021 
00022     for (i=0;i<n;i++) {
00023       y[i]=0.0;
00024       for (k=0;k<*nin;k++) {
00025         u=(double *)inptr[k];
00026         y[i]=y[i]+u[i];
00027       }
00028     }
00029 }

Generated on Sun Mar 4 15:03:59 2007 for Scilab [trunk] by  doxygen 1.5.1