relay.c

Go to the documentation of this file.
00001 /* Copyright INRIA */
00002 #include "machine.h"
00003 
00004 void 
00005 relay(flag,nevprt,t,xd,x,nx,z,nz,tvec,ntvec,rpar,nrpar,
00006                ipar,nipar,inptr,insz,nin,outptr,outsz,nout)
00007 integer *flag,*nevprt,*nx,*nz,*ntvec,*nrpar,ipar[],*nipar,insz[],*nin,outsz[],*nout;
00008 double x[],xd[],z[],tvec[],rpar[];
00009 double *inptr[],*outptr[],*t;
00010 
00011 {
00012 
00013     int k;
00014     double *y;
00015     double *u;
00016     int nev,ic;
00017     ic=(int)z[0];
00018     if ((*flag)<3) {
00019       if ((*nevprt)>0) {
00020         ic=-1;
00021         nev=*nevprt;
00022         while (nev>=1) {
00023           ic=ic+1;
00024           nev=nev/2;
00025         }
00026       }
00027       if ((*flag)==2) {z[0]=ic;return ;}
00028       if (*nin>1) {
00029         y=(double *)outptr[0];
00030         u=(double *)inptr[ic];
00031         for (k=0;k<outsz[0];k++)
00032           *(y++)=*(u++);  
00033       }
00034       else {
00035         y=(double *)outptr[ic];
00036         u=(double *)inptr[0];
00037         for (k=0;k<outsz[0];k++)
00038           *(y++)=*(u++);  
00039       }
00040     }
00041 }
00042 
00043 

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