Skip to content

Commit fb616ee

Browse files
committed
Change gmp_ui/gmp_si types to mpir_ui/mpir_si
1 parent f8048b4 commit fb616ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+890
-890
lines changed

build.vc10/mpir-tests.sln

Lines changed: 229 additions & 229 deletions
Large diffs are not rendered by default.

build.vc10/mpir.sln

Lines changed: 95 additions & 95 deletions
Large diffs are not rendered by default.

fft/mulmod_2expp1.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,33 +178,33 @@ void fft_mulmod_2expp1(mp_ptr r1, mp_srcptr i1, mp_srcptr i2,
178178
TMP_FREE;
179179
}
180180

181-
gmp_si fft_adjust_limbs(mp_size_t limbs)
181+
mpir_si fft_adjust_limbs(mp_size_t limbs)
182182
{
183183
mp_size_t bits1 = limbs*GMP_LIMB_BITS, bits2;
184184
mp_size_t depth = 1, limbs2, depth1 = 1, depth2 = 1, adj;
185185
mp_size_t off1, off2;
186186

187187
if (limbs <= FFT_MULMOD_2EXPP1_CUTOFF) return limbs;
188188

189-
while ((((gmp_ui)1)<<depth)<limbs) depth++;
190-
limbs2 = (((gmp_si)1)<<depth); /* within a factor of 2 of limbs */
189+
while ((((mpir_ui)1)<<depth)<limbs) depth++;
190+
limbs2 = (((mpir_si)1)<<depth); /* within a factor of 2 of limbs */
191191
bits2 = limbs2*GMP_LIMB_BITS;
192192

193-
while ((((gmp_ui)1)<<depth1) < bits1) depth1++;
193+
while ((((mpir_ui)1)<<depth1) < bits1) depth1++;
194194
if (depth1 < 12) off1 = mulmod_2expp1_table_n[0];
195195
else off1 = mulmod_2expp1_table_n[MIN(depth1, FFT_N_NUM + 11) - 12];
196196
depth1 = depth1/2 - off1;
197197

198-
while ((((gmp_ui)1)<<depth2) < bits2) depth2++;
198+
while ((((mpir_ui)1)<<depth2) < bits2) depth2++;
199199
if (depth2 < 12) off2 = mulmod_2expp1_table_n[0];
200200
else off2 = mulmod_2expp1_table_n[MIN(depth2, FFT_N_NUM + 11) - 12];
201201
depth2 = depth2/2 - off2;
202202

203203
depth1 = MAX(depth1, depth2);
204-
adj = (((gmp_si)1)<<(depth1 + 1));
204+
adj = (((mpir_si)1)<<(depth1 + 1));
205205
limbs2 = adj*((limbs + adj - 1)/adj); /* round up number of limbs */
206206
bits1 = limbs2*GMP_LIMB_BITS;
207-
bits2 = (((gmp_si)1)<<(depth1*2));
207+
bits2 = (((mpir_si)1)<<(depth1*2));
208208
bits1 = bits2*((bits1 + bits2 - 1)/bits2); /* round up bits */
209209
limbs = bits1/GMP_LIMB_BITS;
210210

gmp-h.in

Lines changed: 93 additions & 93 deletions
Large diffs are not rendered by default.

gmp-impl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ void __gmpz_aorsmul_1 _PROTO ((REGPARM_3_1 (mpz_ptr w, mpz_srcptr u, mp_limb_t v
842842
#define mpz_aorsmul_1(w,u,v,sub) __gmpz_aorsmul_1 (REGPARM_3_1 (w, u, v, sub))
843843

844844
#define mpz_n_pow_ui __gmpz_n_pow_ui
845-
void mpz_n_pow_ui _PROTO ((mpz_ptr, mp_srcptr, mp_size_t, gmp_ui));
845+
void mpz_n_pow_ui _PROTO ((mpz_ptr, mp_srcptr, mp_size_t, mpir_ui));
846846

847847

848848
#define mpn_add_nc __MPN(add_nc)
@@ -955,7 +955,7 @@ __GMP_DECLSPEC mp_limb_t mpn_divrem_1c __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcpt
955955
__GMP_DECLSPEC void mpn_dump __GMP_PROTO ((mp_srcptr, mp_size_t));
956956

957957
#define mpn_fib2_ui __MPN(fib2_ui)
958-
mp_size_t mpn_fib2_ui _PROTO ((mp_ptr, mp_ptr, gmp_ui));
958+
mp_size_t mpn_fib2_ui _PROTO ((mp_ptr, mp_ptr, mpir_ui));
959959

960960
/* Remap names of internal mpn functions. */
961961
#define __clz_tab __MPN(clz_tab)
@@ -1193,15 +1193,15 @@ __GMP_DECLSPEC void fft_naive_convolution_1 __GMP_PROTO ((mp_ptr r, mp_srcptr ii
11931193
mp_srcptr jj, mp_size_t m));
11941194

11951195
#define mpn_mulmod_2expp1_basecase __MPN(mulmod_2expp1_basecase)
1196-
__GMP_DECLSPEC int mpn_mulmod_2expp1_basecase __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, int, gmp_ui, mp_ptr));
1196+
__GMP_DECLSPEC int mpn_mulmod_2expp1_basecase __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, int, mpir_ui, mp_ptr));
11971197

11981198
typedef __gmp_randstate_struct *gmp_randstate_ptr;
11991199
typedef const __gmp_randstate_struct *gmp_randstate_srcptr;
12001200

12011201
/* Pseudo-random number generator function pointers structure. */
12021202
typedef struct {
12031203
void (*randseed_fn) __GMP_PROTO ((gmp_randstate_t rstate, mpz_srcptr seed));
1204-
void (*randget_fn) __GMP_PROTO ((gmp_randstate_t rstate, mp_ptr dest, gmp_ui nbits));
1204+
void (*randget_fn) __GMP_PROTO ((gmp_randstate_t rstate, mp_ptr dest, mpir_ui nbits));
12051205
void (*randclear_fn) __GMP_PROTO ((gmp_randstate_t rstate));
12061206
void (*randiset_fn) __GMP_PROTO ((gmp_randstate_ptr, gmp_randstate_srcptr));
12071207
} gmp_randfnptr_t;

mpf/add_ui.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ MA 02110-1301, USA. */
2323
#include "gmp-impl.h"
2424

2525
void
26-
mpf_add_ui (mpf_ptr sum, mpf_srcptr u, gmp_ui v)
26+
mpf_add_ui (mpf_ptr sum, mpf_srcptr u, mpir_ui v)
2727
{
2828
mp_srcptr up = u->_mp_d;
2929
mp_ptr sump = sum->_mp_d;

mpf/cmp_si.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ MA 02110-1301, USA. */
2424
#include "gmp-impl.h"
2525

2626
int
27-
mpf_cmp_si (mpf_srcptr u, gmp_si vval)
27+
mpf_cmp_si (mpf_srcptr u, mpir_si vval)
2828
{
2929
mp_srcptr up;
3030
mp_size_t usize;
@@ -61,9 +61,9 @@ mpf_cmp_si (mpf_srcptr u, gmp_si vval)
6161

6262
/* 2. Are the exponents different (V's exponent == 1)? */
6363
#if GMP_NAIL_BITS != 0
64-
if (uexp > 1 + ((gmp_ui) vval > GMP_NUMB_MAX))
64+
if (uexp > 1 + ((mpir_ui) vval > GMP_NUMB_MAX))
6565
return usign;
66-
if (uexp < 1 + ((gmp_ui) vval > GMP_NUMB_MAX))
66+
if (uexp < 1 + ((mpir_ui) vval > GMP_NUMB_MAX))
6767
return -usign;
6868
#else
6969
if (uexp > 1)
@@ -87,9 +87,9 @@ mpf_cmp_si (mpf_srcptr u, gmp_si vval)
8787
usize--;
8888

8989
/* 3. Compare the most significant mantissa limb with V. */
90-
if (ulimb > (gmp_ui) vval)
90+
if (ulimb > (mpir_ui) vval)
9191
return usign;
92-
else if (ulimb < (gmp_ui) vval)
92+
else if (ulimb < (mpir_ui) vval)
9393
return -usign;
9494

9595
/* Ignore zeroes at the low end of U. */

mpf/cmp_ui.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ MA 02110-1301, USA. */
2323
#include "gmp-impl.h"
2424

2525
int
26-
mpf_cmp_ui (mpf_srcptr u, gmp_ui vval)
26+
mpf_cmp_ui (mpf_srcptr u, mpir_ui vval)
2727
{
2828
mp_srcptr up;
2929
mp_size_t usize;

mpf/div_ui.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ MA 02110-1301, USA. */
2525
#include "longlong.h"
2626

2727
void
28-
mpf_div_ui (mpf_ptr r, mpf_srcptr u, gmp_ui v)
28+
mpf_div_ui (mpf_ptr r, mpf_srcptr u, mpir_ui v)
2929
{
3030
mp_srcptr up;
3131
mp_ptr rp, tp, rtp;

mpf/get_d_2exp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ MA 02110-1301, USA. */
2525

2626

2727
double
28-
mpf_get_d_2exp (gmp_si *exp2, mpf_srcptr src)
28+
mpf_get_d_2exp (mpir_si *exp2, mpf_srcptr src)
2929
{
3030
mp_size_t size, abs_size;
3131
mp_srcptr ptr;
3232
int cnt;
33-
gmp_si exp;
33+
mpir_si exp;
3434

3535
size = SIZ(src);
3636
if (UNLIKELY (size == 0))

0 commit comments

Comments
 (0)