diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 74261d0bd4..f1be6f2f63 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -192,7 +192,7 @@ jobs: macos-m1: name: macOS-M1, Clang (x3) - runs-on: macos-14 + runs-on: macos-15 env: FLINT_TEST_MULTIPLIER: "3" @@ -208,13 +208,16 @@ jobs: - name: "Setup" run: | + # GMP and MPFR are already installed, and it complains if we try to + # install it. + # brew install gmp + # brew install mpfr brew install make - brew install gmp - brew install mpfr brew install autoconf brew install libtool brew install automake - $(brew --prefix llvm@15)/bin/clang --version + brew install llvm + $(brew --prefix llvm)/bin/clang --version gmake --version autoconf --version echo "MAKE=gmake -j$(expr $(nproc) + 1) -l 10 --output-sync=target" >> $GITHUB_ENV @@ -223,7 +226,7 @@ jobs: run: | ./bootstrap.sh ./configure \ - CC=$(brew --prefix llvm@15)/bin/clang \ + CC=$(brew --prefix llvm)/bin/clang \ --with-gmp=$(brew --prefix) \ --with-mpfr=$(brew --prefix) \ --disable-debug @@ -242,71 +245,17 @@ jobs: - ############################################################################## - # macos (x86) with clang and blas - ############################################################################## - macos-x86: - name: macOS-x86 Clang with BLAS (x2) - - runs-on: macos-12 - - env: - FLINT_TEST_MULTIPLIER: "2" - - steps: - - name: "Rescale multiplier" - run: | - FLINT_TEST_MULTIPLIER=$(echo "${FLINT_TEST_MULTIPLIER} * ${GLOBAL_MULTIPLIER}" | bc) - echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}" - echo "FLINT_TEST_MULTIPLIER=${FLINT_TEST_MULTIPLIER}" >> $GITHUB_ENV - - - uses: actions/checkout@v4 - - - name: "Setup" - run: | - brew install make - brew install gmp - brew install mpfr - brew install autoconf - brew install libtool - brew install automake - brew install openblas - $(brew --prefix llvm@15)/bin/clang --version - gmake --version - autoconf --version - echo "MAKE=gmake -j$(expr $(nproc) + 1) -l 10 --output-sync=target" >> $GITHUB_ENV - - - name: "Configure" - run: | - ./bootstrap.sh - ./configure \ - CC=$(brew --prefix llvm@15)/bin/clang \ - --with-gmp=$(brew --prefix) \ - --with-mpfr=$(brew --prefix) \ - --with-blas=$(brew --prefix)/opt/openblas \ - --disable-debug - - - name: "Compile library" - run: | - $MAKE - - - name: "Compile tests" - run: | - $MAKE tests - - - name: "Check" - run: | - $MAKE check - - - ############################################################################# - # ubuntu with clang + # ubuntu with clang and BLAS ############################################################################# ubuntu-clang: - name: Ubuntu Clang with examples (x5) + name: Ubuntu Clang, BLAS and examples (x5) - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 + + # NOTE: Clang is currently buggy on Ubuntu. Hence, we temporarily allow + # this job to fail. + continue-on-error: true env: LOCAL: ${{ github.workspace }}/local @@ -325,7 +274,7 @@ jobs: - name: "Setup" run: | - sudo apt-get install -y libgmp-dev libmpfr-dev autoconf libtool-bin perl + sudo apt-get install -y libgmp-dev libmpfr-dev autoconf libtool-bin perl libopenblas-dev clang --version make --version autoconf --version @@ -338,6 +287,7 @@ jobs: ./bootstrap.sh ./configure \ CC=${CC} \ + --with-blas \ --disable-debug - name: "Compile library" @@ -496,7 +446,7 @@ jobs: alpine-32bit: name: Alpine Linux, musl, 32-bit (assert, x1.5) - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: CC: "gcc" @@ -565,7 +515,7 @@ jobs: # nemo ############################################################################## nemo: - name: Nemo.jl (temporary branch) + name: Nemo.jl runs-on: ubuntu-24.04 diff --git a/CMake/FindPThreads.cmake b/CMake/FindPThreads.cmake index c3d377b1f5..01da7e0005 100644 --- a/CMake/FindPThreads.cmake +++ b/CMake/FindPThreads.cmake @@ -14,4 +14,4 @@ find_library(PThreads_LIBRARIES NAMES pthreads libpthreads ) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(PThreads DEFAULT_MSG PThreads_INCLUDE_DIRS PThreads_LIBRARIES) -mark_as_advanced(PThreads_INCLUDE_DIRS PThreads_LIBRARIES) \ No newline at end of file +mark_as_advanced(PThreads_INCLUDE_DIRS PThreads_LIBRARIES) diff --git a/CMake/FindSphinx.cmake b/CMake/FindSphinx.cmake index e21da9337d..c8f72f3355 100644 --- a/CMake/FindSphinx.cmake +++ b/CMake/FindSphinx.cmake @@ -48,4 +48,4 @@ function(Sphinx_add_target target_name builder conf source destination) APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${destination} ) -endfunction() \ No newline at end of file +endfunction() diff --git a/src/fmpz_mat/test/t-minpoly.c b/src/fmpz_mat/test/t-minpoly.c index df8f9ca363..9e37781a3b 100644 --- a/src/fmpz_mat/test/t-minpoly.c +++ b/src/fmpz_mat/test/t-minpoly.c @@ -15,21 +15,37 @@ #include "fmpz_mat.h" #include "fmpz_poly.h" +/* NOTE: Clang >= 18 cannot compile this on x86 systems for some reason. + * Therefore, push this to a separate function to avoid segfaults during + * compilation. */ +FLINT_STATIC_NOINLINE void set_matrix(fmpz_mat_t am, slong n) +{ + slong ix, jx; + + for (ix = 0; ix < n/2; ix++) + for (jx = 0; jx < n/2; jx++) + { + fmpz_zero(fmpz_mat_entry(am, ix + n/2, jx)); + fmpz_zero(fmpz_mat_entry(am, ix, jx + n/2)); + fmpz_set(fmpz_mat_entry(am, ix + n/2, jx + n/2), fmpz_mat_entry(am, ix, jx)); + } +} + TEST_FUNCTION_START(fmpz_mat_minpoly, state) { - slong m, n, rep, i, j; + slong n, rep; for (rep = 0; rep < 1000 * flint_test_multiplier(); rep++) { fmpz_t c; fmpz_mat_t A; fmpz_poly_t f, g, q, r; + slong ix; - m = n_randint(state, 4); - n = m; + n = n_randint(state, 4); fmpz_init(c); - fmpz_mat_init(A, m, n); + fmpz_mat_init(A, n, n); fmpz_poly_init(f); fmpz_poly_init(g); fmpz_poly_init(q); @@ -37,20 +53,12 @@ TEST_FUNCTION_START(fmpz_mat_minpoly, state) fmpz_mat_randtest(A, state, 10); - for (i = 0; i < n/2; i++) - { - for (j = 0; j < n/2; j++) - { - fmpz_zero(fmpz_mat_entry(A, i + n/2, j)); - fmpz_zero(fmpz_mat_entry(A, i, j + n/2)); - fmpz_set(fmpz_mat_entry(A, i + n/2, j + n/2), fmpz_mat_entry(A, i, j)); - } - } + set_matrix(A, n); - for (i = 0; i < 10; i++) + for (ix = 0; ix < 10; ix++) { fmpz_randtest(c, state, 5); - fmpz_mat_similarity(A, n_randint(state, m), c); + fmpz_mat_similarity(A, n_randint(state, n), c); } fmpz_mat_minpoly(f, A); @@ -81,34 +89,26 @@ TEST_FUNCTION_START(fmpz_mat_minpoly, state) fmpz_t c; fmpz_mat_t A, B; fmpz_poly_t f, g; + slong ix; - m = n_randint(state, 4); - n = m; + n = n_randint(state, 4); fmpz_init(c); - fmpz_mat_init(A, m, n); - fmpz_mat_init(B, m, n); + fmpz_mat_init(A, n, n); + fmpz_mat_init(B, n, n); fmpz_poly_init(f); fmpz_poly_init(g); fmpz_mat_randtest(A, state, 10); - for (i = 0; i < n/2; i++) - { - for (j = 0; j < n/2; j++) - { - fmpz_zero(fmpz_mat_entry(A, i + n/2, j)); - fmpz_zero(fmpz_mat_entry(A, i, j + n/2)); - fmpz_set(fmpz_mat_entry(A, i + n/2, j + n/2), fmpz_mat_entry(A, i, j)); - } - } + set_matrix(A, n); fmpz_mat_set(B, A); - for (i = 0; i < 10; i++) + for (ix = 0; ix < 10; ix++) { fmpz_randtest(c, state, 5); - fmpz_mat_similarity(B, n_randint(state, m), c); + fmpz_mat_similarity(B, n_randint(state, n), c); } fmpz_mat_minpoly(f, A); diff --git a/src/fmpz_mod_mat/det.c b/src/fmpz_mod_mat/det.c index d0b9844247..d015cd56b1 100644 --- a/src/fmpz_mod_mat/det.c +++ b/src/fmpz_mod_mat/det.c @@ -39,4 +39,4 @@ void fmpz_mod_mat_det(fmpz_t res, const fmpz_mod_mat_t mat, const fmpz_mod_ctx_t GR_MUST_SUCCEED(gr_mat_det_berkowitz(res, (const gr_mat_struct *) mat, gr_ctx)); } } -} \ No newline at end of file +} diff --git a/src/generic_files/clz_tab.c b/src/generic_files/clz_tab.c index 9a954efac3..c3d2cb3870 100644 --- a/src/generic_files/clz_tab.c +++ b/src/generic_files/clz_tab.c @@ -25,9 +25,9 @@ Inc. */ #include "flint.h" +#include "longlong.h" -#ifdef NEED_CLZ_TAB - +#if NEED_CLZ_TAB const unsigned char __flint_clz_tab[128] = { 1,2,3,3,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, @@ -35,9 +35,6 @@ const unsigned char __flint_clz_tab[128] = 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 }; - #else - typedef int this_file_is_empty; - #endif diff --git a/src/gr_mat/set_gr_mat_other.c b/src/gr_mat/set_gr_mat_other.c index a410ae3d8a..ab192347bf 100644 --- a/src/gr_mat/set_gr_mat_other.c +++ b/src/gr_mat/set_gr_mat_other.c @@ -31,4 +31,4 @@ gr_mat_set_gr_mat_other(gr_mat_t res, const gr_mat_t mat, gr_ctx_t mat_ctx, gr_c status |= gr_set_other(GR_MAT_ENTRY(res, i, j, sz), GR_MAT_ENTRY(mat, i, j, mat_sz), mat_ctx, ctx); return status; -} \ No newline at end of file +} diff --git a/src/longlong.h b/src/longlong.h index 375f86dad3..5003d85e58 100644 --- a/src/longlong.h +++ b/src/longlong.h @@ -25,6 +25,13 @@ extern "C" { #endif +/* FIXME: Bug in Clang 18 */ +#if __clang_major__ >= 18 +# define CLANG_volatile volatile +#else +# define CLANG_volatile +#endif + #if defined(__GNUC__) /* Trailing and leading zeros */ @@ -65,7 +72,7 @@ extern "C" { /* Trailing and leading zeros */ #if !defined(flint_ctz) -# define NEED_CLZ_TAB +# define NEED_CLZ_TAB 1 FLINT_DLL extern const unsigned char __flint_clz_tab[128]; # define flint_clz flint_clz @@ -125,26 +132,26 @@ flint_bitcnt_t FLINT_BIT_COUNT(ulong x) # define add_ssssaaaaaaaa(s3, s2, s1, s0, a3, a2, a1, a0, b3, b2, b1, b0) \ do { \ - ulong __u2; \ - add_sssaaaaaa(__u2, s1, s0, (ulong) 0, a1, a0, (ulong) 0, b1, b0); \ + ulong __t3; \ + add_sssaaaaaa(__t3, s1, s0, (ulong) 0, a1, a0, (ulong) 0, b1, b0); \ add_ssaaaa(s3, s2, a3, a2, b3, b2); \ - add_ssaaaa(s3, s2, s3, s2, (ulong) 0, __u2); \ + add_ssaaaa(s3, s2, s3, s2, (ulong) 0, __t3); \ } while (0) #define add_sssssaaaaaaaaaa(s4, s3, s2, s1, s0, a4, a3, a2, a1, a0, b4, b3, b2, b1, b0) \ do { \ - ulong __t0 = 0; \ - add_ssssaaaaaaaa(__t0, s2, s1, s0, (ulong) 0, a2, a1, a0, (ulong) 0, b2, b1, b0); \ + ulong __t4 = 0; \ + add_ssssaaaaaaaa(__t4, s2, s1, s0, (ulong) 0, a2, a1, a0, (ulong) 0, b2, b1, b0); \ add_ssaaaa(s4, s3, a4, a3, b4, b3); \ - add_ssaaaa(s4, s3, s4, s3, (ulong) 0, __t0); \ + add_ssaaaa(s4, s3, s4, s3, (ulong) 0, __t4); \ } while (0) #define add_ssssssaaaaaaaaaaaa(s5, s4, s3, s2, s1, s0, a5, a4, a3, a2, a1, a0, b5, b4, b3, b2, b1, b0) \ do { \ - ulong __t1 = 0; \ - add_sssssaaaaaaaaaa(__t1, s3, s2, s1, s0, (ulong) 0, a3, a2, a1, a0, (ulong) 0, b3, b2, b1, b0); \ + ulong __t5 = 0; \ + add_sssssaaaaaaaaaa(__t5, s3, s2, s1, s0, (ulong) 0, a3, a2, a1, a0, (ulong) 0, b3, b2, b1, b0); \ add_ssaaaa(s5, s4, a5, a4, b5, b4); \ - add_ssaaaa(s5, s4, s5, s4, (ulong) 0, __t1); \ + add_ssaaaa(s5, s4, s5, s4, (ulong) 0, __t5); \ } while (0) # define sub_ddmmss(s1, s0, a1, a0, b1, b0) \ @@ -164,26 +171,26 @@ flint_bitcnt_t FLINT_BIT_COUNT(ulong x) #define sub_ddddmmmmssss(s3, s2, s1, s0, a3, a2, a1, a0, b3, b2, b1, b0) \ do { \ - ulong __t1, __u1; \ - sub_dddmmmsss(__t1, s1, s0, (ulong) 0, a1, a0, (ulong) 0, b1, b0); \ - sub_ddmmss(__u1, s2, (ulong) 0, a2, (ulong) 0, b2); \ - sub_ddmmss(s3, s2, (a3) - (b3), s2, -__u1, -__t1); \ + ulong __t3, __t4; \ + sub_dddmmmsss(__t3, s1, s0, (ulong) 0, a1, a0, (ulong) 0, b1, b0); \ + sub_ddmmss(__t4, s2, (ulong) 0, a2, (ulong) 0, b2); \ + sub_ddmmss(s3, s2, (a3) - (b3), s2, -__t4, -__t3); \ } while (0) #define sub_dddddmmmmmsssss(s4, s3, s2, s1, s0, a4, a3, a2, a1, a0, b4, b3, b2, b1, b0) \ do { \ - ulong __t2, __u2; \ - sub_ddddmmmmssss(__t2, s2, s1, s0, (ulong) 0, a2, a1, a0, (ulong) 0, b2, b1, b0); \ - sub_ddmmss(__u2, s3, (ulong) 0, a3, (ulong) 0, b3); \ - sub_ddmmss(s4, s3, (a4) - (b4), s3, -__u2, -__t2); \ + ulong __t5, __t6; \ + sub_ddddmmmmssss(__t5, s2, s1, s0, (ulong) 0, a2, a1, a0, (ulong) 0, b2, b1, b0); \ + sub_ddmmss(__t6, s3, (ulong) 0, a3, (ulong) 0, b3); \ + sub_ddmmss(s4, s3, (a4) - (b4), s3, -__t6, -__t5); \ } while (0) #define sub_ddddddmmmmmmssssss(s5, s4, s3, s2, s1, s0, a5, a4, a3, a2, a1, a0, b5, b4, b3, b2, b1, b0) \ do { \ - ulong __t3, __u3; \ - sub_dddddmmmmmsssss(__t3, s3, s2, s1, s0, (ulong) 0, a3, a2, a1, a0, (ulong) 0, b3, b2, b1, b0);\ - sub_ddmmss(__u3, s4, (ulong) 0, a4, (ulong) 0, b4); \ - sub_ddmmss(s5, s4, (a5) - (b5), s4, -__u3, -__t3); \ + ulong __t7, __t8; \ + sub_dddddmmmmmsssss(__t7, s3, s2, s1, s0, (ulong) 0, a3, a2, a1, a0, (ulong) 0, b3, b2, b1, b0);\ + sub_ddmmss(__t8, s4, (ulong) 0, a4, (ulong) 0, b4); \ + sub_ddmmss(s5, s4, (a5) - (b5), s4, -__t8, -__t7); \ } while (0) #endif @@ -193,34 +200,34 @@ flint_bitcnt_t FLINT_BIT_COUNT(ulong x) #define add_sssssssaaaaaaaaaaaaaa(s6, s5, s4, s3, s2, s1, s0, a6, a5, a4, a3, a2, a1, a0, b6, b5, b4, b3, b2, b1, b0) \ do { \ - ulong __t2 = 0; \ - add_ssssssaaaaaaaaaaaa(__t2, s4, s3, s2, s1, s0, (ulong) 0, a4, a3, a2, a1, a0, (ulong) 0, b4, b3, b2, b1, b0); \ + ulong __t6 = 0; \ + add_ssssssaaaaaaaaaaaa(__t6, s4, s3, s2, s1, s0, (ulong) 0, a4, a3, a2, a1, a0, (ulong) 0, b4, b3, b2, b1, b0); \ add_ssaaaa(s6, s5, a6, a5, b6, b5); \ - add_ssaaaa(s6, s5, s6, s5, (ulong) 0, __t2); \ + add_ssaaaa(s6, s5, s6, s5, (ulong) 0, __t6); \ } while (0) #define add_ssssssssaaaaaaaaaaaaaaaa(s7, s6, s5, s4, s3, s2, s1, s0, a7, a6, a5, a4, a3, a2, a1, a0, b7, b6, b5, b4, b3, b2, b1, b0) \ do { \ - ulong __t3 = 0; \ - add_sssssssaaaaaaaaaaaaaa(__t3, s5, s4, s3, s2, s1, s0, (ulong) 0, a5, a4, a3, a2, a1, a0, (ulong) 0, b5, b4, b3, b2, b1, b0); \ + ulong __t7 = 0; \ + add_sssssssaaaaaaaaaaaaaa(__t7, s5, s4, s3, s2, s1, s0, (ulong) 0, a5, a4, a3, a2, a1, a0, (ulong) 0, b5, b4, b3, b2, b1, b0); \ add_ssaaaa(s7, s6, a7, a6, b7, b6); \ - add_ssaaaa(s7, s6, s7, s6, (ulong) 0, __t3); \ + add_ssaaaa(s7, s6, s7, s6, (ulong) 0, __t7); \ } while (0) #define sub_dddddddmmmmmmmsssssss(s6, s5, s4, s3, s2, s1, s0, a6, a5, a4, a3, a2, a1, a0, b6, b5, b4, b3, b2, b1, b0) \ do { \ - ulong __t4, __u4; \ - sub_ddddddmmmmmmssssss(__t4, s4, s3, s2, s1, s0, (ulong) 0, a4, a3, a2, a1, a0, (ulong) 0, b4, b3, b2, b1, b0); \ - sub_ddmmss(__u4, s5, (ulong) 0, a5, (ulong) 0, b5); \ - sub_ddmmss(s6, s5, (a6) - (b6), s5, -__u4, -__t4); \ + ulong __t9, __t10; \ + sub_ddddddmmmmmmssssss(__t9, s4, s3, s2, s1, s0, (ulong) 0, a4, a3, a2, a1, a0, (ulong) 0, b4, b3, b2, b1, b0); \ + sub_ddmmss(__t10, s5, (ulong) 0, a5, (ulong) 0, b5); \ + sub_ddmmss(s6, s5, (a6) - (b6), s5, -__t10, -__t9); \ } while (0) #define sub_ddddddddmmmmmmmmssssssss(s7, s6, s5, s4, s3, s2, s1, s0, a7, a6, a5, a4, a3, a2, a1, a0, b7, b6, b5, b4, b3, b2, b1, b0) \ do { \ - ulong __t5, __u5; \ - sub_dddddddmmmmmmmsssssss(__t5, s5, s4, s3, s2, s1, s0, (ulong) 0, a5, a4, a3, a2, a1, a0, (ulong) 0, b5, b4, b3, b2, b1, b0); \ - sub_ddmmss(__u5, s6, (ulong) 0, a6, (ulong) 0, b6); \ - sub_ddmmss(s7, s6, (a7) - (b7), s6, -__u5, -__t5); \ + ulong __t11, __t12; \ + sub_dddddddmmmmmmmsssssss(__t11, s5, s4, s3, s2, s1, s0, (ulong) 0, a5, a4, a3, a2, a1, a0, (ulong) 0, b5, b4, b3, b2, b1, b0); \ + sub_ddmmss(__t12, s6, (ulong) 0, a6, (ulong) 0, b6); \ + sub_ddmmss(s7, s6, (a7) - (b7), s6, -__t12, -__t11); \ } while (0) #endif @@ -313,8 +320,8 @@ flint_bitcnt_t FLINT_BIT_COUNT(ulong x) # define udiv_qrnnd(q, r, n1, n0, d) \ do { \ - ulong __norm = flint_clz(d); \ - if (__norm) \ + CLANG_volatile int __norm = flint_clz(d); \ + if (__norm != 0) \ { \ udiv_qrnnd_int((q), (r), ((n1) << __norm) + ((n0) >> (FLINT_BITS - __norm)), (n0) << __norm, (d) << __norm); \ (r) = ((ulong) (r) >> __norm); \ diff --git a/src/longlong_asm_clang.h b/src/longlong_asm_clang.h index 302f80e000..3ab1b59dbb 100644 --- a/src/longlong_asm_clang.h +++ b/src/longlong_asm_clang.h @@ -186,9 +186,9 @@ do \ #define _mul_ppmm(big_type, small_type, r1, r0, u, v) \ do \ { \ - big_type __r = (big_type) ((small_type) u) * (big_type) ((small_type) v); \ - (r0) = (small_type) __r; \ - (r1) = (small_type) (__r >> FLINT_BITS); \ + big_type __rx = (big_type) ((small_type) u) * (big_type) ((small_type) v); \ + (r0) = (small_type) __rx; \ + (r1) = (small_type) (__rx >> FLINT_BITS); \ } while (0) #define umul_ppmm(r1, r0, u, v) _mul_ppmm(_STOR_ULONG, ulong, r1, r0, u, v) diff --git a/src/mpn_extras.h b/src/mpn_extras.h index 90fc8e6436..16ce9061ae 100644 --- a/src/mpn_extras.h +++ b/src/mpn_extras.h @@ -278,13 +278,13 @@ char * _flint_mpn_get_str(mp_srcptr x, mp_size_t n); #define FLINT_MPN_MUL_2X2(r3, r2, r1, r0, a1, a0, b1, b0) \ do { \ - mp_limb_t __t1, __t2, __u1, __u2; \ + mp_limb_t __v1, __v2, __u1, __u2; \ mp_limb_t __r3, __r2, __r1, __r0; \ mp_limb_t __a1 = (a1), __a0 = (a0), __b1 = (b1), __b0 = (b0); \ umul_ppmm(__r1, __r0, __a0, __b0); \ umul_ppmm(__r3, __r2, __a1, __b1); \ - umul_ppmm(__t2, __t1, __a0, __b1); \ - add_sssaaaaaa(__r3, __r2, __r1, __r3, __r2, __r1, 0, __t2, __t1); \ + umul_ppmm(__v2, __v1, __a0, __b1); \ + add_sssaaaaaa(__r3, __r2, __r1, __r3, __r2, __r1, 0, __v2, __v1); \ umul_ppmm(__u2, __u1, __a1, __b0); \ add_sssaaaaaa(__r3, __r2, __r1, __r3, __r2, __r1, 0, __u2, __u1); \ (r0) = __r0; (r1) = __r1; (r2) = __r2; (r3) = __r3; \ @@ -307,14 +307,14 @@ char * _flint_mpn_get_str(mp_srcptr x, mp_size_t n); #define FLINT_MPN_SQR_2X2(r3, r2, r1, r0, a1, a0) \ do { \ - mp_limb_t __t1, __t2, __t3; \ + mp_limb_t __u1, __u2, __u3; \ mp_limb_t __r3, __r2, __r1, __r0; \ mp_limb_t __a1 = (a1), __a0 = (a0); \ - umul_ppmm(__t2, __t1, __a0, __a1); \ - add_sssaaaaaa(__t3, __t2, __t1, 0, __t2, __t1, 0, __t2, __t1); \ + umul_ppmm(__u2, __u1, __a0, __a1); \ + add_sssaaaaaa(__u3, __u2, __u1, 0, __u2, __u1, 0, __u2, __u1); \ umul_ppmm(__r1, __r0, __a0, __a0); \ umul_ppmm(__r3, __r2, __a1, __a1); \ - add_sssaaaaaa(__r3, __r2, __r1, __r3, __r2, __r1, __t3, __t2, __t1); \ + add_sssaaaaaa(__r3, __r2, __r1, __r3, __r2, __r1, __u3, __u2, __u1); \ (r0) = __r0; (r1) = __r1; (r2) = __r2; (r3) = __r3; \ } while (0) diff --git a/src/mpn_extras/profile/p-mullow.c b/src/mpn_extras/profile/p-mullow.c index 46a6374b94..97f738ac8e 100644 --- a/src/mpn_extras/profile/p-mullow.c +++ b/src/mpn_extras/profile/p-mullow.c @@ -63,4 +63,4 @@ main(void) return 0; } -#undef N_MAX \ No newline at end of file +#undef N_MAX diff --git a/src/nfloat/dot.c b/src/nfloat/dot.c index db25936c7b..45fc4a484d 100644 --- a/src/nfloat/dot.c +++ b/src/nfloat/dot.c @@ -24,12 +24,12 @@ /* Experimental: use fast but inaccurate product? */ #define FLINT_MPN_MUL_2X2H(r3, r2, r1, a1, a0, b1, b0) \ do { \ - ulong __t1, __t2, __u1, __u2, __v3, __v2; \ + ulong __s1, __s2, __u1, __u2, __v3, __v2; \ ulong __r3, __r2, __r1; \ ulong __a1 = (a1), __a0 = (a0), __b1 = (b1), __b0 = (b0); \ - umul_ppmm(__t2, __t1, __a0, __b1); \ + umul_ppmm(__s2, __s1, __a0, __b1); \ umul_ppmm(__u2, __u1, __a1, __b0); \ - add_sssaaaaaa(__r3, __r2, __r1, 0, __t2, __t1, 0, __u2, __u1); \ + add_sssaaaaaa(__r3, __r2, __r1, 0, __s2, __s1, 0, __u2, __u1); \ umul_ppmm(__v3, __v2, __a1, __b1); \ add_ssaaaa(__r3, __r2, __r3, __r2, __v3, __v2); \ (r1) = __r1; (r2) = __r2; (r3) = __r3; \ diff --git a/src/nfloat/test/t-nfixed_mat_mul.c b/src/nfloat/test/t-nfixed_mat_mul.c index 54788e4f4b..3201b931fc 100644 --- a/src/nfloat/test/t-nfixed_mat_mul.c +++ b/src/nfloat/test/t-nfixed_mat_mul.c @@ -107,4 +107,4 @@ TEST_FUNCTION_START(nfixed_mat_mul, state) } TEST_FUNCTION_END(state); -} \ No newline at end of file +} diff --git a/src/nfloat/test/t-nfixed_mat_mul_classical.c b/src/nfloat/test/t-nfixed_mat_mul_classical.c index a6c86ab88c..bbc9c9feee 100644 --- a/src/nfloat/test/t-nfixed_mat_mul_classical.c +++ b/src/nfloat/test/t-nfixed_mat_mul_classical.c @@ -107,4 +107,4 @@ TEST_FUNCTION_START(nfixed_mat_mul_classical, state) } TEST_FUNCTION_END(state); -} \ No newline at end of file +} diff --git a/src/nfloat/test/t-nfixed_mat_mul_strassen.c b/src/nfloat/test/t-nfixed_mat_mul_strassen.c index 3e6438db8b..675850fe63 100644 --- a/src/nfloat/test/t-nfixed_mat_mul_strassen.c +++ b/src/nfloat/test/t-nfixed_mat_mul_strassen.c @@ -110,4 +110,4 @@ TEST_FUNCTION_START(nfixed_mat_mul_strassen, state) } TEST_FUNCTION_END(state); -} \ No newline at end of file +} diff --git a/src/nfloat/test/t-nfixed_mat_mul_waksman.c b/src/nfloat/test/t-nfixed_mat_mul_waksman.c index 2a1495a43d..a68c805ede 100644 --- a/src/nfloat/test/t-nfixed_mat_mul_waksman.c +++ b/src/nfloat/test/t-nfixed_mat_mul_waksman.c @@ -107,4 +107,4 @@ TEST_FUNCTION_START(nfixed_mat_mul_waksman, state) } TEST_FUNCTION_END(state); -} \ No newline at end of file +} diff --git a/src/nfloat/test/t-nfloat_complex.c b/src/nfloat/test/t-nfloat_complex.c index 16c18f114b..3b47c1eece 100644 --- a/src/nfloat/test/t-nfloat_complex.c +++ b/src/nfloat/test/t-nfloat_complex.c @@ -66,4 +66,4 @@ TEST_FUNCTION_START(nfloat_complex, state) } TEST_FUNCTION_END(state); -} \ No newline at end of file +}