Changeset 2d35fe in git for factory/facFqBivar.cc
- Timestamp:
- Mar 19, 2013, 3:04:21 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facFqBivar.cc
r2537fa0 r2d35fe 48 48 TIMING_DEFINE_PRINT(fac_fq_bi_evaluation) 49 49 TIMING_DEFINE_PRINT(fac_fq_bi_shift_to_zero) 50 TIMING_DEFINE_PRINT(fac_fq_logarithmic) 51 TIMING_DEFINE_PRINT(fac_fq_compute_lattice_lift) 52 TIMING_DEFINE_PRINT(fac_fq_till_reduced) 53 TIMING_DEFINE_PRINT(fac_fq_reconstruction) 54 TIMING_DEFINE_PRINT(fac_fq_lift) 55 TIMING_DEFINE_PRINT(fac_fq_uni_total) 50 56 51 57 CanonicalForm prodMod0 (const CFList& L, const CanonicalForm& M, const modpk& b) … … 2362 2368 while (l <= liftBound) 2363 2369 { 2370 TIMING_START (fac_fq_compute_lattice_lift); 2364 2371 if (start) 2365 2372 { … … 2374 2381 henselLift12 (F, factors, l, Pi, diophant, M); 2375 2382 } 2383 TIMING_END_AND_PRINT (fac_fq_compute_lattice_lift, 2384 "time to lift in compute lattice: "); 2376 2385 2377 2386 factors.insert (LCF); … … 2380 2389 2381 2390 truncF= mod (F, power (y, l)); 2391 TIMING_START (fac_fq_logarithmic); 2382 2392 for (int i= 0; i < factors.length() - 1; i++, j++) 2383 2393 { … … 2388 2398 bufQ[i]); 2389 2399 } 2400 TIMING_END_AND_PRINT (fac_fq_logarithmic, 2401 "time to compute logarithmic derivative: "); 2390 2402 2391 2403 for (int i= 0; i < sizeBounds; i++) … … 2479 2491 while (l <= liftBound) 2480 2492 { 2493 TIMING_START (fac_fq_compute_lattice_lift); 2481 2494 if (start) 2482 2495 { … … 2491 2504 henselLift12 (F, factors, l, Pi, diophant, M); 2492 2505 } 2506 TIMING_END_AND_PRINT (fac_fq_compute_lattice_lift, 2507 "time to lift in compute lattice: "); 2493 2508 2494 2509 factors.insert (LCF); … … 2497 2512 2498 2513 truncF= mod (F, power (y, l)); 2514 TIMING_START (fac_fq_logarithmic); 2499 2515 for (int i= 0; i < factors.length() - 1; i++, j++) 2500 2516 { … … 2505 2521 bufQ[i]); 2506 2522 } 2523 TIMING_END_AND_PRINT (fac_fq_logarithmic, 2524 "time to compute logarithmic derivative: "); 2507 2525 2508 2526 for (int i= 0; i < sizeBounds; i++) … … 2626 2644 while (l <= liftBound) 2627 2645 { 2646 TIMING_START (fac_fq_compute_lattice_lift); 2628 2647 if (start) 2629 2648 { … … 2638 2657 henselLift12 (F, factors, l, Pi, diophant, M); 2639 2658 } 2659 TIMING_END_AND_PRINT (fac_fq_compute_lattice_lift, 2660 "time to lift in compute lattice: "); 2640 2661 2641 2662 factors.insert (LCF); … … 2666 2687 2667 2688 truncF= mod (F, power (y, l)); 2689 TIMING_START (fac_fq_logarithmic); 2668 2690 for (int i= 0; i < factors.length() - 1; i++, j++) 2669 2691 { … … 2674 2696 bufQ[i]); 2675 2697 } 2698 TIMING_END_AND_PRINT (fac_fq_logarithmic, 2699 "time to compute logarithmic derivative: "); 2676 2700 2677 2701 for (int i= 0; i < sizeBounds; i++) … … 3004 3028 while (l <= liftBound) 3005 3029 { 3030 TIMING_START (fac_fq_compute_lattice_lift); 3006 3031 if (start) 3007 3032 { … … 3016 3041 henselLift12 (F, factors, l, Pi, diophant, M); 3017 3042 } 3043 TIMING_END_AND_PRINT (fac_fq_compute_lattice_lift, 3044 "time to lift in compute lattice: "); 3018 3045 3019 3046 factors.insert (LCF); … … 3022 3049 3023 3050 truncF= mod (F, power (y,l)); 3051 TIMING_START (fac_fq_logarithmic); 3024 3052 for (int i= 0; i < factors.length() - 1; i++, j++) 3025 3053 { … … 3035 3063 } 3036 3064 } 3065 TIMING_END_AND_PRINT (fac_fq_logarithmic, 3066 "time to compute logarithmic derivative: "); 3037 3067 3038 3068 for (int i= 0; i < sizeBounds; i++) … … 3146 3176 while (l <= liftBound) 3147 3177 { 3178 TIMING_START (fac_fq_compute_lattice_lift); 3148 3179 if (start) 3149 3180 { … … 3158 3189 henselLift12 (F, factors, l, Pi, diophant, M); 3159 3190 } 3191 TIMING_END_AND_PRINT (fac_fq_compute_lattice_lift, 3192 "time to lift in compute lattice: "); 3160 3193 3161 3194 factors.insert (LCF); … … 3164 3197 3165 3198 truncF= mod (F, power (y,l)); 3199 TIMING_START (fac_fq_logarithmic); 3166 3200 for (int i= 0; i < factors.length() - 1; i++, j++) 3167 3201 { … … 3177 3211 } 3178 3212 } 3213 TIMING_END_AND_PRINT (fac_fq_logarithmic, 3214 "time to compute logarithmic derivative: "); 3179 3215 3180 3216 for (int i= 0; i < sizeBounds; i++) … … 5694 5730 if (l < smallFactorDeg) 5695 5731 { 5732 TIMING_START (fac_fq_lift); 5696 5733 factors.insert (LCF); 5697 5734 henselLiftResume12 (F, factors, l, smallFactorDeg, Pi, diophant, M); 5735 TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction0: "); 5698 5736 l= smallFactorDeg; 5699 5737 } 5700 5738 #ifdef HAVE_FLINT 5739 TIMING_START (fac_fq_reconstruction); 5701 5740 reconstructionTry (result, bufF, factors, smallFactorDeg, factorsFound, 5702 5741 factorsFoundIndex, FLINTN, evaluation, beenInThres 5703 5742 ); 5743 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct0: "); 5704 5744 if (result.length() == nmod_mat_ncols (FLINTN)) 5705 5745 { 5706 5746 nmod_mat_clear (FLINTN); 5707 5747 #else 5748 TIMING_START (fac_fq_reconstruction); 5708 5749 reconstructionTry (result, bufF, factors, smallFactorDeg, factorsFound, 5709 5750 factorsFoundIndex, NTLN, evaluation, beenInThres 5710 5751 ); 5752 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct0: "); 5711 5753 if (result.length() == NTLN.NumCols()) 5712 5754 { … … 5727 5769 { 5728 5770 factors.insert (LCF); 5771 TIMING_START (fac_fq_lift); 5729 5772 henselLiftResume12 (F, factors, l, liftPre[i-1] + 1, Pi, diophant, M); 5773 TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction1: "); 5730 5774 l= liftPre[i-1] + 1; 5731 5775 } … … 5737 5781 } 5738 5782 #ifdef HAVE_FLINT 5783 TIMING_START (fac_fq_reconstruction); 5739 5784 reconstructionTry (result, bufF, factors, l, factorsFound, 5740 5785 factorsFoundIndex, FLINTN, evaluation, beenInThres 5741 5786 ); 5787 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct1: "); 5742 5788 if (result.length() == nmod_mat_ncols (FLINTN)) 5743 5789 { 5744 5790 nmod_mat_clear (FLINTN); 5745 5791 #else 5792 TIMING_START (fac_fq_reconstruction); 5746 5793 reconstructionTry (result, bufF, factors, l, factorsFound, 5747 5794 factorsFoundIndex, NTLN, evaluation, beenInThres 5748 5795 ); 5796 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct1: "); 5749 5797 if (result.length() == NTLN.NumCols()) 5750 5798 { … … 5768 5816 { 5769 5817 factors.insert (LCF); 5818 TIMING_START (fac_fq_lift); 5770 5819 henselLiftResume12 (F, factors, l, dummy, Pi, diophant, M); 5820 TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction2: "); 5771 5821 l= dummy; 5772 5822 if (i == 1 && degree (F)%4==0 && symmetric && factors.length() == 2 && … … 5819 5869 } 5820 5870 #ifdef HAVE_FLINT 5871 TIMING_START (fac_fq_reconstruction); 5821 5872 reconstructionTry (result, bufF, factors, l, factorsFound, 5822 5873 factorsFoundIndex, FLINTN, evaluation, beenInThres 5823 5874 ); 5875 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct2: "); 5824 5876 if (result.length() == nmod_mat_ncols (FLINTN)) 5825 5877 { 5826 5878 nmod_mat_clear (FLINTN); 5827 5879 #else 5880 TIMING_START (fac_fq_reconstruction); 5828 5881 reconstructionTry (result, bufF, factors, l, factorsFound, 5829 5882 factorsFoundIndex, NTLN, evaluation, beenInThres 5830 5883 ); 5884 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct2: "); 5831 5885 if (result.length() == NTLN.NumCols()) 5832 5886 { … … 5872 5926 if (l < smallFactorDeg) 5873 5927 { 5928 TIMING_START (fac_fq_lift); 5874 5929 factors.insert (LCF); 5875 5930 henselLiftResume12 (F, factors, l, smallFactorDeg, Pi, diophant, M); 5931 TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction0: "); 5876 5932 l= smallFactorDeg; 5877 5933 } 5934 TIMING_START (fac_fq_reconstruction); 5878 5935 reconstructionTry (result, bufF, factors, smallFactorDeg, factorsFound, 5879 5936 factorsFoundIndex, NTLN, evaluation, beenInThres 5880 5937 ); 5938 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct0: "); 5881 5939 if (result.length() == NTLN.NumCols()) 5882 5940 { … … 5896 5954 { 5897 5955 factors.insert (LCF); 5956 TIMING_START (fac_fq_lift); 5898 5957 henselLiftResume12 (F, factors, l, liftPre[i-1] + 1, Pi, diophant, M); 5958 TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction1: "); 5899 5959 l= liftPre[i-1] + 1; 5900 5960 } … … 5905 5965 continue; 5906 5966 } 5967 TIMING_START (fac_fq_reconstruction); 5907 5968 reconstructionTry (result, bufF, factors, l, factorsFound, 5908 5969 factorsFoundIndex, NTLN, evaluation, beenInThres 5909 5970 ); 5971 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct1: "); 5910 5972 if (result.length() == NTLN.NumCols()) 5911 5973 { … … 5928 5990 { 5929 5991 factors.insert (LCF); 5992 TIMING_START (fac_fq_lift); 5930 5993 henselLiftResume12 (F, factors, l, dummy, Pi, diophant, M); 5994 TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction2: "); 5931 5995 l= dummy; 5932 5996 if (i == 1 && degree (F)%4==0 && symmetric && factors.length() == 2 && … … 5957 6021 check1= gg (y-evaluation,y); 5958 6022 check2= hh (y-evaluation,y); 6023 CanonicalForm oldcheck1= check1; 5959 6024 check1= swapvar (check1, x, y); 5960 6025 if (check1/Lc (check1) == check2/Lc (check2)) 5961 6026 { 5962 result.append ( check1);6027 result.append (oldcheck1); 5963 6028 result.append (check2); 5964 6029 delete [] liftPre; … … 5974 6039 continue; 5975 6040 } 6041 TIMING_START (fac_fq_reconstruction); 5976 6042 reconstructionTry (result, bufF, factors, l, factorsFound, 5977 6043 factorsFoundIndex, NTLN, evaluation, beenInThres 5978 6044 ); 6045 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct2: "); 5979 6046 if (result.length() == NTLN.NumCols()) 5980 6047 { … … 6018 6085 if (l < smallFactorDeg) 6019 6086 { 6087 TIMING_START (fac_fq_lift); 6020 6088 factors.insert (LCF); 6021 6089 henselLiftResume12 (F, factors, l, smallFactorDeg, Pi, diophant, M); 6090 TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction0: "); 6022 6091 l= smallFactorDeg; 6023 6092 } 6093 TIMING_START (fac_fq_reconstruction); 6024 6094 extReconstructionTry (result, bufF, factors, smallFactorDeg, factorsFound, 6025 6095 factorsFoundIndex, NTLN, beenInThres, info, 6026 6096 evaluation 6027 6097 ); 6098 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct0: "); 6028 6099 if (result.length() == NTLN.NumCols()) 6029 6100 { … … 6043 6114 { 6044 6115 factors.insert (LCF); 6116 TIMING_START (fac_fq_lift); 6045 6117 henselLiftResume12 (F, factors, l, liftPre[i-1] + 1, Pi, diophant, M); 6118 TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction1: "); 6046 6119 l= liftPre[i-1] + 1; 6047 6120 } … … 6052 6125 continue; 6053 6126 } 6127 TIMING_START (fac_fq_reconstruction); 6054 6128 extReconstructionTry (result, bufF, factors, l, factorsFound, 6055 6129 factorsFoundIndex, NTLN, beenInThres, info, 6056 6130 evaluation 6057 6131 ); 6132 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct1: "); 6058 6133 if (result.length() == NTLN.NumCols()) 6059 6134 { … … 6076 6151 { 6077 6152 factors.insert (LCF); 6153 TIMING_START (fac_fq_lift); 6078 6154 henselLiftResume12 (F, factors, l, dummy, Pi, diophant, M); 6155 TIMING_END_AND_PRINT (fac_fq_lift, "time to lift in reconstruction2: "); 6079 6156 l= dummy; 6080 6157 } … … 6085 6162 continue; 6086 6163 } 6164 TIMING_START (fac_fq_reconstruction); 6087 6165 extReconstructionTry (result, bufF, factors, l, factorsFound, 6088 6166 factorsFoundIndex, NTLN, beenInThres, info, 6089 6167 evaluation 6090 6168 ); 6169 TIMING_END_AND_PRINT (fac_fq_reconstruction, "time to reconstruct2: "); 6091 6170 if (result.length() == NTLN.NumCols()) 6092 6171 { … … 6363 6442 6364 6443 int oldL; 6444 TIMING_START (fac_fq_till_reduced); 6365 6445 if (success) 6366 6446 { … … 6427 6507 } 6428 6508 6509 TIMING_END_AND_PRINT (fac_fq_till_reduced, 6510 "time to compute a reduced lattice: "); 6429 6511 bufUniFactors.removeFirst(); 6430 6512 if (oldL > liftBound) … … 7199 7281 7200 7282 int oldL; 7283 TIMING_START (fac_fq_till_reduced); 7201 7284 if (success) 7202 7285 { … … 7215 7298 ); 7216 7299 } 7300 TIMING_END_AND_PRINT (fac_fq_till_reduced, 7301 "time to compute a reduced lattice: "); 7217 7302 7218 7303 bufUniFactors.removeFirst(); … … 7690 7775 int subCheck2= substituteCheck (A, y); 7691 7776 bool symmetric= false; 7777 7778 TIMING_START (fac_fq_uni_total); 7692 7779 for (int i= 0; i < factorNums; i++) 7693 7780 { … … 7871 7958 list2.append (bufEvaluation2); 7872 7959 } 7960 TIMING_END_AND_PRINT (fac_fq_uni_total, 7961 "total time for univariate factorizations: "); 7873 7962 7874 7963 if (!derivXZero && !fail2 && !symmetric)
Note: See TracChangeset
for help on using the changeset viewer.