diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-05-18 15:57:10 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-05-18 15:57:10 +0000 |
commit | b88c50d268e5e11da7c3363d421246dbb14bc180 (patch) | |
tree | 205a24fbfc48e8d135ec15b617d85335a673ad58 /sum.c | |
parent | e1bd5aef35c4619b29cf017d8128525d23bbdb56 (diff) | |
download | mpfr-b88c50d268e5e11da7c3363d421246dbb14bc180.tar.gz |
Replace TMP_ALLOC by MPFR_TMP_ALLOC
Replace TMP_DECL by MPFR_TMP_DECL
Replace TMP_MARK by MPFR_TMP_MARK
Replace TMP_FREE by MPFR_TMP_FREE
Add support for GMP's TMP_SALLOC.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3593 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sum.c')
-rw-r--r-- | sum.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -35,9 +35,9 @@ void mpfr_count_sort (mpfr_ptr const tab[], unsigned long n, unsigned long *account; unsigned long exp_num; unsigned long target_rank; - TMP_DECL(marker); + MPFR_TMP_DECL(marker); - TMP_MARK(marker); + MPFR_TMP_MARK(marker); min = max = MPFR_GET_EXP(tab[0]); for (i = 1; i < n; i++) @@ -55,7 +55,7 @@ void mpfr_count_sort (mpfr_ptr const tab[], unsigned long n, heap_sort_exp_clean (tab, n, perm); return; } - account = (unsigned long *) TMP_ALLOC(exp_num * sizeof(*account)); + account = (unsigned long *) MPFR_TMP_ALLOC(exp_num * sizeof(*account)); for (i = 0; i < exp_num; i++) account[i] = 0; for (i = 0; i < n; i++) @@ -68,7 +68,7 @@ void mpfr_count_sort (mpfr_ptr const tab[], unsigned long n, perm[target_rank] = tab[i]; } - TMP_FREE(marker); + MPFR_TMP_FREE(marker); } /* Performs a heap sort of the entries */ @@ -200,9 +200,9 @@ int mpfr_sum (mpfr_ptr ret, mpfr_ptr const tab[], unsigned long n, mpfr_t cur_sum; MPFR_ZIV_DECL (loop); MPFR_SAVE_EXPO_DECL (expo); - TMP_DECL(marker); + MPFR_TMP_DECL(marker); - TMP_MARK(marker); + MPFR_TMP_MARK(marker); if (MPFR_UNLIKELY (n == 0)) { MPFR_SET_ZERO (ret); MPFR_SET_POS (ret); @@ -210,7 +210,7 @@ int mpfr_sum (mpfr_ptr ret, mpfr_ptr const tab[], unsigned long n, } /* Sort */ - perm = (mpfr_srcptr *) TMP_ALLOC(n * sizeof(mpfr_srcptr)); + perm = (mpfr_srcptr *) MPFR_TMP_ALLOC(n * sizeof(mpfr_srcptr)); mpfr_count_sort (tab, n, perm); /* Initial precision */ @@ -237,7 +237,7 @@ int mpfr_sum (mpfr_ptr ret, mpfr_ptr const tab[], unsigned long n, error_trap |= mpfr_set (ret, cur_sum, rnd); mpfr_clear (cur_sum); - TMP_FREE(marker); + MPFR_TMP_FREE(marker); MPFR_SAVE_EXPO_FREE (expo); error_trap |= mpfr_check_range (ret, 0, rnd); |