Changeset 2d35fe in git


Ignore:
Timestamp:
Mar 19, 2013, 3:04:21 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5a0dde71de01068fad5736a17555c993ecbbf495')
Children:
70bf04b2c457945aee9cb5bd27b38d416f07691e
Parents:
2537fa05c1ccd0871a09e79dea03dd1cd5965cd7
git-author:
Martin Lee <martinlee84@web.de>2013-03-19 15:04:21+01:00
git-committer:
Martin Lee <martinlee84@web.de>2013-03-22 15:53:18+01:00
Message:
chg: added more timing info to bivariate factorization
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    r2537fa0 r2d35fe  
    4848TIMING_DEFINE_PRINT(fac_fq_bi_evaluation)
    4949TIMING_DEFINE_PRINT(fac_fq_bi_shift_to_zero)
     50TIMING_DEFINE_PRINT(fac_fq_logarithmic)
     51TIMING_DEFINE_PRINT(fac_fq_compute_lattice_lift)
     52TIMING_DEFINE_PRINT(fac_fq_till_reduced)
     53TIMING_DEFINE_PRINT(fac_fq_reconstruction)
     54TIMING_DEFINE_PRINT(fac_fq_lift)
     55TIMING_DEFINE_PRINT(fac_fq_uni_total)
    5056
    5157CanonicalForm prodMod0 (const CFList& L, const CanonicalForm& M, const modpk& b)
     
    23622368  while (l <= liftBound)
    23632369  {
     2370    TIMING_START (fac_fq_compute_lattice_lift);
    23642371    if (start)
    23652372    {
     
    23742381        henselLift12 (F, factors, l, Pi, diophant, M);
    23752382    }
     2383    TIMING_END_AND_PRINT (fac_fq_compute_lattice_lift,
     2384                          "time to lift in compute lattice: ");
    23762385
    23772386    factors.insert (LCF);
     
    23802389
    23812390    truncF= mod (F, power (y, l));
     2391    TIMING_START (fac_fq_logarithmic);
    23822392    for (int i= 0; i < factors.length() - 1; i++, j++)
    23832393    {
     
    23882398                                     bufQ[i]);
    23892399    }
     2400    TIMING_END_AND_PRINT (fac_fq_logarithmic,
     2401                          "time to compute logarithmic derivative: ");
    23902402
    23912403    for (int i= 0; i < sizeBounds; i++)
     
    24792491  while (l <= liftBound)
    24802492  {
     2493    TIMING_START (fac_fq_compute_lattice_lift);
    24812494    if (start)
    24822495    {
     
    24912504        henselLift12 (F, factors, l, Pi, diophant, M);
    24922505    }
     2506    TIMING_END_AND_PRINT (fac_fq_compute_lattice_lift,
     2507                          "time to lift in compute lattice: ");
    24932508
    24942509    factors.insert (LCF);
     
    24972512
    24982513    truncF= mod (F, power (y, l));
     2514    TIMING_START (fac_fq_logarithmic);
    24992515    for (int i= 0; i < factors.length() - 1; i++, j++)
    25002516    {
     
    25052521                                     bufQ[i]);
    25062522    }
     2523    TIMING_END_AND_PRINT (fac_fq_logarithmic,
     2524                          "time to compute logarithmic derivative: ");
    25072525
    25082526    for (int i= 0; i < sizeBounds; i++)
     
    26262644  while (l <= liftBound)
    26272645  {
     2646    TIMING_START (fac_fq_compute_lattice_lift);
    26282647    if (start)
    26292648    {
     
    26382657        henselLift12 (F, factors, l, Pi, diophant, M);
    26392658    }
     2659    TIMING_END_AND_PRINT (fac_fq_compute_lattice_lift,
     2660                          "time to lift in compute lattice: ");
    26402661
    26412662    factors.insert (LCF);
     
    26662687
    26672688    truncF= mod (F, power (y, l));
     2689    TIMING_START (fac_fq_logarithmic);
    26682690    for (int i= 0; i < factors.length() - 1; i++, j++)
    26692691    {
     
    26742696                                     bufQ[i]);
    26752697    }
     2698    TIMING_END_AND_PRINT (fac_fq_logarithmic,
     2699                          "time to compute logarithmic derivative: ");
    26762700
    26772701    for (int i= 0; i < sizeBounds; i++)
     
    30043028  while (l <= liftBound)
    30053029  {
     3030    TIMING_START (fac_fq_compute_lattice_lift);
    30063031    if (start)
    30073032    {
     
    30163041        henselLift12 (F, factors, l, Pi, diophant, M);
    30173042    }
     3043    TIMING_END_AND_PRINT (fac_fq_compute_lattice_lift,
     3044                          "time to lift in compute lattice: ");
    30183045
    30193046    factors.insert (LCF);
     
    30223049
    30233050    truncF= mod (F, power (y,l));
     3051    TIMING_START (fac_fq_logarithmic);
    30243052    for (int i= 0; i < factors.length() - 1; i++, j++)
    30253053    {
     
    30353063      }
    30363064    }
     3065    TIMING_END_AND_PRINT (fac_fq_logarithmic,
     3066                          "time to compute logarithmic derivative: ");
    30373067
    30383068    for (int i= 0; i < sizeBounds; i++)
     
    31463176  while (l <= liftBound)
    31473177  {
     3178    TIMING_START (fac_fq_compute_lattice_lift);
    31483179    if (start)
    31493180    {
     
    31583189        henselLift12 (F, factors, l, Pi, diophant, M);
    31593190    }
     3191    TIMING_END_AND_PRINT (fac_fq_compute_lattice_lift,
     3192                          "time to lift in compute lattice: ");
    31603193
    31613194    factors.insert (LCF);
     
    31643197
    31653198    truncF= mod (F, power (y,l));
     3199    TIMING_START (fac_fq_logarithmic);
    31663200    for (int i= 0; i < factors.length() - 1; i++, j++)
    31673201    {
     
    31773211      }
    31783212    }
     3213    TIMING_END_AND_PRINT (fac_fq_logarithmic,
     3214                          "time to compute logarithmic derivative: ");
    31793215
    31803216    for (int i= 0; i < sizeBounds; i++)
     
    56945730    if (l < smallFactorDeg)
    56955731    {
     5732      TIMING_START (fac_fq_lift);
    56965733      factors.insert (LCF);
    56975734      henselLiftResume12 (F, factors, l, smallFactorDeg, Pi, diophant, M);
     5735      TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction0: ");
    56985736      l= smallFactorDeg;
    56995737    }
    57005738#ifdef HAVE_FLINT
     5739    TIMING_START (fac_fq_reconstruction);
    57015740    reconstructionTry (result, bufF, factors, smallFactorDeg, factorsFound,
    57025741                       factorsFoundIndex, FLINTN, evaluation, beenInThres
    57035742                      );
     5743    TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct0: ");
    57045744    if (result.length() == nmod_mat_ncols (FLINTN))
    57055745    {
    57065746      nmod_mat_clear (FLINTN);
    57075747#else
     5748    TIMING_START (fac_fq_reconstruction);
    57085749    reconstructionTry (result, bufF, factors, smallFactorDeg, factorsFound,
    57095750                       factorsFoundIndex, NTLN, evaluation, beenInThres
    57105751                      );
     5752    TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct0: ");
    57115753    if (result.length() == NTLN.NumCols())
    57125754    {
     
    57275769      {
    57285770        factors.insert (LCF);
     5771        TIMING_START (fac_fq_lift);
    57295772        henselLiftResume12 (F, factors, l, liftPre[i-1] + 1, Pi, diophant, M);
     5773        TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction1: ");
    57305774        l= liftPre[i-1] + 1;
    57315775      }
     
    57375781      }
    57385782#ifdef HAVE_FLINT
     5783      TIMING_START (fac_fq_reconstruction);
    57395784      reconstructionTry (result, bufF, factors, l, factorsFound,
    57405785                         factorsFoundIndex, FLINTN, evaluation, beenInThres
    57415786                        );
     5787      TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct1: ");
    57425788      if (result.length() == nmod_mat_ncols (FLINTN))
    57435789      {
    57445790        nmod_mat_clear (FLINTN);
    57455791#else
     5792      TIMING_START (fac_fq_reconstruction);
    57465793      reconstructionTry (result, bufF, factors, l, factorsFound,
    57475794                         factorsFoundIndex, NTLN, evaluation, beenInThres
    57485795                        );
     5796      TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct1: ");
    57495797      if (result.length() == NTLN.NumCols())
    57505798      {
     
    57685816      {
    57695817        factors.insert (LCF);
     5818        TIMING_START (fac_fq_lift);
    57705819        henselLiftResume12 (F, factors, l, dummy, Pi, diophant, M);
     5820        TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction2: ");
    57715821        l= dummy;
    57725822        if (i == 1 && degree (F)%4==0 && symmetric && factors.length() == 2 &&
     
    58195869      }
    58205870#ifdef HAVE_FLINT
     5871      TIMING_START (fac_fq_reconstruction);
    58215872      reconstructionTry (result, bufF, factors, l, factorsFound,
    58225873                         factorsFoundIndex, FLINTN, evaluation, beenInThres
    58235874                        );
     5875      TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct2: ");
    58245876      if (result.length() == nmod_mat_ncols (FLINTN))
    58255877      {
    58265878        nmod_mat_clear (FLINTN);
    58275879#else
     5880      TIMING_START (fac_fq_reconstruction);
    58285881      reconstructionTry (result, bufF, factors, l, factorsFound,
    58295882                         factorsFoundIndex, NTLN, evaluation, beenInThres
    58305883                        );
     5884      TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct2: ");
    58315885      if (result.length() == NTLN.NumCols())
    58325886      {
     
    58725926    if (l < smallFactorDeg)
    58735927    {
     5928      TIMING_START (fac_fq_lift);
    58745929      factors.insert (LCF);
    58755930      henselLiftResume12 (F, factors, l, smallFactorDeg, Pi, diophant, M);
     5931      TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction0: ");
    58765932      l= smallFactorDeg;
    58775933    }
     5934    TIMING_START (fac_fq_reconstruction);
    58785935    reconstructionTry (result, bufF, factors, smallFactorDeg, factorsFound,
    58795936                       factorsFoundIndex, NTLN, evaluation, beenInThres
    58805937                      );
     5938    TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct0: ");
    58815939    if (result.length() == NTLN.NumCols())
    58825940    {
     
    58965954      {
    58975955        factors.insert (LCF);
     5956        TIMING_START (fac_fq_lift);
    58985957        henselLiftResume12 (F, factors, l, liftPre[i-1] + 1, Pi, diophant, M);
     5958        TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction1: ");
    58995959        l= liftPre[i-1] + 1;
    59005960      }
     
    59055965          continue;
    59065966      }
     5967      TIMING_START (fac_fq_reconstruction);
    59075968      reconstructionTry (result, bufF, factors, l, factorsFound,
    59085969                         factorsFoundIndex, NTLN, evaluation, beenInThres
    59095970                        );
     5971      TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct1: ");
    59105972      if (result.length() == NTLN.NumCols())
    59115973      {
     
    59285990      {
    59295991        factors.insert (LCF);
     5992        TIMING_START (fac_fq_lift);
    59305993        henselLiftResume12 (F, factors, l, dummy, Pi, diophant, M);
     5994        TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction2: ");
    59315995        l= dummy;
    59325996        if (i == 1 && degree (F)%4==0 && symmetric && factors.length() == 2 &&
     
    59576021          check1= gg (y-evaluation,y);
    59586022          check2= hh (y-evaluation,y);
     6023          CanonicalForm oldcheck1= check1;
    59596024          check1= swapvar (check1, x, y);
    59606025          if (check1/Lc (check1) == check2/Lc (check2))
    59616026          {
    5962             result.append (check1);
     6027            result.append (oldcheck1);
    59636028            result.append (check2);
    59646029            delete [] liftPre;
     
    59746039          continue;
    59756040      }
     6041      TIMING_START (fac_fq_reconstruction);
    59766042      reconstructionTry (result, bufF, factors, l, factorsFound,
    59776043                         factorsFoundIndex, NTLN, evaluation, beenInThres
    59786044                        );
     6045      TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct2: ");
    59796046      if (result.length() == NTLN.NumCols())
    59806047      {
     
    60186085    if (l < smallFactorDeg)
    60196086    {
     6087      TIMING_START (fac_fq_lift);
    60206088      factors.insert (LCF);
    60216089      henselLiftResume12 (F, factors, l, smallFactorDeg, Pi, diophant, M);
     6090      TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction0: ");
    60226091      l= smallFactorDeg;
    60236092    }
     6093    TIMING_START (fac_fq_reconstruction);
    60246094    extReconstructionTry (result, bufF, factors, smallFactorDeg, factorsFound,
    60256095                          factorsFoundIndex, NTLN, beenInThres, info,
    60266096                          evaluation
    60276097                      );
     6098    TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct0: ");
    60286099    if (result.length() == NTLN.NumCols())
    60296100    {
     
    60436114      {
    60446115        factors.insert (LCF);
     6116        TIMING_START (fac_fq_lift);
    60456117        henselLiftResume12 (F, factors, l, liftPre[i-1] + 1, Pi, diophant, M);
     6118        TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction1: ");
    60466119        l= liftPre[i-1] + 1;
    60476120      }
     
    60526125          continue;
    60536126      }
     6127      TIMING_START (fac_fq_reconstruction);
    60546128      extReconstructionTry (result, bufF, factors, l, factorsFound,
    60556129                            factorsFoundIndex, NTLN, beenInThres, info,
    60566130                            evaluation
    60576131                           );
     6132      TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct1: ");
    60586133      if (result.length() == NTLN.NumCols())
    60596134      {
     
    60766151      {
    60776152        factors.insert (LCF);
     6153        TIMING_START (fac_fq_lift);
    60786154        henselLiftResume12 (F, factors, l, dummy, Pi, diophant, M);
     6155        TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction2: ");
    60796156        l= dummy;
    60806157      }
     
    60856162          continue;
    60866163      }
     6164      TIMING_START (fac_fq_reconstruction);
    60876165      extReconstructionTry (result, bufF, factors, l, factorsFound,
    60886166                            factorsFoundIndex, NTLN, beenInThres, info,
    60896167                            evaluation
    60906168                           );
     6169      TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct2: ");
    60916170      if (result.length() == NTLN.NumCols())
    60926171      {
     
    63636442
    63646443  int oldL;
     6444  TIMING_START (fac_fq_till_reduced);
    63656445  if (success)
    63666446  {
     
    64276507  }
    64286508
     6509  TIMING_END_AND_PRINT (fac_fq_till_reduced,
     6510                        "time to compute a reduced lattice: ");
    64296511  bufUniFactors.removeFirst();
    64306512  if (oldL > liftBound)
     
    71997281
    72007282  int oldL;
     7283  TIMING_START (fac_fq_till_reduced);
    72017284  if (success)
    72027285  {
     
    72157298                                   );
    72167299  }
     7300  TIMING_END_AND_PRINT (fac_fq_till_reduced,
     7301                        "time to compute a reduced lattice: ");
    72177302
    72187303  bufUniFactors.removeFirst();
     
    76907775  int subCheck2= substituteCheck (A, y);
    76917776  bool symmetric= false;
     7777
     7778  TIMING_START (fac_fq_uni_total);
    76927779  for (int i= 0; i < factorNums; i++)
    76937780  {
     
    78717958      list2.append (bufEvaluation2);
    78727959  }
     7960  TIMING_END_AND_PRINT (fac_fq_uni_total,
     7961                        "total time for univariate factorizations: ");
    78737962
    78747963  if (!derivXZero && !fail2 && !symmetric)
Note: See TracChangeset for help on using the changeset viewer.