Skip to content

Commit d8fe665

Browse files
mmkleeOleksandr Motsak
authored andcommitted
added heuristic for sparse lifting and updated tests
1 parent de0e726 commit d8fe665

File tree

7 files changed

+528
-22
lines changed

7 files changed

+528
-22
lines changed

Tst/Long/factorizep_l.res.gz.uu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
begin 644 factorizep_l.res.gz
2-
M'XL("'#T^4T``V9A8W1O<FEZ97!?;"YR97,`G/U-KRVY<B4(SO4K+FHDQ7GG
2+
M'XL("$S,PTX``V9A8W1O<FEZ97!?;"YR97,`G/U-KRVY<B4(SO4K+FHDQ7GG
33
MP?E-EOIIT*A)`HV:9,T2>HGL;"DA0$@E=%]WG1.-_N_-M9:9T7WOFUD)(1`1
44
MQ[G=S>FDD;3/9?_^__C?_MW__N/'C_1W/_X?_^[__N-_^<O/O_SQG__I__F_
55
M_.U?_7O[)?_=C]WX'__IO_[37_[Z;_[VK_#_'W_W=S_^\3_]Y[_\R[_^T^__

Tst/Long/factorizep_l.stat

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
1 >> tst_memory_0 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:810116
2-
1 >> tst_memory_1 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:5160960
3-
1 >> tst_memory_2 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:21938176
4-
1 >> tst_timer :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:5474
5-
2 >> tst_memory_0 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:901112
6-
2 >> tst_memory_1 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:5160960
7-
2 >> tst_memory_2 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:33996800
8-
2 >> tst_timer :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:8848
9-
3 >> tst_memory_0 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:1153472
10-
3 >> tst_memory_1 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:7782400
11-
3 >> tst_memory_2 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:33996800
12-
3 >> tst_timer_1 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:17335
1+
1 >> tst_memory_0 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:699536
2+
1 >> tst_memory_1 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:3145728
3+
1 >> tst_memory_2 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:22020096
4+
1 >> tst_timer :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:3695
5+
2 >> tst_memory_0 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:1386868
6+
2 >> tst_memory_1 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:3735552
7+
2 >> tst_memory_2 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:29949952
8+
2 >> tst_timer :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:2774
9+
3 >> tst_memory_0 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:1610380
10+
3 >> tst_memory_1 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:6881280
11+
3 >> tst_memory_2 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:29949952
12+
3 >> tst_timer_1 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:9926

Tst/Short/factorizep_s.res.gz.uu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
begin 644 factorizep_s.res.gz
2-
M'XL("'4D^TT``V9A8W1O<FEZ97!?<RYR97,`E/U-DRQ/>MV)[?DIKLU&#00<
2+
M'XL(",O,PTX``V9A8W1O<FEZ97!?<RYR97,`E/U-DRQ/>MV)[?DIKLU&#00<
33
M<\O?2Q2P&)L-S<9F,[,;(V@4"5!M:@$T=$N\1=E\=X6?YSS',SRB;KJ,1E3T
44
M_Z:'9U5F^-OS.^?\;__[__SO_M<?/WY\_/V/_^7?_4\__H>__/DO?_NG/_[?
55
M_X=_^V_^-_Y+_/L?YW_\#W_\YS_^Y0]_]6__S?CYX^___L<__<?_])=_^=<_

Tst/Short/factorizep_s.stat

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
1 >> tst_memory_0 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:322888
2-
1 >> tst_memory_1 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:929792
3-
1 >> tst_memory_2 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:929792
4-
1 >> tst_timer :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:697
5-
2 >> tst_memory_0 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:530256
6-
2 >> tst_memory_1 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:1601536
7-
2 >> tst_memory_2 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:2125824
8-
2 >> tst_timer_1 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:1054
1+
1 >> tst_memory_0 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:300444
2+
1 >> tst_memory_1 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:933888
3+
1 >> tst_memory_2 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:933888
4+
1 >> tst_timer :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:719
5+
2 >> tst_memory_0 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:484772
6+
2 >> tst_memory_1 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:1073152
7+
2 >> tst_memory_2 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:1073152
8+
2 >> tst_timer_1 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:961

factory/facFactorize.cc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,33 @@ multiFactorize (const CanonicalForm& F, const Variable& v)
692692
else if (biFactors.length() > minFactorsLength)
693693
refineBiFactors (A, biFactors, Aeval2, evaluation, minFactorsLength);
694694

695+
if (differentSecondVar == A.level() - 2)
696+
{
697+
bool zeroOccured= false;
698+
for (CFListIterator iter= evaluation; iter.hasItem(); iter++)
699+
{
700+
if (iter.getItem().isZero())
701+
{
702+
zeroOccured= true;
703+
break;
704+
}
705+
}
706+
if (!zeroOccured)
707+
{
708+
factors= sparseHeuristic (A, biFactors, Aeval2, evaluation, minFactorsLength);
709+
if (factors.length() == biFactors.length())
710+
{
711+
appendSwapDecompress (factors, contentAFactors, N, 0, 0, x);
712+
normalize (factors);
713+
delete [] Aeval2;
714+
return factors;
715+
}
716+
else
717+
factors= CFList();
718+
//TODO case where factors.length() > 0
719+
}
720+
}
721+
695722
CFList uniFactors= buildUniFactors (biFactors, evaluation.getLast(), y);
696723

697724
CFList * oldAeval= new CFList [A.level() - 2];

0 commit comments

Comments
 (0)