Changeset 1e5bbd7 in git
- Timestamp:
- Sep 11, 2013, 5:08:08 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
- Children:
- 4c882fb60d7ba637abe2966f73c796be805cfcc7
- Parents:
- 6b78289a8dba923a7ab1eef981cfa76e2a719def142afdb13c43074bd1d8e25bc17989486e397819
- Files:
-
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/links/s_buff.h
r142afd r1e5bbd7 30 30 int s_isready(s_buff F); 31 31 int s_iseof(s_buff F); 32 33 extern sigset_t ssi_sigmask; // set in ssiLink.cc34 extern sigset_t ssi_oldmask; // set in ssiLink.cc35 32 #endif -
Singular/links/silink.cc
r142afd r1e5bbd7 136 136 if (SI_LINK_OPEN_P(l)) 137 137 { 138 if (l->m-> Kill != NULL) l->m->Kill(l);139 else if (l->m->Close != NULL) l->m->Close(l);140 }138 if (l->m->Close != NULL) l->m->Close(l); 139 } 140 if ((l->data != NULL) && (l->m->Kill != NULL)) l->m->Kill(l); 141 141 omFree((ADDRESS)l->name); 142 142 omFree((ADDRESS)l->mode); -
factory/cf_factor.cc
r6b7828 r1e5bbd7 455 455 { 456 456 fac_NTL_char = getCharacteristic(); 457 #ifndef NTL_ZZ 458 if (fac_NTL_char > NTL_SP_BOUND) 459 { 460 ZZ r; 461 r=getCharacteristic(); 462 ZZ_pContext ccc(r); 463 ccc.restore(); 464 ZZ_p::init(r); 465 } 466 else 467 #endif 468 { 469 #ifdef NTL_ZZ 470 ZZ r; 471 r=getCharacteristic(); 472 ZZ_pContext ccc(r); 473 #else 474 zz_pContext ccc(getCharacteristic()); 475 #endif 476 ccc.restore(); 477 #ifdef NTL_ZZ 478 ZZ_p::init(r); 479 #else 480 zz_p::init(getCharacteristic()); 481 #endif 482 } 457 zz_p::init(getCharacteristic()); 483 458 } 484 #ifndef NTL_ZZ 485 if (fac_NTL_char > NTL_SP_BOUND) 486 { 487 // convert to NTL 488 ZZ_pX f1=convertFacCF2NTLZZpX(f); 489 ZZ_p leadcoeff = LeadCoeff(f1); 490 //make monic 491 f1=f1 / LeadCoeff(f1); 492 // factorize 493 vec_pair_ZZ_pX_long factors; 494 CanZass(factors,f1); 495 // convert back to factory 496 F=convertNTLvec_pair_ZZpX_long2FacCFFList(factors,leadcoeff,f.mvar()); 497 } 498 else 499 #endif 500 { 501 // convert to NTL 502 #ifdef NTL_ZZ 503 ZZ_pX f1=convertFacCF2NTLZZpX(f); 504 ZZ_p leadcoeff = LeadCoeff(f1); 505 #else 506 zz_pX f1=convertFacCF2NTLzzpX(f); 507 zz_p leadcoeff = LeadCoeff(f1); 508 #endif 509 //make monic 510 f1=f1 / LeadCoeff(f1); 511 // factorize 512 #ifdef NTL_ZZ 513 vec_pair_ZZ_pX_long factors; 514 #else 515 vec_pair_zz_pX_long factors; 516 #endif 517 CanZass(factors,f1); 518 // convert back to factory 519 #ifdef NTL_ZZ 520 F=convertNTLvec_pair_ZZpX_long2FacCFFList(factors,leadcoeff,f.mvar()); 521 #else 522 F=convertNTLvec_pair_zzpX_long2FacCFFList(factors,leadcoeff,f.mvar()); 523 #endif 524 } 459 460 // convert to NTL 461 zz_pX f1=convertFacCF2NTLzzpX(f); 462 zz_p leadcoeff = LeadCoeff(f1); 463 464 //make monic 465 f1=f1 / LeadCoeff(f1); 466 // factorize 467 vec_pair_zz_pX_long factors; 468 CanZass(factors,f1); 469 470 F=convertNTLvec_pair_zzpX_long2FacCFFList(factors,leadcoeff,f.mvar()); 525 471 //test_cff(F,f); 526 472 } … … 716 662 { 717 663 fac_NTL_char = getCharacteristic(); 718 #ifdef NTL_ZZ719 ZZ r;720 r=getCharacteristic();721 ZZ_pContext ccc(r);722 #else723 zz_pContext ccc(getCharacteristic());724 #endif725 ccc.restore();726 #ifdef NTL_ZZ727 ZZ_p::init(r);728 #else729 664 zz_p::init(getCharacteristic()); 730 #endif731 665 } 732 666 733 667 // set minimal polynomial in NTL 734 #ifdef NTL_ZZ735 ZZ_pX minPo=convertFacCF2NTLZZpX(getMipo(alpha));736 ZZ_pEContext c(minPo);737 #else738 668 zz_pX minPo=convertFacCF2NTLzzpX(getMipo(alpha)); 739 zz_pEContext c(minPo); 740 #endif 741 742 c.restore(); 669 zz_pE::init (minPo); 743 670 744 671 // convert to NTL 745 #ifdef NTL_ZZ746 ZZ_pEX f1=convertFacCF2NTLZZ_pEX(f,minPo);747 ZZ_pE leadcoeff= LeadCoeff(f1);748 #else749 672 zz_pEX f1=convertFacCF2NTLzz_pEX(f,minPo); 750 673 zz_pE leadcoeff= LeadCoeff(f1); 751 #endif752 674 753 675 //make monic … … 755 677 756 678 // factorize using NTL 757 #ifdef NTL_ZZ758 vec_pair_ZZ_pEX_long factors;759 #else760 679 vec_pair_zz_pEX_long factors; 761 #endif762 680 CanZass(factors,f1); 763 681 764 682 // return converted result 765 #ifdef NTL_ZZ766 F=convertNTLvec_pair_ZZpEX_long2FacCFFList(factors,leadcoeff,f.mvar(),alpha);767 #else768 683 F=convertNTLvec_pair_zzpEX_long2FacCFFList(factors,leadcoeff,f.mvar(),alpha); 769 #endif770 684 } 771 685 else if (/*getCharacteristic()*/ch==2) … … 774 688 775 689 // remainder is two ==> nothing to do 776 // set remainder777 ZZ r;778 r=getCharacteristic();779 ZZ_pContext ccc(r);780 ccc.restore();781 690 782 691 // set minimal polynomial in NTL using the optimized conversion routines for characteristic 2 783 692 GF2X minPo=convertFacCF2NTLGF2X(getMipo(alpha,f.mvar())); 784 GF2EContext c(minPo); 785 c.restore(); 693 GF2E::init (minPo); 786 694 787 695 // convert to NTL again using the faster conversion routines -
factory/cf_gcd.cc
r6b7828 r1e5bbd7 342 342 { 343 343 fac_NTL_char=getCharacteristic(); 344 #ifdef NTL_ZZ345 ZZ r;346 r=getCharacteristic();347 ZZ_pContext ccc(r);348 #else349 zz_pContext ccc(getCharacteristic());350 #endif351 ccc.restore();352 #ifdef NTL_ZZ353 ZZ_p::init(r);354 #else355 344 zz_p::init(getCharacteristic()); 356 #endif 357 } 358 #ifdef NTL_ZZ 359 ZZ_pX F1=convertFacCF2NTLZZpX(f); 360 ZZ_pX G1=convertFacCF2NTLZZpX(g); 361 ZZ_pX R; 362 ZZ_pX A,B; 363 XGCD(R,A,B,F1,G1); 364 a=convertNTLZZpX2CF(A,f.mvar()); 365 b=convertNTLZZpX2CF(B,f.mvar()); 366 return convertNTLZZpX2CF(R,f.mvar()); 367 #else 345 } 368 346 zz_pX F1=convertFacCF2NTLzzpX(f); 369 347 zz_pX G1=convertFacCF2NTLzzpX(g); … … 374 352 b=convertNTLzzpX2CF(B,f.mvar()); 375 353 return convertNTLzzpX2CF(R,f.mvar()); 376 #endif377 354 } 378 355 #endif … … 1128 1105 { 1129 1106 fac_NTL_char=getCharacteristic(); 1130 #ifdef NTL_ZZ1131 ZZ r;1132 r=getCharacteristic();1133 ZZ_pContext ccc(r);1134 #else1135 zz_pContext ccc(getCharacteristic());1136 #endif1137 ccc.restore();1138 #ifdef NTL_ZZ1139 ZZ_p::init(r);1140 #else1141 1107 zz_p::init(getCharacteristic()); 1142 #endif 1143 } 1144 #ifdef NTL_ZZ 1145 ZZ_pX F1=convertFacCF2NTLZZpX(F); 1146 ZZ_pX G1=convertFacCF2NTLZZpX(G); 1147 ZZ_pX R=GCD(F1,G1); 1148 return convertNTLZZpX2CF(R,F.mvar()); 1149 #else 1108 } 1150 1109 zz_pX F1=convertFacCF2NTLzzpX(F); 1151 1110 zz_pX G1=convertFacCF2NTLzzpX(G); 1152 1111 zz_pX R=GCD(F1,G1); 1153 1112 return convertNTLzzpX2CF(R,F.mvar()); 1154 #endif1155 1113 } 1156 1114 #endif -
factory/cf_gcd_smallp.cc
r6b7828 r1e5bbd7 1721 1721 long rk= nmod_mat_rref (FLINTN); 1722 1722 1723 delete N; 1723 1724 N= convertNmod_mat_t2FacCFMatrix (FLINTN); 1724 delete N;1725 1725 nmod_mat_clear (FLINTN); 1726 1726 #else … … 1772 1772 long rk= gauss (*NTLN); 1773 1773 1774 delete N; 1774 1775 N= convertNTLmat_zz_pE2FacCFMatrix (*NTLN, alpha); 1776 1777 delete NTLN; 1775 1778 1776 1779 M= (*N) (1, M.rows(), 1, M.columns()); … … 1817 1820 #ifdef HAVE_FLINT 1818 1821 nmod_mat_clear (FLINTN); 1822 #else 1823 delete NTLN; 1819 1824 #endif 1820 1825 return CFArray(); … … 1856 1861 mat_zz_pE *NTLN= convertFacCFMatrix2NTLmat_zz_pE(*N); 1857 1862 long rk= gauss (*NTLN); 1863 1864 delete N; 1858 1865 if (rk != M.columns()) 1859 1866 { 1860 delete N ;1867 delete NTLN; 1861 1868 return CFArray(); 1862 1869 } 1863 1870 N= convertNTLmat_zz_pE2FacCFMatrix (*NTLN, alpha); 1871 1872 delete NTLN; 1864 1873 1865 1874 CFArray A= readOffSolution (*N, rk); -
kernel/mod2.h.cmake.in
r142afd r1e5bbd7 261 261 * Miscellanous Defines 262 262 ******************************************************************/ 263 /* Under HPUX 9, system(...) returns -1 if SIGCHLD does not equal264 SIG_DFL. However, if it stays at SIG_DFL we get zombie processes265 for terminated childs generated by fork. Therefors some special treatment266 is necessary */267 #ifdef HPUX_9268 #include <stdlib.h>269 #define system hpux9_system270 #ifdef __cplusplus271 extern "C" {272 #endif273 int hpux9_system(const char* system);274 #ifdef __cplusplus275 }276 #endif277 #endif278 279 263 #ifndef HAVE_LIBPARSER 280 264 # undef YYLPDEBUG -
kernel/structs.h
r142afd r1e5bbd7 89 89 extern "C" { 90 90 #endif 91 void m2_end(int i) __attribute__((noreturn));91 void m2_end(int i); 92 92 #ifdef __cplusplus 93 93 }
Note: See TracChangeset
for help on using the changeset viewer.