/* decod_c subroutine * Symbol by chip demodulation * * Copyright (C) 2007-2009 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" /* decod_c routine de multiplication code par symbole * nuc : taille du vecteur code * nus : taille du vecteur symbole * c : adresse de départ du vecteur code * s : adresse de départ du vecteur symbole * y : adresse de départ du vecteur résultat */ void decod_c(int *nuc,int *nus,double *c,double *s,double *y) { /*Déclaration des variables compteur*/ int i,j; int ind_y; /*Réalise multiplication code[j] par symbole[i]*/ for (i=0;i<(*nus);i++) { ind_y = i*(*nuc); for(j=0;j<(*nuc);j++) { y[ind_y+j]=s[ind_y+j]*c[j]; } } return; } void decoddi_c(int *nuc,int *nus,int *c,double *s,double *y) { /*Déclaration des variables compteur*/ int i,j; int ind_y; /*Réalise multiplication code[j] par symbole[i]*/ for (i=0;i<(*nus);i++) { ind_y = i*(*nuc); for(j=0;j<(*nuc);j++) { y[ind_y+j]=s[ind_y+j]*c[j]; } } return; } void decodi_c(int *nuc,int *nus,int *c,int *s,int *y) { /*Déclaration des variables compteur*/ int i,j; int ind_y; /*Réalise multiplication code[j] par symbole[i]*/ for (i=0;i<(*nus);i++) { ind_y = i*(*nuc); for(j=0;j<(*nuc);j++) { y[ind_y+j]=s[ind_y+j]*c[j]; } } return; } void decodid_c(int *nuc,int *nus,double *c,int *s,int *y) { /*Déclaration des variables compteur*/ int i,j; int ind_y; /*Réalise multiplication code[j] par symbole[i]*/ for (i=0;i<(*nus);i++) { ind_y = i*(*nuc); for(j=0;j<(*nuc);j++) { y[ind_y+j]=s[ind_y+j]*c[j]; } } return; }