diff --git a/examples/fq_poly.c b/examples/fq_poly.c
index a0e6b128bb..27add349fc 100644
--- a/examples/fq_poly.c
+++ b/examples/fq_poly.c
@@ -158,7 +158,7 @@ int main(void)
fmpz_clear(p);
}
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/examples/radix.c b/examples/radix.c
index bb13b19bd3..1e25b67b43 100644
--- a/examples/radix.c
+++ b/examples/radix.c
@@ -122,7 +122,7 @@ int main(void)
flint_free(b);
fmpz_mod_ctx_clear(ctx);
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/aprcl/profile/p-is_prime_aprcl.c b/src/aprcl/profile/p-is_prime_aprcl.c
index dad6bd9f93..ab5a7b169e 100644
--- a/src/aprcl/profile/p-is_prime_aprcl.c
+++ b/src/aprcl/profile/p-is_prime_aprcl.c
@@ -760,5 +760,7 @@ int main(void)
flint_free(ns);
}
+ FLINT_TEST_CLEAR(state)
+
return 0;
}
diff --git a/src/aprcl/profile/p-is_prime_aprcl_big.c b/src/aprcl/profile/p-is_prime_aprcl_big.c
index 3b915c32d6..17f2afe737 100644
--- a/src/aprcl/profile/p-is_prime_aprcl_big.c
+++ b/src/aprcl/profile/p-is_prime_aprcl_big.c
@@ -9,6 +9,7 @@
(at your option) any later version. See .
*/
+#include "flint.h"
#include "profiler.h"
#include "fmpz.h"
#include "aprcl.h"
@@ -419,5 +420,7 @@ int main(void)
fmpz_clear(n);
}
+ FLINT_TEST_CLEAR(state)
+
return 0;
}
diff --git a/src/fft/profile/p-mul_mfa_truncate_sqrt2.c b/src/fft/profile/p-mul_mfa_truncate_sqrt2.c
index 604f332d83..1436d91e60 100644
--- a/src/fft/profile/p-mul_mfa_truncate_sqrt2.c
+++ b/src/fft/profile/p-mul_mfa_truncate_sqrt2.c
@@ -55,7 +55,7 @@ main(void)
flint_free(i1);
}
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
flint_printf("done\n");
return 0;
diff --git a/src/fft/profile/p-mul_truncate_sqrt2.c b/src/fft/profile/p-mul_truncate_sqrt2.c
index e4ae8563a2..fc58484031 100644
--- a/src/fft/profile/p-mul_truncate_sqrt2.c
+++ b/src/fft/profile/p-mul_truncate_sqrt2.c
@@ -55,7 +55,7 @@ main(void)
flint_free(i1);
}
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
flint_printf("done\n");
return 0;
diff --git a/src/fft/tune/tune-fft.c b/src/fft/tune/tune-fft.c
index 44fbf2dbaa..efb980cc21 100644
--- a/src/fft/tune/tune-fft.c
+++ b/src/fft/tune/tune-fft.c
@@ -169,8 +169,9 @@ main(void)
flint_printf("#define FFT_MULMOD_2EXPP1_CUTOFF %wd\n\n", ((mp_limb_t) 1 << best_d)*best_w/(2*FLINT_BITS));
- flint_rand_clear(state);
-
flint_printf("#endif\n");
+
+ FLINT_TEST_CLEAR(state);
+
return 0;
}
diff --git a/src/flint.h.in b/src/flint.h.in
index 5362e59a5e..a574fc8a26 100644
--- a/src/flint.h.in
+++ b/src/flint.h.in
@@ -351,7 +351,7 @@ FLINT_INLINE ulong n_randint(flint_rand_t state, ulong limit)
FLINT_GC_INIT(); \
flint_rand_init(xxx)
-#define FLINT_TEST_CLEANUP(xxx) \
+#define FLINT_TEST_CLEAR(xxx) \
flint_rand_clear(xxx); \
flint_cleanup_master();
diff --git a/src/fmpz/profile/p-addmul.c b/src/fmpz/profile/p-addmul.c
index 9f6e3eb336..69119ddfa5 100644
--- a/src/fmpz/profile/p-addmul.c
+++ b/src/fmpz/profile/p-addmul.c
@@ -77,7 +77,7 @@ sample_new(void * arg, ulong count)
_fmpz_vec_clear(res, ntests);
_fmpz_vec_clear(a, ntests);
_fmpz_vec_clear(b, ntests);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void
@@ -111,7 +111,7 @@ sample_old(void * arg, ulong count)
_fmpz_vec_clear(res, ntests);
_fmpz_vec_clear(a, ntests);
_fmpz_vec_clear(b, ntests);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
slong sizes[] = { 10, 30, 60, 62, 64, 66, 80, 128, 160, 256, 512, 1024, 4096, 0 };
diff --git a/src/fmpz/profile/p-aors_ui.c b/src/fmpz/profile/p-aors_ui.c
index ffcde7c701..c37647accc 100644
--- a/src/fmpz/profile/p-aors_ui.c
+++ b/src/fmpz/profile/p-aors_ui.c
@@ -439,7 +439,7 @@ sample_add_new(void * arg, ulong count)
_fmpz_vec_clear(res, ntests);
_fmpz_vec_clear(a, ntests);
flint_free(b);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void
@@ -474,7 +474,7 @@ sample_add_old(void * arg, ulong count)
_fmpz_vec_clear(res, ntests);
_fmpz_vec_clear(a, ntests);
flint_free(b);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void
@@ -509,7 +509,7 @@ sample_sub_new(void * arg, ulong count)
_fmpz_vec_clear(res, ntests);
_fmpz_vec_clear(a, ntests);
flint_free(b);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void
@@ -544,7 +544,7 @@ sample_sub_old(void * arg, ulong count)
_fmpz_vec_clear(res, ntests);
_fmpz_vec_clear(a, ntests);
flint_free(b);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
diff --git a/src/fmpz/profile/p-div_qr.c b/src/fmpz/profile/p-div_qr.c
index d120831e78..0940ea6b19 100644
--- a/src/fmpz/profile/p-div_qr.c
+++ b/src/fmpz/profile/p-div_qr.c
@@ -50,7 +50,7 @@ void sample_ndiv_qr(void * arg, ulong count)
fmpz_clear(b);
fmpz_clear(nmax);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_fdiv_qr(void * arg, ulong count)
@@ -90,7 +90,7 @@ void sample_fdiv_qr(void * arg, ulong count)
fmpz_clear(b);
fmpz_clear(nmax);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_cdiv_qr(void * arg, ulong count)
@@ -130,7 +130,7 @@ void sample_cdiv_qr(void * arg, ulong count)
fmpz_clear(b);
fmpz_clear(nmax);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_tdiv_qr(void * arg, ulong count)
@@ -170,7 +170,7 @@ void sample_tdiv_qr(void * arg, ulong count)
fmpz_clear(b);
fmpz_clear(nmax);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/fmpz/profile/p-fdiv_qr_preinvn.c b/src/fmpz/profile/p-fdiv_qr_preinvn.c
index 48b944f219..42b4727240 100644
--- a/src/fmpz/profile/p-fdiv_qr_preinvn.c
+++ b/src/fmpz/profile/p-fdiv_qr_preinvn.c
@@ -66,7 +66,7 @@ void sample(void * arg, ulong count)
fmpz_clear(b);
fmpz_clear(c);
fmpz_clear(r);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/fmpz/profile/p-fmma.c b/src/fmpz/profile/p-fmma.c
index 22f82e0d67..589bb3cc70 100644
--- a/src/fmpz/profile/p-fmma.c
+++ b/src/fmpz/profile/p-fmma.c
@@ -103,7 +103,7 @@ void sample_small(void * arg, ulong count)
fmpz_clear(c);
fmpz_clear(d);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_small_old(void * arg, ulong count)
@@ -136,7 +136,7 @@ void sample_small_old(void * arg, ulong count)
fmpz_clear(c);
fmpz_clear(d);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_small_zeros(void * arg, ulong count)
@@ -170,7 +170,7 @@ void sample_small_zeros(void * arg, ulong count)
fmpz_clear(c);
fmpz_clear(d);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_small_zeros_old(void * arg, ulong count)
@@ -204,7 +204,7 @@ void sample_small_zeros_old(void * arg, ulong count)
fmpz_clear(c);
fmpz_clear(d);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_big_zeros(void * arg, ulong count)
@@ -238,7 +238,7 @@ void sample_big_zeros(void * arg, ulong count)
fmpz_clear(c);
fmpz_clear(d);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_big_zeros_old(void * arg, ulong count)
@@ -272,7 +272,7 @@ void sample_big_zeros_old(void * arg, ulong count)
fmpz_clear(c);
fmpz_clear(d);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/fmpz/profile/p-gcd.c b/src/fmpz/profile/p-gcd.c
index 96b20257ee..59541c5543 100644
--- a/src/fmpz/profile/p-gcd.c
+++ b/src/fmpz/profile/p-gcd.c
@@ -105,7 +105,7 @@ sample_new(void * arg, ulong count)
fmpz_clear(a);
fmpz_clear(b);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void
@@ -135,7 +135,7 @@ sample_old(void * arg, ulong count)
fmpz_clear(a);
fmpz_clear(b);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int
diff --git a/src/fmpz/profile/p-gcd3.c b/src/fmpz/profile/p-gcd3.c
index bc2be2bf6f..707d610924 100644
--- a/src/fmpz/profile/p-gcd3.c
+++ b/src/fmpz/profile/p-gcd3.c
@@ -178,7 +178,7 @@ sample_new(void * arg, ulong count)
fmpz_clear(a);
fmpz_clear(b);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void
@@ -210,7 +210,7 @@ sample_old(void * arg, ulong count)
fmpz_clear(a);
fmpz_clear(b);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int
diff --git a/src/fmpz/profile/p-mul.c b/src/fmpz/profile/p-mul.c
index c58a6a5572..3e509dbf6d 100644
--- a/src/fmpz/profile/p-mul.c
+++ b/src/fmpz/profile/p-mul.c
@@ -77,7 +77,7 @@ sample_new(void * arg, ulong count)
_fmpz_vec_clear(res, ntests);
_fmpz_vec_clear(a, ntests);
_fmpz_vec_clear(b, ntests);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void
@@ -111,7 +111,7 @@ sample_old(void * arg, ulong count)
_fmpz_vec_clear(res, ntests);
_fmpz_vec_clear(a, ntests);
_fmpz_vec_clear(b, ntests);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
slong sizes[] = { 10, 30, 60, 62, 64, 66, 80, 128, 160, 256, 512, 1024, 4096, 0 };
diff --git a/src/fmpz/profile/p-mul_2exp.c b/src/fmpz/profile/p-mul_2exp.c
index 85eb30bf29..16c8c5a660 100644
--- a/src/fmpz/profile/p-mul_2exp.c
+++ b/src/fmpz/profile/p-mul_2exp.c
@@ -69,9 +69,9 @@ sample_new(void * arg, ulong count)
prof_stop();
}
- flint_rand_clear(state);
fmpz_clear(res);
fmpz_clear(a);
+ FLINT_TEST_CLEAR(state);
}
void
@@ -97,9 +97,9 @@ sample_old(void * arg, ulong count)
prof_stop();
}
- flint_rand_clear(state);
fmpz_clear(res);
fmpz_clear(a);
+ FLINT_TEST_CLEAR(state);
}
int
diff --git a/src/fmpz/profile/p-mul_ui.c b/src/fmpz/profile/p-mul_ui.c
index 03a02caa70..df1feb3afd 100644
--- a/src/fmpz/profile/p-mul_ui.c
+++ b/src/fmpz/profile/p-mul_ui.c
@@ -70,9 +70,9 @@ sample_new(void * arg, ulong count)
prof_stop();
}
- flint_rand_clear(state);
fmpz_clear(res);
fmpz_clear(a);
+ FLINT_TEST_CLEAR(state);
}
void
@@ -99,9 +99,9 @@ sample_old(void * arg, ulong count)
prof_stop();
}
- flint_rand_clear(state);
fmpz_clear(res);
fmpz_clear(a);
+ FLINT_TEST_CLEAR(state);
}
int
diff --git a/src/fmpz/profile/p-xgcd.c b/src/fmpz/profile/p-xgcd.c
index 5715ef73e5..1ecb552d09 100644
--- a/src/fmpz/profile/p-xgcd.c
+++ b/src/fmpz/profile/p-xgcd.c
@@ -44,7 +44,7 @@ void sample_xgcd_small(void * arg, ulong count)
fmpz_clear(b);
fmpz_clear(nmax);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_xgcd_mixed(void * arg, ulong count)
@@ -79,7 +79,7 @@ void sample_xgcd_mixed(void * arg, ulong count)
fmpz_clear(b);
fmpz_clear(nmax);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_xgcd_big(void * arg, ulong count)
@@ -114,7 +114,7 @@ void sample_xgcd_big(void * arg, ulong count)
fmpz_clear(b);
fmpz_clear(nmax);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_xgcd_canonical_bezout_small(void * arg, ulong count)
@@ -149,7 +149,7 @@ void sample_xgcd_canonical_bezout_small(void * arg, ulong count)
fmpz_clear(b);
fmpz_clear(nmax);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_xgcd_canonical_bezout_mixed(void * arg, ulong count)
@@ -184,7 +184,7 @@ void sample_xgcd_canonical_bezout_mixed(void * arg, ulong count)
fmpz_clear(b);
fmpz_clear(nmax);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
void sample_xgcd_canonical_bezout_big(void * arg, ulong count)
@@ -219,7 +219,7 @@ void sample_xgcd_canonical_bezout_big(void * arg, ulong count)
fmpz_clear(b);
fmpz_clear(nmax);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/fmpz_factor/profile/p-factor_pp1.c b/src/fmpz_factor/profile/p-factor_pp1.c
index 2ec6423cd1..bae6b4da1f 100644
--- a/src/fmpz_factor/profile/p-factor_pp1.c
+++ b/src/fmpz_factor/profile/p-factor_pp1.c
@@ -55,7 +55,7 @@ int main(void)
flint_printf("Factor not found!\n");
} while(1);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
fmpz_clear(n);
fmpz_clear(p);
diff --git a/src/fmpz_lll/profile/p-lll.c b/src/fmpz_lll/profile/p-lll.c
index 12bb97b204..54a1c5e7d4 100644
--- a/src/fmpz_lll/profile/p-lll.c
+++ b/src/fmpz_lll/profile/p-lll.c
@@ -82,7 +82,7 @@ sample(void *arg, ulong count)
fmpz_mat_clear(D);
fmpq_clear(delta);
fmpq_clear(eta);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int
diff --git a/src/fmpz_mat/profile/p-big_mul.c b/src/fmpz_mat/profile/p-big_mul.c
index 441cd9c605..6caf38b2a7 100644
--- a/src/fmpz_mat/profile/p-big_mul.c
+++ b/src/fmpz_mat/profile/p-big_mul.c
@@ -237,6 +237,6 @@ int main(void)
fmpz_mat_clear(C);
}
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fmpz_mat/profile/p-det.c b/src/fmpz_mat/profile/p-det.c
index 3dce95cf57..88de4f4b94 100644
--- a/src/fmpz_mat/profile/p-det.c
+++ b/src/fmpz_mat/profile/p-det.c
@@ -56,7 +56,7 @@ void sample(void * arg, ulong count)
fmpz_mat_clear(A);
fmpz_clear(d);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/fmpz_mat/profile/p-mul_blas_v_mul.c b/src/fmpz_mat/profile/p-mul_blas_v_mul.c
index f6332c2ce6..e8f2d6ea6f 100644
--- a/src/fmpz_mat/profile/p-mul_blas_v_mul.c
+++ b/src/fmpz_mat/profile/p-mul_blas_v_mul.c
@@ -93,7 +93,7 @@ int main(void)
fmpz_mat_clear(D);
}
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fmpz_mat/profile/p-mul_double_word.c b/src/fmpz_mat/profile/p-mul_double_word.c
index 6b5640e361..727421f0ac 100644
--- a/src/fmpz_mat/profile/p-mul_double_word.c
+++ b/src/fmpz_mat/profile/p-mul_double_word.c
@@ -98,6 +98,6 @@ int main(void)
fmpz_mat_clear(E);
}
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fmpz_mat/profile/p-mul_double_word_v_mul_multi_mod.c b/src/fmpz_mat/profile/p-mul_double_word_v_mul_multi_mod.c
index ba52b62961..ca42721b19 100644
--- a/src/fmpz_mat/profile/p-mul_double_word_v_mul_multi_mod.c
+++ b/src/fmpz_mat/profile/p-mul_double_word_v_mul_multi_mod.c
@@ -100,6 +100,6 @@ int main(void)
fmpz_mat_clear(D);
}
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fmpz_mat/profile/p-mul_multi_mod.c b/src/fmpz_mat/profile/p-mul_multi_mod.c
index b717067b2b..140f0a45eb 100644
--- a/src/fmpz_mat/profile/p-mul_multi_mod.c
+++ b/src/fmpz_mat/profile/p-mul_multi_mod.c
@@ -84,6 +84,6 @@ int main(void)
fmpz_mat_clear(E);
}
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fmpz_mat/profile/p-mul_small.c b/src/fmpz_mat/profile/p-mul_small.c
index 6ce5ea25fc..0e125ad457 100644
--- a/src/fmpz_mat/profile/p-mul_small.c
+++ b/src/fmpz_mat/profile/p-mul_small.c
@@ -164,6 +164,6 @@ int main(void)
fmpz_mat_clear(D);
}
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fmpz_mat/profile/p-mul_small_v_mul_multi_mod.c b/src/fmpz_mat/profile/p-mul_small_v_mul_multi_mod.c
index 4e1d044e3b..63e8e7d23e 100644
--- a/src/fmpz_mat/profile/p-mul_small_v_mul_multi_mod.c
+++ b/src/fmpz_mat/profile/p-mul_small_v_mul_multi_mod.c
@@ -96,6 +96,6 @@ int main(void)
fmpz_mat_clear(D);
}
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fmpz_mat/profile/p-sqr.c b/src/fmpz_mat/profile/p-sqr.c
index 0db5ee5508..4ca1ea21af 100644
--- a/src/fmpz_mat/profile/p-sqr.c
+++ b/src/fmpz_mat/profile/p-sqr.c
@@ -57,7 +57,7 @@ void sample(void * arg, ulong count)
fmpz_mat_clear(B);
fmpz_mat_clear(C);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/fmpz_mod_poly/profile/p-gcd.c b/src/fmpz_mod_poly/profile/p-gcd.c
index a868544e16..7a550c1cd0 100644
--- a/src/fmpz_mod_poly/profile/p-gcd.c
+++ b/src/fmpz_mod_poly/profile/p-gcd.c
@@ -227,7 +227,7 @@ main(void)
}
}
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fmpz_mod_poly/profile/p-invert.c b/src/fmpz_mod_poly/profile/p-invert.c
index 92bc091a55..55d8faecb1 100644
--- a/src/fmpz_mod_poly/profile/p-invert.c
+++ b/src/fmpz_mod_poly/profile/p-invert.c
@@ -75,7 +75,7 @@ main(void)
fmpz_clear(one);
fmpz_mod_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fmpz_mod_poly/profile/p-minpoly.c b/src/fmpz_mod_poly/profile/p-minpoly.c
index 05a8a14fc2..b25885eeb3 100644
--- a/src/fmpz_mod_poly/profile/p-minpoly.c
+++ b/src/fmpz_mod_poly/profile/p-minpoly.c
@@ -156,7 +156,7 @@ int main(void)
for (i=0; i s[1];
}
diff --git a/src/fq_poly_templates/profile/p-mullow.c b/src/fq_poly_templates/profile/p-mullow.c
index d5259c2541..1bad7055d4 100644
--- a/src/fq_poly_templates/profile/p-mullow.c
+++ b/src/fq_poly_templates/profile/p-mullow.c
@@ -113,7 +113,7 @@ main(int argc, char** argv)
fmpz_clear(p);
fmpz_clear(temp);
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fq_poly_templates/profile/p-sqr.c b/src/fq_poly_templates/profile/p-sqr.c
index 26f4200939..a301956214 100644
--- a/src/fq_poly_templates/profile/p-sqr.c
+++ b/src/fq_poly_templates/profile/p-sqr.c
@@ -108,7 +108,7 @@ main(int argc, char** argv)
fmpz_clear(p);
fmpz_clear(temp);
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fq_zech_poly/profile/p-factor_kaltofen_shoup_vs_fq_nmod_poly.c b/src/fq_zech_poly/profile/p-factor_kaltofen_shoup_vs_fq_nmod_poly.c
index a011e7d8b2..012ac9e619 100644
--- a/src/fq_zech_poly/profile/p-factor_kaltofen_shoup_vs_fq_nmod_poly.c
+++ b/src/fq_zech_poly/profile/p-factor_kaltofen_shoup_vs_fq_nmod_poly.c
@@ -136,7 +136,7 @@ main(int argc, char** argv)
fq_nmod_ctx_clear(ctxn);
fmpz_clear(temp);
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/fq_zech_poly/profile/p-factor_vs_fq_nmod.c b/src/fq_zech_poly/profile/p-factor_vs_fq_nmod.c
index 1b6b5c662c..02176ba1fd 100644
--- a/src/fq_zech_poly/profile/p-factor_vs_fq_nmod.c
+++ b/src/fq_zech_poly/profile/p-factor_vs_fq_nmod.c
@@ -128,7 +128,7 @@ main(int argc, char** argv)
fq_nmod_ctx_clear(ctx);
fq_zech_ctx_clear(ctx_zech);
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/mpn_extras/profile/p-mulmod_preinvn.c b/src/mpn_extras/profile/p-mulmod_preinvn.c
index 73189a53e4..c21d0145d9 100644
--- a/src/mpn_extras/profile/p-mulmod_preinvn.c
+++ b/src/mpn_extras/profile/p-mulmod_preinvn.c
@@ -110,7 +110,7 @@ void sample(void * arg, ulong count)
/* don't init r2 */
gmp_randclear(st);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/nmod_poly/profile/p-evaluate_mat.c b/src/nmod_poly/profile/p-evaluate_mat.c
index 13a4832cbe..54ff485035 100644
--- a/src/nmod_poly/profile/p-evaluate_mat.c
+++ b/src/nmod_poly/profile/p-evaluate_mat.c
@@ -79,6 +79,6 @@ main(void)
nmod_mat_clear(C);
}
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/nmod_poly/profile/p-gcd.c b/src/nmod_poly/profile/p-gcd.c
index 2e2931e782..94da45ef53 100644
--- a/src/nmod_poly/profile/p-gcd.c
+++ b/src/nmod_poly/profile/p-gcd.c
@@ -126,6 +126,6 @@ int main(void)
}
flint_printf("]\n");
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/nmod_poly/profile/p-mul.c b/src/nmod_poly/profile/p-mul.c
index 18ddfd650c..3d46b5d4c0 100644
--- a/src/nmod_poly/profile/p-mul.c
+++ b/src/nmod_poly/profile/p-mul.c
@@ -64,7 +64,7 @@ void sample(void * arg, ulong count)
nmod_poly_clear(a);
nmod_poly_clear(b);
nmod_poly_clear(c);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/nmod_poly/profile/p-mulmod.c b/src/nmod_poly/profile/p-mulmod.c
index d5ae10189b..0694535b4c 100644
--- a/src/nmod_poly/profile/p-mulmod.c
+++ b/src/nmod_poly/profile/p-mulmod.c
@@ -89,7 +89,7 @@ void sample(void * arg, ulong count)
nmod_poly_clear(c);
nmod_poly_clear(d);
nmod_poly_clear(dinv);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/nmod_poly_factor/profile/p-factor.c b/src/nmod_poly_factor/profile/p-factor.c
index ec3b393d7c..b1feeadfbf 100644
--- a/src/nmod_poly_factor/profile/p-factor.c
+++ b/src/nmod_poly_factor/profile/p-factor.c
@@ -330,6 +330,6 @@ int main(void)
}
}
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/nmod_vec/profile/p-add.c b/src/nmod_vec/profile/p-add.c
index a3540c4264..a8e27dbd18 100644
--- a/src/nmod_vec/profile/p-add.c
+++ b/src/nmod_vec/profile/p-add.c
@@ -96,7 +96,7 @@ void sample(void * arg, ulong unused)
_nmod_vec_clear(vec2);
}
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int main(int argc, char ** argv)
diff --git a/src/nmod_vec/profile/p-add_sub_neg.c b/src/nmod_vec/profile/p-add_sub_neg.c
index 61ff9bc225..b3f3b72f4b 100644
--- a/src/nmod_vec/profile/p-add_sub_neg.c
+++ b/src/nmod_vec/profile/p-add_sub_neg.c
@@ -78,9 +78,9 @@ void sample(void * arg, ulong count)
break;
}
- flint_rand_clear(state);
_nmod_vec_clear(vec1);
_nmod_vec_clear(vec2);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/nmod_vec/profile/p-mul.c b/src/nmod_vec/profile/p-mul.c
index 854a173094..4db5560e84 100644
--- a/src/nmod_vec/profile/p-mul.c
+++ b/src/nmod_vec/profile/p-mul.c
@@ -66,9 +66,9 @@ void sample(void * arg, ulong count)
break;
}
- flint_rand_clear(state);
_nmod_vec_clear(vec1);
_nmod_vec_clear(vec2);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/nmod_vec/profile/p-reduce.c b/src/nmod_vec/profile/p-reduce.c
index 617a846dce..82f80ce981 100644
--- a/src/nmod_vec/profile/p-reduce.c
+++ b/src/nmod_vec/profile/p-reduce.c
@@ -46,9 +46,9 @@ void sample(void * arg, ulong count)
}
prof_stop();
- flint_rand_clear(state);
_nmod_vec_clear(vec);
_nmod_vec_clear(vec2);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/nmod_vec/profile/p-scalar_addmul.c b/src/nmod_vec/profile/p-scalar_addmul.c
index dbf67f923f..ec84119e1d 100644
--- a/src/nmod_vec/profile/p-scalar_addmul.c
+++ b/src/nmod_vec/profile/p-scalar_addmul.c
@@ -51,9 +51,9 @@ void sample(void * arg, ulong count)
prof_stop();
}
- flint_rand_clear(state);
_nmod_vec_clear(vec);
_nmod_vec_clear(vec2);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/nmod_vec/profile/p-scalar_mul.c b/src/nmod_vec/profile/p-scalar_mul.c
index f6bea5bcbe..7a0bf052ff 100644
--- a/src/nmod_vec/profile/p-scalar_mul.c
+++ b/src/nmod_vec/profile/p-scalar_mul.c
@@ -49,9 +49,9 @@ void sample(void * arg, ulong count)
prof_stop();
}
- flint_rand_clear(state);
_nmod_vec_clear(vec);
_nmod_vec_clear(vec2);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/padic/profile/p-exp_balanced_2.c b/src/padic/profile/p-exp_balanced_2.c
index 949a1336eb..f4b7a2ca0e 100644
--- a/src/padic/profile/p-exp_balanced_2.c
+++ b/src/padic/profile/p-exp_balanced_2.c
@@ -96,7 +96,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
padic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/padic/profile/p-exp_balanced_p.c b/src/padic/profile/p-exp_balanced_p.c
index 03fc023d78..6971d0db31 100644
--- a/src/padic/profile/p-exp_balanced_p.c
+++ b/src/padic/profile/p-exp_balanced_p.c
@@ -96,7 +96,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
padic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/padic/profile/p-exp_rectangular.c b/src/padic/profile/p-exp_rectangular.c
index f8e19707ad..239cda494b 100644
--- a/src/padic/profile/p-exp_rectangular.c
+++ b/src/padic/profile/p-exp_rectangular.c
@@ -96,7 +96,7 @@ for (l = 0; l < FLINT_MIN(17, len); l++)
fmpz_clear(p);
padic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/padic/profile/p-inv.c b/src/padic/profile/p-inv.c
index 63760017d6..3ac1f49104 100644
--- a/src/padic/profile/p-inv.c
+++ b/src/padic/profile/p-inv.c
@@ -93,7 +93,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
padic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/padic/profile/p-log_balanced.c b/src/padic/profile/p-log_balanced.c
index 6a6db1647c..db79b2e84e 100644
--- a/src/padic/profile/p-log_balanced.c
+++ b/src/padic/profile/p-log_balanced.c
@@ -107,7 +107,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
padic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/padic/profile/p-log_rectangular.c b/src/padic/profile/p-log_rectangular.c
index 572fc81e78..cc32080802 100644
--- a/src/padic/profile/p-log_rectangular.c
+++ b/src/padic/profile/p-log_rectangular.c
@@ -107,7 +107,7 @@ for (l = 0; l < FLINT_MIN(16, len); l++)
fmpz_clear(p);
padic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/padic/profile/p-mul.c b/src/padic/profile/p-mul.c
index 5b66c975fe..7b6896589e 100644
--- a/src/padic/profile/p-mul.c
+++ b/src/padic/profile/p-mul.c
@@ -97,7 +97,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
padic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/padic/profile/p-sqrt.c b/src/padic/profile/p-sqrt.c
index 3888c668e3..75dd9928e7 100644
--- a/src/padic/profile/p-sqrt.c
+++ b/src/padic/profile/p-sqrt.c
@@ -97,7 +97,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
padic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/padic/profile/p-teichmuller.c b/src/padic/profile/p-teichmuller.c
index 5699bd82a3..5a00b12e7d 100644
--- a/src/padic/profile/p-teichmuller.c
+++ b/src/padic/profile/p-teichmuller.c
@@ -85,7 +85,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
padic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/profile/p-invert_limb.c b/src/profile/p-invert_limb.c
index c72d2eef0e..c51254c4ed 100644
--- a/src/profile/p-invert_limb.c
+++ b/src/profile/p-invert_limb.c
@@ -60,8 +60,8 @@ void sample(void * arg, ulong count)
if (sum == 0) flint_printf("\r");
}
- flint_rand_clear(state);
flint_free(array);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/profile/p-udiv_qrnnd.c b/src/profile/p-udiv_qrnnd.c
index a2ac9c2e02..f16661a11a 100644
--- a/src/profile/p-udiv_qrnnd.c
+++ b/src/profile/p-udiv_qrnnd.c
@@ -45,8 +45,8 @@ void sample(void * arg, ulong count)
if (array[j] == 0) flint_printf("\r");
}
- flint_rand_clear(state);
flint_free(array);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/profile/p-udiv_qrnnd_preinv.c b/src/profile/p-udiv_qrnnd_preinv.c
index e08b4f370c..01f9a42006 100644
--- a/src/profile/p-udiv_qrnnd_preinv.c
+++ b/src/profile/p-udiv_qrnnd_preinv.c
@@ -48,8 +48,8 @@ void sample(void * arg, ulong count)
if (q + r == 0) flint_printf("\r");
}
- flint_rand_clear(state);
flint_free(array);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/qadic/profile/p-exp_balanced.c b/src/qadic/profile/p-exp_balanced.c
index f6256aea0c..2299c7246d 100644
--- a/src/qadic/profile/p-exp_balanced.c
+++ b/src/qadic/profile/p-exp_balanced.c
@@ -104,7 +104,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/qadic/profile/p-exp_rectangular.c b/src/qadic/profile/p-exp_rectangular.c
index c0a4d06d30..1c85a01db7 100644
--- a/src/qadic/profile/p-exp_rectangular.c
+++ b/src/qadic/profile/p-exp_rectangular.c
@@ -104,7 +104,7 @@ for (l = 0; l < FLINT_MIN(16, len); l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/qadic/profile/p-frobenius.c b/src/qadic/profile/p-frobenius.c
index 379702e8fb..fb499c62fb 100644
--- a/src/qadic/profile/p-frobenius.c
+++ b/src/qadic/profile/p-frobenius.c
@@ -104,7 +104,7 @@ for (l = 0; l < FLINT_MIN(16, len); l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/qadic/profile/p-inv.c b/src/qadic/profile/p-inv.c
index 6c48981f22..db3ab81ba7 100644
--- a/src/qadic/profile/p-inv.c
+++ b/src/qadic/profile/p-inv.c
@@ -104,7 +104,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/qadic/profile/p-log_balanced.c b/src/qadic/profile/p-log_balanced.c
index 39550124e4..1922f89d5b 100644
--- a/src/qadic/profile/p-log_balanced.c
+++ b/src/qadic/profile/p-log_balanced.c
@@ -107,7 +107,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/qadic/profile/p-log_rectangular.c b/src/qadic/profile/p-log_rectangular.c
index 2e30686ff8..df6355c919 100644
--- a/src/qadic/profile/p-log_rectangular.c
+++ b/src/qadic/profile/p-log_rectangular.c
@@ -107,7 +107,7 @@ for (l = 0; l < FLINT_MIN(16, len); l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/qadic/profile/p-mul.c b/src/qadic/profile/p-mul.c
index 67e0880d67..b927ec7f0e 100644
--- a/src/qadic/profile/p-mul.c
+++ b/src/qadic/profile/p-mul.c
@@ -118,7 +118,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/qadic/profile/p-norm_analytic.c b/src/qadic/profile/p-norm_analytic.c
index 9ef1186a72..e1e7400cc9 100644
--- a/src/qadic/profile/p-norm_analytic.c
+++ b/src/qadic/profile/p-norm_analytic.c
@@ -108,7 +108,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/qadic/profile/p-norm_resultant.c b/src/qadic/profile/p-norm_resultant.c
index 224d76ccb7..380cfbee60 100644
--- a/src/qadic/profile/p-norm_resultant.c
+++ b/src/qadic/profile/p-norm_resultant.c
@@ -108,7 +108,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/qadic/profile/p-sqrt.c b/src/qadic/profile/p-sqrt.c
index 2d1081195b..1ea54558e8 100644
--- a/src/qadic/profile/p-sqrt.c
+++ b/src/qadic/profile/p-sqrt.c
@@ -115,7 +115,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/qadic/profile/p-teichmuller.c b/src/qadic/profile/p-teichmuller.c
index f6eee2ff35..065165a568 100644
--- a/src/qadic/profile/p-teichmuller.c
+++ b/src/qadic/profile/p-teichmuller.c
@@ -96,7 +96,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/qadic/profile/p-trace.c b/src/qadic/profile/p-trace.c
index c82ea04078..214146112f 100644
--- a/src/qadic/profile/p-trace.c
+++ b/src/qadic/profile/p-trace.c
@@ -105,7 +105,7 @@ for (l = 0; l < len; l++)
fmpz_clear(p);
qadic_ctx_clear(ctx);
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
flint_printf("Output as a list:\n");
diff --git a/src/test_helpers.h b/src/test_helpers.h
index d21a7a6632..e0fe42e71e 100644
--- a/src/test_helpers.h
+++ b/src/test_helpers.h
@@ -101,7 +101,7 @@ int TEMPLATE5(test, T, label1, T, label2)(void) \
#define TEST_FUNCTION_END(state) \
_end_time_ = clock(); \
- FLINT_TEST_CLEANUP(state); \
+ FLINT_TEST_CLEAR(state); \
if (_label_len_ < 48) \
printf("%.48s%6.2f (" _GREEN_B "PASS" _RESET ")\n", \
_test_io_string_, \
@@ -115,7 +115,7 @@ int TEMPLATE5(test, T, label1, T, label2)(void) \
#define TEST_GR_FUNCTION_END(state, count_success, count_domain, count_unable) \
_end_time_ = clock(); \
- FLINT_TEST_CLEANUP(state); \
+ FLINT_TEST_CLEAR(state); \
printf("%.*s\n " \
"%5" _WORD_FMT "d success, " \
"%5" _WORD_FMT "d domain, " \
@@ -129,7 +129,7 @@ int TEMPLATE5(test, T, label1, T, label2)(void) \
}
#define TEST_FUNCTION_END_SKIPPED(state) \
- FLINT_TEST_CLEANUP(state); \
+ FLINT_TEST_CLEAR(state); \
if (_label_len_ < 54) \
printf("%.*s(" _YELLOW_B "SKIPPED" _RESET ")\n", \
54, _test_io_string_); \
diff --git a/src/ulong_extras/profile/p-factor.c b/src/ulong_extras/profile/p-factor.c
index 35a83f7aa9..f5df258817 100644
--- a/src/ulong_extras/profile/p-factor.c
+++ b/src/ulong_extras/profile/p-factor.c
@@ -82,7 +82,7 @@ int main(void)
i, max/(double)ITERS);
}
- flint_rand_clear(state);
flint_free(params.composites);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/ulong_extras/profile/p-factor_pp1.c b/src/ulong_extras/profile/p-factor_pp1.c
index 6de7f89737..10483afbe5 100644
--- a/src/ulong_extras/profile/p-factor_pp1.c
+++ b/src/ulong_extras/profile/p-factor_pp1.c
@@ -80,7 +80,7 @@ main(int argc, char** argv)
}
}
- FLINT_TEST_CLEANUP(state);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/ulong_extras/profile/p-gcd.c b/src/ulong_extras/profile/p-gcd.c
index b1f7cbf2ed..b1be37dbee 100644
--- a/src/ulong_extras/profile/p-gcd.c
+++ b/src/ulong_extras/profile/p-gcd.c
@@ -73,8 +73,8 @@ int main(void)
i, i, max/(double)ITERS);
}
- flint_rand_clear(state);
flint_free(params.rnums1);
flint_free(params.rnums2);
+ FLINT_TEST_CLEAR(state);
return 0;
}
diff --git a/src/ulong_extras/profile/p-is_probabprime_BPSW.c b/src/ulong_extras/profile/p-is_probabprime_BPSW.c
index 681ca1ca67..ec5f1a4c82 100644
--- a/src/ulong_extras/profile/p-is_probabprime_BPSW.c
+++ b/src/ulong_extras/profile/p-is_probabprime_BPSW.c
@@ -41,7 +41,7 @@ void sample(void * arg, ulong count)
if (!res) flint_printf("Error\n");
}
- flint_rand_clear(state);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/ulong_extras/profile/p-lll_mod_preinv.c b/src/ulong_extras/profile/p-lll_mod_preinv.c
index b23c0279c7..9335a9fed9 100644
--- a/src/ulong_extras/profile/p-lll_mod_preinv.c
+++ b/src/ulong_extras/profile/p-lll_mod_preinv.c
@@ -64,9 +64,9 @@ void sample(void * arg, ulong count)
if (r == UWORD(9879875897)) flint_abort();
- flint_rand_clear(state);
flint_free(arr);
flint_free(arr2);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/ulong_extras/profile/p-mod2_precomp.c b/src/ulong_extras/profile/p-mod2_precomp.c
index 2158ded1a5..818b478dff 100644
--- a/src/ulong_extras/profile/p-mod2_precomp.c
+++ b/src/ulong_extras/profile/p-mod2_precomp.c
@@ -44,8 +44,8 @@ void sample(void * arg, ulong count)
if (r == 0) flint_abort();
- flint_rand_clear(state);
flint_free(array);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/ulong_extras/profile/p-mod2_preinv.c b/src/ulong_extras/profile/p-mod2_preinv.c
index 301f57bc36..208df78e05 100644
--- a/src/ulong_extras/profile/p-mod2_preinv.c
+++ b/src/ulong_extras/profile/p-mod2_preinv.c
@@ -106,8 +106,8 @@ void sample(void * arg, ulong count)
if (r == UWORD(9879875897)) flint_abort();
- flint_rand_clear(state);
flint_free(arr);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/ulong_extras/profile/p-mod_precomp.c b/src/ulong_extras/profile/p-mod_precomp.c
index 7c05ad1264..5d589cdd24 100644
--- a/src/ulong_extras/profile/p-mod_precomp.c
+++ b/src/ulong_extras/profile/p-mod_precomp.c
@@ -42,8 +42,8 @@ void sample(void * arg, ulong count)
prof_stop();
}
- flint_rand_clear(state);
flint_free(array);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/ulong_extras/profile/p-mulmod2_preinv.c b/src/ulong_extras/profile/p-mulmod2_preinv.c
index 473db89e4b..1c2cc66701 100644
--- a/src/ulong_extras/profile/p-mulmod2_preinv.c
+++ b/src/ulong_extras/profile/p-mulmod2_preinv.c
@@ -41,8 +41,8 @@ void sample(void * arg, ulong count)
prof_stop();
}
- flint_rand_clear(state);
flint_free(array);
+ FLINT_TEST_CLEAR(state);
}
int main(void)
diff --git a/src/ulong_extras/profile/p-mulmod_precomp.c b/src/ulong_extras/profile/p-mulmod_precomp.c
index 6918fe23dc..092587307d 100644
--- a/src/ulong_extras/profile/p-mulmod_precomp.c
+++ b/src/ulong_extras/profile/p-mulmod_precomp.c
@@ -42,8 +42,8 @@ void sample(void * arg, ulong count)
prof_stop();
}
- flint_rand_clear(state);
flint_free(array);
+ FLINT_TEST_CLEAR(state);
}
int main(void)