Changeset e64ec88 in git for factory/cfModGcd.cc
- Timestamp:
- Jun 30, 2020, 1:06:38 PM (3 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- f542551517fde5e0e330f2a5f4ae6e3fdfd32454
- Parents:
- c13ebdc9277f3b41f188d330d716d537518c250d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cfModGcd.cc
rc13ebd re64ec88 1783 1783 } 1784 1784 1785 #ifdef HAVE_NTL //gauss, zz_pE1786 1785 long 1787 1786 gaussianElimFq (CFMatrix& M, CFArray& L, const Variable& alpha) … … 1799 1798 (*N) (j, M.columns() + 1)= L[i]; 1800 1799 int p= getCharacteristic (); 1800 #ifdef HAVE_FLINT 1801 // convert mipo 1802 nmod_poly_t mipo1; 1803 convertFacCF2nmod_poly_t(mipo1,getMipo(alpha)); 1804 fq_nmod_ctx_t ctx; 1805 fq_nmod_ctx_init_modulus(ctx,mipo1,"t"); 1806 nmod_poly_clear(mipo1); 1807 // convert matrix 1808 fq_nmod_mat_t FLINTN; 1809 convertFacCFMatrix2Fq_nmod_mat_t (FLINTN, ctx, *N); 1810 // rank 1811 long rk= fq_nmod_mat_rref (FLINTN,ctx); 1812 // clean up 1813 fq_nmod_mat_clear (FLINTN,ctx); 1814 fq_nmod_ctx_clear(ctx); 1815 #elif defined(HAVE_NTL) 1801 1816 if (fac_NTL_char != p) 1802 1817 { … … 1808 1823 mat_zz_pE *NTLN= convertFacCFMatrix2NTLmat_zz_pE(*N); 1809 1824 long rk= gauss (*NTLN); 1810 1825 N= convertNTLmat_zz_pE2FacCFMatrix (*NTLN, alpha); 1826 delete NTLN; 1827 #endif 1811 1828 delete N; 1812 N= convertNTLmat_zz_pE2FacCFMatrix (*NTLN, alpha);1813 1814 delete NTLN;1815 1829 1816 1830 M= (*N) (1, M.rows(), 1, M.columns()); … … 1822 1836 return rk; 1823 1837 } 1824 #endif1825 1838 1826 1839 CFArray … … 1876 1889 } 1877 1890 1878 #ifdef HAVE_NTL //gauss, zz_pE1879 1891 CFArray 1880 1892 solveSystemFq (const CFMatrix& M, const CFArray& L, const Variable& alpha) … … 1891 1903 (*N) (j, M.columns() + 1)= L[i]; 1892 1904 int p= getCharacteristic (); 1905 #ifdef HAVE_FLINT 1906 // convert mipo 1907 nmod_poly_t mipo1; 1908 convertFacCF2nmod_poly_t(mipo1,getMipo(alpha)); 1909 fq_nmod_ctx_t ctx; 1910 fq_nmod_ctx_init_modulus(ctx,mipo1,"t"); 1911 nmod_poly_clear(mipo1); 1912 // convert matrix 1913 fq_nmod_mat_t FLINTN; 1914 convertFacCFMatrix2Fq_nmod_mat_t (FLINTN, ctx, *N); 1915 // rank 1916 long rk= fq_nmod_mat_rref (FLINTN,ctx); 1917 #elif defined(HAVE_NTL) 1893 1918 if (fac_NTL_char != p) 1894 1919 { … … 1900 1925 mat_zz_pE *NTLN= convertFacCFMatrix2NTLmat_zz_pE(*N); 1901 1926 long rk= gauss (*NTLN); 1927 #endif 1902 1928 1903 1929 delete N; 1904 1930 if (rk != M.columns()) 1905 1931 { 1932 #if defined(HAVE_NTL) && !defined(HAVE_FLINT) 1906 1933 delete NTLN; 1934 #endif 1907 1935 return CFArray(); 1908 1936 } 1937 #ifdef HAVE_FLINT 1938 // convert and clean up 1939 N=convertFq_nmod_mat_t2FacCFMatrix(FLINTN,ctx,alpha); 1940 fq_nmod_mat_clear (FLINTN,ctx); 1941 fq_nmod_ctx_clear(ctx); 1942 #elif defined(HAVE_NTL) 1909 1943 N= convertNTLmat_zz_pE2FacCFMatrix (*NTLN, alpha); 1910 1911 1944 delete NTLN; 1945 #endif 1912 1946 1913 1947 CFArray A= readOffSolution (*N, rk); … … 1916 1950 return A; 1917 1951 } 1918 #endif1919 1952 #endif 1920 1953 … … 4222 4255 } 4223 4256 } 4224 4225 4226 4257 #endif
Note: See TracChangeset
for help on using the changeset viewer.