Low level routine
fr -
eng
overlaprsr_c - vectorial right shift register with memory computational routine
- n :
size of vectors
- m :
number of shift (set the size of the memory word)
- u :
address of the input vector
- y :
address of the output vector.
- z :
address of the memory word
/* overlaprsr_c subroutine
* Vectorial Right Shift Register
* with memory word
*
* Copyright (C) 2007-2011 Alan Layec
*
* This file is part of modnumlib.
*
* modnumlib is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* modnumlib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with modnumlib; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/* REVISION HISTORY :
* $Log$
*/
#include "modnum_lib.h"
/* overlaprsr_c routine de calcul de décalage vectoriel à droite avec
* mot mémoire
*
* Entrées :
* n : taille du vecteur
* m : longueur du décalage (taille du mot mémoire)
* u : adresse de départ du vecteur d'entrée
* Sorties :
* y : adresse de départ du vecteur de sortie
* Entrée/Sortie :
* z : adresse de départ du vecteur mémoire
*/
void overlaprsr_c(int *n,int *m,double *u,double *y,double *z)
{
/*Déclaration des variables compteurs*/
int i;
for(i=0;i<(*m);i++)
{
y[i]=z[i];
z[i]=u[((*n)-(*m))+i];
}
for(i=(*m);i<(*n);i++) y[i]=u[i-(*m)];
return;
}
A. Layec