[Gmp-commit] /var/hg/gmp: mpz/?or.c: Remove duplicated branches, hinted now
mercurial at gmplib.org
mercurial at gmplib.org
Fri Nov 6 07:20:44 UTC 2015
details: /var/hg/gmp/rev/2234d8b30f5b
changeset: 16942:2234d8b30f5b
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Fri Nov 06 08:20:31 2015 +0100
description:
mpz/?or.c: Remove duplicated branches, hinted now
diffstat:
mpz/ior.c | 12 ++++++------
mpz/xor.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diffs (78 lines):
diff -r ef7f8ee4ab39 -r 2234d8b30f5b mpz/ior.c
--- a/mpz/ior.c Thu Nov 05 12:18:16 2015 +0100
+++ b/mpz/ior.c Fri Nov 06 08:20:31 2015 +0100
@@ -56,9 +56,9 @@
{
if (op1_size >= op2_size)
{
- if (ALLOC(res) < op1_size)
+ if (UNLIKELY (ALLOC(res) < op1_size))
{
- res_ptr = MPZ_REALLOC (res, op1_size);
+ res_ptr = (mp_ptr) _mpz_realloc (res, op1_size);
/* No overlapping possible: op1_ptr = PTR(op1); */
op2_ptr = PTR(op2);
}
@@ -72,9 +72,9 @@
}
else
{
- if (ALLOC(res) < op2_size)
+ if (UNLIKELY (ALLOC(res) < op2_size))
{
- res_ptr = MPZ_REALLOC (res, op2_size);
+ res_ptr = (mp_ptr) _mpz_realloc (res, op2_size);
op1_ptr = PTR(op1);
/* No overlapping possible: op2_ptr = PTR(op2); */
}
@@ -176,9 +176,9 @@
op2_ptr = opx;
op2_size -= op2_ptr[op2_size - 1] == 0;
- if (ALLOC(res) < res_alloc)
+ if (UNLIKELY (ALLOC(res) < res_alloc))
{
- res_ptr = MPZ_REALLOC (res, res_alloc);
+ res_ptr = (mp_ptr) _mpz_realloc (res, res_alloc);
op1_ptr = PTR(op1);
/* op2_ptr points to temporary space. */
}
diff -r ef7f8ee4ab39 -r 2234d8b30f5b mpz/xor.c
--- a/mpz/xor.c Thu Nov 05 12:18:16 2015 +0100
+++ b/mpz/xor.c Fri Nov 06 08:20:31 2015 +0100
@@ -55,9 +55,9 @@
{
if (op1_size >= op2_size)
{
- if (ALLOC(res) < op1_size)
+ if (UNLIKELY (ALLOC(res) < op1_size))
{
- res_ptr = MPZ_REALLOC (res, op1_size);
+ res_ptr = (mp_ptr) _mpz_realloc (res, op1_size);
/* No overlapping possible: op1_ptr = PTR(op1); */
op2_ptr = PTR(op2);
}
@@ -71,9 +71,9 @@
}
else
{
- if (ALLOC(res) < op2_size)
+ if (UNLIKELY (ALLOC(res) < op2_size))
{
- res_ptr = MPZ_REALLOC (res, op2_size);
+ res_ptr = (mp_ptr) _mpz_realloc (res, op2_size);
op1_ptr = PTR(op1);
/* No overlapping possible: op2_ptr = PTR(op2); */
}
@@ -162,9 +162,9 @@
op2_ptr = opx;
res_alloc = MAX (op1_size, op2_size) + 1;
- if (ALLOC(res) < res_alloc)
+ if (UNLIKELY (ALLOC(res) < res_alloc))
{
- res_ptr = MPZ_REALLOC (res, res_alloc);
+ res_ptr = (mp_ptr) _mpz_realloc (res, res_alloc);
op1_ptr = PTR(op1);
/* op2_ptr points to temporary space. */
}
More information about the gmp-commit
mailing list