Polly 20.0.0git
gmp_custom_test.c
Go to the documentation of this file.
1
2void test_mpz_export(char **out, char *rop, size_t *countp, int order,
3 size_t size, int endian, size_t nails, char *mpzstr) {
4 mpz_t op;
5 mpz_init(op);
6 mpz_set_str(op, mpzstr, 10);
7 // printf("%p,%p,%d,%zi,%d,%zi,%s\n", rop, countp, order, size, endian, nails,
8 // mpzstr);
9 *out = mpz_export(rop, countp, order, size, endian, nails, op);
10}
11
12void test_mpz_import(char *out, void *unused, size_t count, int order,
13 size_t size, int endian, size_t nails, char *mpzstr) {
14 mpz_t op;
15 mpz_t rop;
16 mpz_init(op);
17 mpz_init(rop);
18 mpz_set_str(op, mpzstr, 10);
19 char *data;
20
21 // printf("%p,%p,%d,%zi,%d,%zi,%s\n", rop, countp, order, size, endian, nails,
22 // mpzstr);
23 data = mpz_export(NULL, &count, order, size, endian, nails, op);
24 mpz_import(rop, count, order, size, endian, nails, data);
25 int eq = mpz_cmpabs(op, rop);
26 sprintf(out, "%2d:", eq);
27 mpz_get_str(out + 3, 10, rop);
28}
void test_mpz_export(char **out, char *rop, size_t *countp, int order, size_t size, int endian, size_t nails, char *mpzstr)
void test_mpz_import(char *out, void *unused, size_t count, int order, size_t size, int endian, size_t nails, char *mpzstr)
static int count(int *con, unsigned len, int status)
Definition: isl_coalesce.c:152
__isl_give isl_val *(* op)(__isl_take isl_val *v)
Definition: isl_test.c:773
const char * size
Definition: isl_test.c:1570