/llvm-project/polly/lib/External/isl/imath/ |
H A D | imath.h | 64 } mpz_t, *mp_int; typedef 66 static inline mp_digit* MP_DIGITS(mp_int Z) { return Z->digits; } in MP_DIGITS() 67 static inline mp_size MP_ALLOC(mp_int Z) { return Z->alloc; } in MP_ALLOC() 68 static inline mp_size MP_USED(mp_int Z) { return Z->used; } in MP_USED() 69 static inline mp_sign MP_SIGN(mp_int Z) { return Z->sign; } in MP_SIGN() 108 static inline bool mp_int_is_odd(mp_int z) { return (z->digits[0] & 1) != 0; } in mp_int_is_odd() 111 static inline bool mp_int_is_even(mp_int z) { return (z->digits[0] & 1) == 0; } in mp_int_is_even() 115 mp_result mp_int_init(mp_int z); 119 mp_int mp_int_alloc(void); 124 mp_result mp_int_init_size(mp_int z, mp_size prec); [all …]
|
H A D | gmp_compat.h | 60 void GMPZAPI(abs)(mp_int rop, mp_int op); 63 void GMPZAPI(add)(mp_int rop, mp_int op1, mp_int op2); 66 void GMPZAPI(clear)(mp_int x); 69 int GMPZAPI(cmp_si)(mp_int op1, long op2); 72 int GMPZAPI(cmpabs)(mp_int op1, mp_int op2); 75 int GMPZAPI(cmp)(mp_int op1, mp_int op2); 78 void GMPZAPI(init)(mp_int x); 81 void GMPZAPI(mul)(mp_int rop, mp_int op1, mp_int op2); 84 void GMPZAPI(neg)(mp_int rop, mp_int op); 87 void GMPZAPI(set_si)(mp_int rop, long op); [all …]
|
H A D | gmp_compat.c | 75 void GMPZAPI(abs)(mp_int rop, mp_int op) { CHECK(mp_int_abs(op, rop)); } in GMPZAPI() 78 void GMPZAPI(add)(mp_int rop, mp_int op1, mp_int op2) { in GMPZAPI() 83 void GMPZAPI(clear)(mp_int x) { mp_int_clear(x); } in GMPZAPI() 86 int GMPZAPI(cmp_si)(mp_int op1, long op2) { in GMPZAPI() 91 int GMPZAPI(cmpabs)(mp_int op1, mp_int op2) { in GMPZAPI() 96 int GMPZAPI(cmp)(mp_int op1, mp_int op2) { return mp_int_compare(op1, op2); } in GMPZAPI() 99 void GMPZAPI(init)(mp_int x) { CHECK(mp_int_init(x)); } in GMPZAPI() 102 void GMPZAPI(mul)(mp_int rop, mp_int op1, mp_int op2) { in GMPZAPI() 107 void GMPZAPI(neg)(mp_int rop, mp_int op) { CHECK(mp_int_neg(op, rop)); } in GMPZAPI() 110 void GMPZAPI(set_si)(mp_int rop, long op) { CHECK(mp_int_set_value(rop, op)); } in GMPZAPI() [all …]
|
H A D | rsamath.c | 32 static mp_result s_rsa_transform(mp_int msg, mp_int exp, mp_int mod, 33 mp_int out); 36 mp_result rsa_i2osp(mp_int z, unsigned char *out, int len) { in rsa_i2osp() 50 mp_result rsa_os2ip(mp_int z, unsigned char *in, int len) { in rsa_os2ip() 55 mp_result rsa_rsaep(mp_int msg, mp_int exp, mp_int mod, mp_int cipher) { in rsa_rsaep() 60 mp_result rsa_rsadp(mp_int cipher, mp_int exp, mp_int mod, mp_int msg) { in rsa_rsadp() 65 mp_result rsa_rsasp(mp_int msg, mp_int exp, mp_int mod, mp_int signature) { in rsa_rsasp() 70 mp_result rsa_rsavp(mp_int signature, mp_int exp, mp_int mod, mp_int msg) { in rsa_rsavp() 76 int rsa_max_message_len(mp_int mod) { in rsa_max_message_len() 139 static mp_result s_rsa_transform(mp_int msg, mp_int exp, mp_int mod, in s_rsa_transform() [all …]
|
H A D | rsamath.h | 40 mp_result rsa_i2osp(mp_int z, unsigned char *out, int len); 43 mp_result rsa_os2ip(mp_int z, unsigned char *in, int len); 49 mp_result rsa_rsaep(mp_int msg, mp_int exp, mp_int mod, mp_int cipher); 52 mp_result rsa_rsadp(mp_int cipher, mp_int exp, mp_int mod, mp_int msg); 55 mp_result rsa_rsasp(mp_int msg, mp_int exp, mp_int mod, mp_int signature); 58 mp_result rsa_rsavp(mp_int signature, mp_int exp, mp_int mod, mp_int msg); 62 int rsa_max_message_len(mp_int mod);
|
H A D | imath.c | 111 static inline void CLAMP(mp_int z_) { in CLAMP() 177 static inline int CMPZ(mp_int Z) { in CMPZ() 220 static bool s_pad(mp_int z, mp_size min); 223 static inline mp_result GROW(mp_int Z, mp_size N) { in GROW() 228 static void s_fake(mp_int z, mp_small value, mp_digit vbuf[]); 229 static void s_ufake(mp_int z, mp_usmall value, mp_digit vbuf[]); 238 static int s_ucmp(mp_int a, mp_int b); 241 static int s_vcmp(mp_int a, mp_small v); 242 static int s_uvcmp(mp_int a, mp_usmall uv); 268 static void s_dadd(mp_int a, mp_digit b); [all …]
|
H A D | imtimer.c | 41 mp_int alloc_values(int nt, int prec); 42 void randomize_values(mp_int values, int nt, int prec); 43 void release_values(mp_int values, int nt); 44 void mp_int_random(mp_int z, int prec); 134 mp_int alloc_values(int nt, int prec) { in alloc_values() 135 mp_int out = malloc(nt * sizeof(mpz_t)); in alloc_values() 150 void randomize_values(mp_int values, int nt, int prec) { in randomize_values() 156 void release_values(mp_int values, int nt) { in release_values() 166 mp_int values; in get_multiply_time() 183 mp_int values; in get_exptmod_time() [all …]
|
H A D | imrat.h | 44 static inline mp_int MP_NUMER_P(mp_rat Q) { return &(Q->num); } in MP_NUMER_P() 47 static inline mp_int MP_DENOM_P(mp_rat Q) { return &(Q->den); } in MP_DENOM_P() 98 mp_result mp_rat_numer(mp_rat r, mp_int z); 101 mp_int mp_rat_numer_ref(mp_rat r); 104 mp_result mp_rat_denom(mp_rat r, mp_int z); 107 mp_int mp_rat_denom_ref(mp_rat r); 144 mp_result mp_rat_add_int(mp_rat a, mp_int b, mp_rat c); 147 mp_result mp_rat_sub_int(mp_rat a, mp_int b, mp_rat c); 150 mp_result mp_rat_mul_int(mp_rat a, mp_int b, mp_rat c); 154 mp_result mp_rat_div_int(mp_rat a, mp_int b, mp_rat c);
|
H A D | imdrover.c | 74 static mp_result read_int_value(mp_int z, char* str); 83 static bool parse_int_values(testspec_t* t, mp_int* in, mp_int* out, 103 static mp_result read_int_value(mp_int z, char* str) { in read_int_value() 201 static bool parse_int_values(testspec_t* t, mp_int* in, mp_int* out, in parse_int_values() 225 mp_int reg = g_zreg + pos++; /* grab next free register */ in parse_int_values() 238 mp_int reg = g_zreg + pos++; in parse_int_values() 435 mp_int in[2], out[1]; in test_init() 459 mp_int in[2], out[1]; in test_set() 483 mp_int in[2], out[1]; in test_neg() 498 mp_int in[2], out[1]; in test_abs() [all …]
|
H A D | imrat.c | 50 mp_result (*comb_f)(mp_int, mp_int, mp_int)); 148 mp_result mp_rat_numer(mp_rat r, mp_int z) { in mp_rat_numer() 152 mp_int mp_rat_numer_ref(mp_rat r) { return MP_NUMER_P(r); } in mp_rat_numer_ref() 154 mp_result mp_rat_denom(mp_rat r, mp_int z) { in mp_rat_denom() 158 mp_int mp_rat_denom_ref(mp_rat r) { return MP_DENOM_P(r); } in mp_rat_denom_ref() 282 mp_result mp_rat_add_int(mp_rat a, mp_int b, mp_rat c) { in mp_rat_add_int() 306 mp_result mp_rat_sub_int(mp_rat a, mp_int b, mp_rat c) { in mp_rat_sub_int() 330 mp_result mp_rat_mul_int(mp_rat a, mp_int b, mp_rat c) { in mp_rat_mul_int() 343 mp_result mp_rat_div_int(mp_rat a, mp_int b, mp_rat c) { in mp_rat_div_int() 894 mp_result (*comb_f)(mp_int, mp_int, mp_int)) { in s_rat_combine() argument
|
H A D | iprime.h | 40 mp_result mp_int_is_prime(mp_int z); 43 mp_result mp_int_find_prime(mp_int z);
|
H A D | iprime.c | 45 mp_result mp_int_is_prime(mp_int z) { in mp_int_is_prime() 83 mp_result mp_int_find_prime(mp_int z) { in mp_int_find_prime()
|
H A D | doc.md.in | 33 number. The type `mp_int` is a pointer to an `mpz_t`, and `mp_rat` is a 99 An `mp_int` must be initialized before use. By default, an `mp_int` is 101 storage is expanded automatically as needed. To initialize an `mp_int`, use 112 When you are finished with an `mp_int`, you must free the memory it uses: 118 To set an `mp_int` which has already been initialized to a small integer value, 123 To copy one initialized `mp_int` to another, use:
|
/llvm-project/polly/lib/External/isl/ |
H A D | isl_imath.h | 4 uint32_t isl_imath_hash(mp_int v, uint32_t hash); 5 int isl_imath_fits_ulong_p(mp_int op); 6 int isl_imath_fits_slong_p(mp_int op); 7 void isl_imath_addmul_ui(mp_int rop, mp_int op1, unsigned long op2); 8 void isl_imath_submul_ui(mp_int rop, mp_int op1, unsigned long op2); 9 void isl_imath_cdiv_q_ui(mp_int rop, mp_int op1, unsigned long op2); 10 void isl_imath_fdiv_q_ui(mp_int rop, mp_int op1, unsigned long op2);
|
H A D | isl_imath.c | 3 uint32_t isl_imath_hash(mp_int v, uint32_t hash) in isl_imath_hash() 17 int isl_imath_fits_slong_p(mp_int op) in isl_imath_fits_slong_p() 26 int isl_imath_fits_ulong_p(mp_int op) in isl_imath_fits_ulong_p() 33 void isl_imath_addmul_ui(mp_int rop, mp_int op1, unsigned long op2) in isl_imath_addmul_ui() 45 void isl_imath_submul_ui(mp_int rop, mp_int op1, unsigned long op2) in isl_imath_submul_ui() 60 void isl_imath_cdiv_q_ui(mp_int rop, mp_int lhs, unsigned long rhs) in isl_imath_cdiv_q_ui() 74 void isl_imath_fdiv_q_ui(mp_int rop, mp_int lhs, unsigned long rhs) in isl_imath_fdiv_q_ui()
|
H A D | isl_int_sioimath.c | 6 extern int isl_sioimath_decode(isl_sioimath val, int32_t *small, mp_int *big); 7 extern int isl_sioimath_decode_big(isl_sioimath val, mp_int *big); 11 extern isl_sioimath isl_sioimath_encode_big(mp_int val); 15 extern mp_int isl_sioimath_get_big(isl_sioimath val); 24 extern mp_int isl_sioimath_bigarg_src(isl_sioimath arg, 26 extern mp_int isl_sioimath_siarg_src(signed long arg, 28 extern mp_int isl_sioimath_si64arg_src(int64_t arg, 30 extern mp_int isl_sioimath_uiarg_src(unsigned long arg, 32 extern mp_int isl_sioimath_reinit_big(isl_sioimath_ptr ptr); 202 mp_int big; in isl_sioimath_print()
|
H A D | isl_int_sioimath.h | 125 inline mp_int isl_sioimath_get_big(isl_sioimath val) in isl_sioimath_get_big() 127 return (mp_int)(uintptr_t) val; in isl_sioimath_get_big() 144 inline int isl_sioimath_decode_big(isl_sioimath val, mp_int *big) in isl_sioimath_decode_big() 159 inline isl_sioimath isl_sioimath_encode_big(mp_int val) in isl_sioimath_encode_big() 247 inline mp_int isl_sioimath_bigarg_src(isl_sioimath arg, in isl_sioimath_bigarg_src() 250 mp_int big; in isl_sioimath_bigarg_src() 274 inline mp_int isl_sioimath_siarg_src(signed long arg, in isl_sioimath_siarg_src() 295 inline mp_int isl_sioimath_si64arg_src(int64_t arg, in isl_sioimath_si64arg_src() 316 inline mp_int isl_sioimath_uiarg_src(unsigned long arg, in isl_sioimath_uiarg_src() 331 inline mp_int isl_sioimath_reinit_big(isl_sioimath_ptr ptr) in isl_sioimath_reinit_big() [all …]
|
H A D | isl_int_imath.h | 7 typedef mp_int isl_int; 69 uint32_t isl_imath_hash(mp_int v, uint32_t hash);
|
/llvm-project/polly/lib/External/isl/imath/examples/ |
H A D | imcalc.c | 51 mp_int *elts; 56 mp_int *mem; /* named memory slots */ 70 static mp_result stack_push(cstate_t *sp, mp_int elt); 72 static mp_result mem_insert(cstate_t *sp, const char *name, mp_int value); 73 static mp_result mem_recall(cstate_t *sp, const char *name, mp_int value); 197 static mp_result read_number(char *buf, mp_int *out); 199 static void print_value(mp_int v); 325 static mp_result read_number(char *buf, mp_int *out) { in read_number() 328 mp_int value; in read_number() 390 static void print_value(mp_int v) { in print_value() [all …]
|
H A D | randprime.c | 53 mp_result mp_int_randomize(mp_int a, mp_size n_bits); 56 mp_result find_prime(mp_int seed, FILE *fb); 57 mp_result find_strong_prime(mp_int seed, FILE *fb); 59 typedef mp_result (*find_f)(mp_int, FILE *); 151 mp_result mp_int_randomize(mp_int a, mp_size n_bits) { in mp_int_randomize() 184 mp_result find_prime(mp_int seed, FILE *fb) { in find_prime() 210 mp_result find_strong_prime(mp_int seed, FILE *fb) { in find_strong_prime()
|
H A D | rsakey.c | 62 mp_result mp_int_randomize(mp_int a, mp_size n_bits); 65 mp_result find_prime(mp_int seed, FILE *fb); 213 mp_result mp_int_randomize(mp_int a, mp_size n_bits) { in mp_int_randomize() 246 mp_result find_prime(mp_int seed, FILE *fb) { in find_prime()
|
H A D | pi.c | 40 mp_int sum); 126 mp_int sum) { in arctan()
|