[BACK]Return to array.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / builtin

Diff for /OpenXM_contrib2/asir2000/builtin/array.c between version 1.40 and 1.41

version 1.40, 2004/12/02 13:53:31 version 1.41, 2004/12/04 09:39:27
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/builtin/array.c,v 1.39 2004/12/01 12:55:19 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/builtin/array.c,v 1.40 2004/12/02 13:53:31 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "base.h"  #include "base.h"
Line 1171  int generic_gauss_elim_hensel(MAT mat,MAT *nmmat,Q *dn
Line 1171  int generic_gauss_elim_hensel(MAT mat,MAT *nmmat,Q *dn
         int *cinfo,*rinfo;          int *cinfo,*rinfo;
         int *rind,*cind;          int *rind,*cind;
         int count;          int count;
         struct oEGT eg_mul,eg_inv,tmp0,tmp1;          int ret;
           struct oEGT eg_mul,eg_inv,eg_intrat,eg_check,tmp0,tmp1;
         int period;          int period;
   
         a0 = (Q **)mat->body;          a0 = (Q **)mat->body;
Line 1220  int generic_gauss_elim_hensel(MAT mat,MAT *nmmat,Q *dn
Line 1221  int generic_gauss_elim_hensel(MAT mat,MAT *nmmat,Q *dn
                         *cindp = cind = (int *)MALLOC_ATOMIC((ri)*sizeof(int));                          *cindp = cind = (int *)MALLOC_ATOMIC((ri)*sizeof(int));
   
                         init_eg(&eg_mul); init_eg(&eg_inv);                          init_eg(&eg_mul); init_eg(&eg_inv);
                           init_eg(&eg_check); init_eg(&eg_intrat);
                         period = F4_INTRAT_PERIOD;                          period = F4_INTRAT_PERIOD;
                         for ( q = ONE, count = 0; ; count++ ) {                          for ( q = ONE, count = 0; ; count++ ) {
                                 if ( DP_Print )                                  if ( DP_Print )
                                         fprintf(stderr,".");                                          fprintf(stderr,"o");
                                 /* wc = -b mod md */                                  /* wc = -b mod md */
                                 for ( i = 0; i < rank; i++ )                                  for ( i = 0; i < rank; i++ )
                                         for ( j = 0, bi = b[i], wi = wc[i]; j < ri; j++ )                                          for ( j = 0, bi = b[i], wi = wc[i]; j < ri; j++ )
Line 1262  int generic_gauss_elim_hensel(MAT mat,MAT *nmmat,Q *dn
Line 1264  int generic_gauss_elim_hensel(MAT mat,MAT *nmmat,Q *dn
                                 add_eg(&eg_mul,&tmp0,&tmp1);                                  add_eg(&eg_mul,&tmp0,&tmp1);
                                 /* q = q*md */                                  /* q = q*md */
                                 mulq(q,mdq,&u); q = u;                                  mulq(q,mdq,&u); q = u;
                                 if ( !(count % period) )                                  if ( !(count % period) ) {
                                         if ( intmtoratm_q(xmat,NM(q),*nmmat,dn) ) {                                          get_eg(&tmp0);
                                           ret = intmtoratm_q(xmat,NM(q),*nmmat,dn);
                                           get_eg(&tmp1); add_eg(&eg_intrat,&tmp0,&tmp1);
                                           if ( ret ) {
                                                 for ( j = k = l = 0; j < col; j++ )                                                  for ( j = k = l = 0; j < col; j++ )
                                                         if ( cinfo[j] )                                                          if ( cinfo[j] )
                                                                 rind[k++] = j;                                                                  rind[k++] = j;
                                                         else                                                          else
                                                                 cind[l++] = j;                                                                  cind[l++] = j;
                                                 if ( gensolve_check(mat,*nmmat,*dn,rind,cind) ) {                                                  get_eg(&tmp0);
                                                   ret = gensolve_check(mat,*nmmat,*dn,rind,cind);
                                                   get_eg(&tmp1); add_eg(&eg_check,&tmp0,&tmp1);
                                                   if ( ret ) {
                                                         if ( DP_Print ) {                                                          if ( DP_Print ) {
                                                                 fprintf(stderr,"\n");                                                                  fprintf(stderr,"\n");
                                                                 print_eg("INV",&eg_inv);                                                                  print_eg("INV",&eg_inv);
                                                                 print_eg("MUL",&eg_mul);                                                                  print_eg("MUL",&eg_mul);
                                                                   print_eg("INTRAT",&eg_intrat);
                                                                   print_eg("CHECK",&eg_check);
                                                                 fflush(asir_out);                                                                  fflush(asir_out);
                                                         }                                                          }
                                                         return rank;                                                          return rank;
                                                 }                                                  }
                                         } else                                          } else
                                                 period *=2;                                                  period *=2;
                                   }
                         }                          }
         }          }
 }  }

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>