Skip to content
Open

cleanup #2471

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -649,18 +649,22 @@ case $host in
applem1*)
gcc_cflags_arch="-march=armv8.5-a"
gcc_cflags_tune=""
param_path="arm64/applem1"
;;
applem2*)
gcc_cflags_arch="-march=armv8.6-a"
gcc_cflags_tune=""
param_path="arm64/applem1"
;;
applem3*)
gcc_cflags_arch="-march=armv8.6-a"
gcc_cflags_tune=""
param_path="arm64/applem1"
;;
applem4*)
gcc_cflags_arch="-march=armv8.7-a"
gcc_cflags_tune=""
param_path="arm64/applem1"
;;
aarch64* | armv8*)
gcc_cflags_arch="-march=armv8-a"
Expand Down
8 changes: 4 additions & 4 deletions src/test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
/* Include functions *********************************************************/

#include "t-add_ssaaaa.c"
#include "t-add_sssaaaaaa.c"
#include "t-flint_clz.c"
#include "t-flint_ctz.c"
#include "t-io.c"
#include "t-memory_manager.c"
#include "t-nn_add.c"
#include "t-nn_sub.c"
#include "t-sdiv_qrnnd.c"
#include "t-smul_ppmm.c"
#include "t-sort.c"
#include "t-sub_dddmmmsss.c"
#include "t-sub_ddmmss.c"
#include "t-udiv_qrnnd.c"
#include "t-udiv_qrnnd_preinv.c"
Expand All @@ -31,16 +31,16 @@
test_struct tests[] =
{
TEST_FUNCTION(add_ssaaaa),
TEST_FUNCTION(add_sssaaaaaa),
TEST_FUNCTION(flint_clz),
TEST_FUNCTION(flint_ctz),
TEST_FUNCTION(flint_fprintf),
TEST_FUNCTION(flint_printf),
TEST_FUNCTION(memory_manager),
TEST_FUNCTION(nn_add),
TEST_FUNCTION(nn_sub),
TEST_FUNCTION(sdiv_qrnnd),
TEST_FUNCTION(smul_ppmm),
TEST_FUNCTION(flint_sort),
TEST_FUNCTION(sub_dddmmmsss),
TEST_FUNCTION(sub_ddmmss),
TEST_FUNCTION(udiv_qrnnd),
TEST_FUNCTION(udiv_qrnnd_preinv),
Expand Down
101 changes: 0 additions & 101 deletions src/test/t-add_sssaaaaaa.c

This file was deleted.

64 changes: 64 additions & 0 deletions src/test/t-nn_add.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
Copyright (C) 2009 William Hart
Copyright (C) 2011 Fredrik Johansson
Copyright (C) 2025 Albin Ahlbäck

This file is part of FLINT.

FLINT is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Foundation; either version 3 of the License, or
(at your option) any later version. See <https://www.gnu.org/licenses/>.
*/

#include <gmp.h>
#include "ulong_extras.h"
#include "mpn_extras.h"
#include "test_helpers.h"

#define DCL static void

DCL nadd2(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_ADD_2(rp, ap, bp); }
DCL nadd3(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_ADD_3(rp, ap, bp); }
DCL nadd4(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_ADD_4(rp, ap, bp); }
DCL nadd5(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_ADD_5(rp, ap, bp); }
DCL nadd6(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_ADD_6(rp, ap, bp); }
DCL nadd7(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_ADD_7(rp, ap, bp); }
DCL nadd8(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_ADD_8(rp, ap, bp); }
static void (*adds[])(nn_ptr, nn_srcptr, nn_srcptr)=
{NULL, NULL, nadd2, nadd3, nadd4, nadd5, nadd6, nadd7, nadd8};

TEST_FUNCTION_START(nn_add, state)
{
int i, j, result;

for (i = 0; i < 50000 * flint_test_multiplier(); i++)
{
ulong _rp[8], sp[8], ap[8], bp[8];
slong n = 2 + n_randint(state, 7);
int alias = n_randint(state, 2);
nn_ptr rp = alias ? ap : _rp;

for (j = 0; j < 8; j++)
{
sp[j] = n_randtest(state);
ap[j] = n_randtest(state);
bp[j] = n_randtest(state);
}

mpn_add_n(sp, ap, bp, n);
adds[n](rp, ap, bp);

result = flint_mpn_equal_p(rp, sp, n);

if (!result)
TEST_FUNCTION_FAIL("Aliasing: %d\n" "n = %d\n"
"rp = %{ulong*}\n" "sp = %{ulong*}\n"
"ap = %{ulong*}\n" "bp = %{ulong*}\n" "i=%d\n",
alias, n, rp, n, sp, n, ap, n, bp, n, i);
}

TEST_FUNCTION_END(state);
}

#undef DCL
64 changes: 64 additions & 0 deletions src/test/t-nn_sub.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
Copyright (C) 2009 William Hart
Copyright (C) 2011 Fredrik Johansson
Copyright (C) 2025 Albin Ahlbäck

This file is part of FLINT.

FLINT is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Foundation; either version 3 of the License, or
(at your option) any later version. See <https://www.gnu.org/licenses/>.
*/

#include <gmp.h>
#include "ulong_extras.h"
#include "mpn_extras.h"
#include "test_helpers.h"

#define DCL static void

DCL nsub2(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_SUB_2(rp, ap, bp); }
DCL nsub3(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_SUB_3(rp, ap, bp); }
DCL nsub4(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_SUB_4(rp, ap, bp); }
DCL nsub5(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_SUB_5(rp, ap, bp); }
DCL nsub6(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_SUB_6(rp, ap, bp); }
DCL nsub7(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_SUB_7(rp, ap, bp); }
DCL nsub8(nn_ptr rp, nn_srcptr ap, nn_srcptr bp) { NN_SUB_8(rp, ap, bp); }
void (*subs[])(nn_ptr, nn_srcptr, nn_srcptr)=
{NULL, NULL, nsub2, nsub3, nsub4, nsub5, nsub6, nsub7, nsub8};

TEST_FUNCTION_START(nn_sub, state)
{
int i, j, result;

for (i = 0; i < 50000 * flint_test_multiplier(); i++)
{
ulong _rp[8], sp[8], ap[8], bp[8];
slong n = 2 + n_randint(state, 7);
int alias = n_randint(state, 2);
nn_ptr rp = alias ? ap : _rp;

for (j = 0; j < 8; j++)
{
sp[j] = n_randtest(state);
ap[j] = n_randtest(state);
bp[j] = n_randtest(state);
}

mpn_sub_n(sp, ap, bp, n);
subs[n](rp, ap, bp);

result = flint_mpn_equal_p(rp, sp, n);

if (!result)
TEST_FUNCTION_FAIL("Aliasing: %d\n" "n = %d\n"
"rp = %{ulong*}\n" "sp = %{ulong*}\n"
"ap = %{ulong*}\n" "bp = %{ulong*}\n" "i=%d\n",
alias, n, rp, n, sp, n, ap, n, bp, n, i);
}

TEST_FUNCTION_END(state);
}

#undef DCL
99 changes: 0 additions & 99 deletions src/test/t-sub_dddmmmsss.c

This file was deleted.

Loading
Loading