Diff for /rpl/src/instructions_f2.c between versions 1.42 and 1.43

version 1.42, 2013/02/27 17:11:42 version 1.43, 2013/03/20 17:11:45
Line 164  instruction_fleche_array(struct_processu Line 164  instruction_fleche_array(struct_processu
     struct_objet                    *s_objet;      struct_objet                    *s_objet;
     struct_objet                    *s_objet_elementaire;      struct_objet                    *s_objet_elementaire;
   
     unsigned long                   i;      integer8                        i;
     unsigned long                   j;      integer8                        j;
     unsigned long                   nombre_colonnes;      integer8                        nombre_colonnes;
     unsigned long                   nombre_lignes;      integer8                        nombre_lignes;
     unsigned long                   nombre_dimensions;      integer8                        nombre_dimensions;
     unsigned long                   nombre_termes;      integer8                        nombre_termes;
   
     (*s_etat_processus).erreur_execution = d_ex;      (*s_etat_processus).erreur_execution = d_ex;
   
Line 343  instruction_fleche_array(struct_processu Line 343  instruction_fleche_array(struct_processu
             }              }
   
             if (((*((struct_vecteur *) (*s_objet).objet)).tableau =              if (((*((struct_vecteur *) (*s_objet).objet)).tableau =
                     malloc(nombre_lignes * sizeof(integer8))) == NULL)                      malloc(((size_t) nombre_lignes) * sizeof(integer8)))
                       == NULL)
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;                  (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                 return;                  return;
Line 358  instruction_fleche_array(struct_processu Line 359  instruction_fleche_array(struct_processu
             }              }
   
             if (((*((struct_vecteur *) (*s_objet).objet)).tableau =              if (((*((struct_vecteur *) (*s_objet).objet)).tableau =
                     malloc(nombre_lignes * sizeof(real8))) == NULL)                      malloc(((size_t) nombre_lignes) * sizeof(real8))) == NULL)
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;                  (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                 return;                  return;
Line 373  instruction_fleche_array(struct_processu Line 374  instruction_fleche_array(struct_processu
             }              }
   
             if (((*((struct_vecteur *) (*s_objet).objet)).tableau =              if (((*((struct_vecteur *) (*s_objet).objet)).tableau =
                     malloc(nombre_lignes * sizeof(struct_complexe16)))                      malloc(((size_t) nombre_lignes) *
                     == NULL)                      sizeof(struct_complexe16))) == NULL)
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;                  (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                 return;                  return;
Line 474  instruction_fleche_array(struct_processu Line 475  instruction_fleche_array(struct_processu
             }              }
   
             if (((*((struct_matrice *) (*s_objet).objet)).tableau =              if (((*((struct_matrice *) (*s_objet).objet)).tableau =
                     malloc(nombre_lignes * sizeof(integer8 *))) == NULL)                      malloc(((size_t) nombre_lignes) * sizeof(integer8 *)))
                       == NULL)
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;                  (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                 return;                  return;
Line 490  instruction_fleche_array(struct_processu Line 492  instruction_fleche_array(struct_processu
             }              }
   
             if (((*((struct_matrice *) (*s_objet).objet)).tableau =              if (((*((struct_matrice *) (*s_objet).objet)).tableau =
                     malloc(nombre_lignes * sizeof(real8 *))) == NULL)                      malloc(((size_t) nombre_lignes) * sizeof(real8 *))) == NULL)
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;                  (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                 return;                  return;
Line 506  instruction_fleche_array(struct_processu Line 508  instruction_fleche_array(struct_processu
             }              }
   
             if (((*((struct_matrice *) (*s_objet).objet)).tableau =              if (((*((struct_matrice *) (*s_objet).objet)).tableau =
                     malloc(nombre_lignes * sizeof(struct_complexe16 *)))                      malloc(((size_t) nombre_lignes) *
                     == NULL)                      sizeof(struct_complexe16 *))) == NULL)
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;                  (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                 return;                  return;
Line 524  instruction_fleche_array(struct_processu Line 526  instruction_fleche_array(struct_processu
             {              {
                 if ((((integer8 **) (*((struct_matrice *)                  if ((((integer8 **) (*((struct_matrice *)
                         (*s_objet).objet)).tableau)[nombre_lignes - (i + 1)]                          (*s_objet).objet)).tableau)[nombre_lignes - (i + 1)]
                         = malloc(nombre_colonnes * sizeof(integer8))) == NULL)                          = malloc(((size_t) nombre_colonnes) *
                           sizeof(integer8))) == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
                             d_es_allocation_memoire;                              d_es_allocation_memoire;
Line 535  instruction_fleche_array(struct_processu Line 538  instruction_fleche_array(struct_processu
             {              {
                 if ((((real8 **) (*((struct_matrice *)                  if ((((real8 **) (*((struct_matrice *)
                         (*s_objet).objet)).tableau)[nombre_lignes - (i + 1)]                          (*s_objet).objet)).tableau)[nombre_lignes - (i + 1)]
                         = malloc(nombre_colonnes * sizeof(real8))) == NULL)                          = malloc(((size_t) nombre_colonnes) * sizeof(real8)))
                           == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
                             d_es_allocation_memoire;                              d_es_allocation_memoire;
Line 546  instruction_fleche_array(struct_processu Line 550  instruction_fleche_array(struct_processu
             {              {
                 if ((((struct_complexe16 **) (*((struct_matrice *)                  if ((((struct_complexe16 **) (*((struct_matrice *)
                         (*s_objet).objet)).tableau)[nombre_lignes - (i + 1)]                          (*s_objet).objet)).tableau)[nombre_lignes - (i + 1)]
                         = malloc(nombre_colonnes * sizeof(struct_complexe16)))                          = malloc(((size_t) nombre_colonnes)
                         == NULL)                          * sizeof(struct_complexe16))) == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
                             d_es_allocation_memoire;                              d_es_allocation_memoire;
Line 733  instruction_fleche_str(struct_processus Line 737  instruction_fleche_str(struct_processus
     unsigned char                   *ptr_e;      unsigned char                   *ptr_e;
     unsigned char                   *ptr_l;      unsigned char                   *ptr_l;
   
     unsigned long                   caracteres_echappement;      integer8                        caracteres_echappement;
   
     (*s_etat_processus).erreur_execution = d_ex;      (*s_etat_processus).erreur_execution = d_ex;
   
Line 813  instruction_fleche_str(struct_processus Line 817  instruction_fleche_str(struct_processus
     }      }
   
     if (((*s_objet_resultat).objet = malloc((strlen(ligne) + 1 +      if (((*s_objet_resultat).objet = malloc((strlen(ligne) + 1 +
             caracteres_echappement) * sizeof(unsigned char))) == NULL)              ((size_t) caracteres_echappement)) * sizeof(unsigned char)))
               == NULL)
     {      {
         (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;          (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
         return;          return;
Line 918  instruction_fft(struct_processus *s_etat Line 923  instruction_fft(struct_processus *s_etat
     struct_objet                *s_objet_longueur_fft;      struct_objet                *s_objet_longueur_fft;
     struct_objet                *s_objet_resultat;      struct_objet                *s_objet_resultat;
   
     unsigned long               i;      integer8                    i;
     unsigned long               j;      integer8                    j;
     unsigned long               k;      integer8                    k;
     unsigned long               longueur_fft;      integer8                    longueur_fft;
   
     (*s_etat_processus).erreur_execution =d_ex;      (*s_etat_processus).erreur_execution =d_ex;
   
Line 1035  instruction_fft(struct_processus *s_etat Line 1040  instruction_fft(struct_processus *s_etat
     {      {
         if (presence_longueur_fft == d_faux)          if (presence_longueur_fft == d_faux)
         {          {
             longueur_fft = pow(2, (integer4) ceil(log((real8)              longueur_fft = (integer8) pow(2, ceil(log((real8)
                     (*((struct_vecteur *)                      (*((struct_vecteur *)
                     (*s_objet_argument).objet)).taille) / log((real8) 2)));                      (*s_objet_argument).objet)).taille) / log((real8) 2)));
   
             if ((longueur_fft / ((real8) (*((struct_vecteur *)              if ((((real8) longueur_fft) / ((real8) (*((struct_vecteur *)
                     (*s_objet_argument).objet)).taille)) == 2)                      (*s_objet_argument).objet)).taille)) == 2)
             {              {
                 longueur_fft /= 2;                  longueur_fft /= 2;
             }              }
         }          }
   
         if ((matrice_f77 = malloc(longueur_fft *          if ((matrice_f77 = malloc(((size_t) longueur_fft) *
                 sizeof(struct_complexe16))) == NULL)                  sizeof(struct_complexe16))) == NULL)
         {          {
             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;              (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
Line 1096  instruction_fft(struct_processus *s_etat Line 1101  instruction_fft(struct_processus *s_etat
         }          }
   
         nombre_lignes = 1;          nombre_lignes = 1;
         nombre_colonnes = longueur_fft;          nombre_colonnes = (integer4) longueur_fft;
         inverse = 0;          inverse = 0;
   
         dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur);          dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur);
Line 1133  instruction_fft(struct_processus *s_etat Line 1138  instruction_fft(struct_processus *s_etat
     {      {
         if (presence_longueur_fft == d_faux)          if (presence_longueur_fft == d_faux)
         {          {
             longueur_fft = pow(2, (integer4) ceil(log((real8)              longueur_fft = (integer8) pow(2, ceil(log((real8)
                     (*((struct_matrice *)                      (*((struct_matrice *)
                     (*s_objet_argument).objet)).nombre_colonnes) /                      (*s_objet_argument).objet)).nombre_colonnes) /
                     log((real8) 2)));                      log((real8) 2)));
   
             if ((longueur_fft / ((real8) (*((struct_matrice *)              if ((((real8) longueur_fft) / ((real8) (*((struct_matrice *)
                     (*s_objet_argument).objet)).nombre_colonnes)) == 2)                      (*s_objet_argument).objet)).nombre_colonnes)) == 2)
             {              {
                 longueur_fft /= 2;                  longueur_fft /= 2;
             }              }
         }          }
   
         if ((matrice_f77 = malloc(longueur_fft *          if ((matrice_f77 = malloc(((size_t) longueur_fft) * ((size_t)
                 (*((struct_matrice *) (*s_objet_argument).objet))                  (*((struct_matrice *) (*s_objet_argument).objet))
                 .nombre_lignes * sizeof(struct_complexe16))) == NULL)                  .nombre_lignes) * sizeof(struct_complexe16))) == NULL)
         {          {
             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;              (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
             return;              return;
Line 1223  instruction_fft(struct_processus *s_etat Line 1228  instruction_fft(struct_processus *s_etat
             }              }
         }          }
   
         nombre_lignes = (*((struct_matrice *) (*s_objet_argument).objet))          nombre_lignes = (integer4) (*((struct_matrice *)
                 .nombre_lignes;                  (*s_objet_argument).objet)).nombre_lignes;
         nombre_colonnes = longueur_fft;          nombre_colonnes = (integer4) longueur_fft;
         inverse = 0;          inverse = 0;
   
         dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur);          dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur);
Line 1253  instruction_fft(struct_processus *s_etat Line 1258  instruction_fft(struct_processus *s_etat
                 longueur_fft;                  longueur_fft;
   
         if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau =          if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau =
                 malloc((*((struct_matrice *) (*s_objet_resultat).objet))                  malloc(((size_t) (*((struct_matrice *)
                 .nombre_lignes * sizeof(struct_complexe16 *))) == NULL)                  (*s_objet_resultat).objet)).nombre_lignes)
                   * sizeof(struct_complexe16 *))) == NULL)
         {          {
             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;              (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
             return;              return;
Line 1265  instruction_fft(struct_processus *s_etat Line 1271  instruction_fft(struct_processus *s_etat
         {          {
             if ((((struct_complexe16 **) (*((struct_matrice *)              if ((((struct_complexe16 **) (*((struct_matrice *)
                     (*s_objet_resultat).objet)).tableau)[i] =                      (*s_objet_resultat).objet)).tableau)[i] =
                     malloc((*((struct_matrice *)                      malloc(((size_t) (*((struct_matrice *)
                     (*s_objet_resultat).objet)).nombre_colonnes *                      (*s_objet_resultat).objet)).nombre_colonnes) *
                     sizeof(struct_complexe16))) == NULL)                      sizeof(struct_complexe16))) == NULL)
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;                  (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;

Removed from v.1.42  
changed lines
  Added in v.1.43


CVSweb interface <joel.bertrand@systella.fr>