File: fmpz-conversions-reentrant.in

package info (click to toggle)
flint 2.5.2-19
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 30,308 kB
  • sloc: ansic: 289,367; cpp: 11,210; python: 1,280; sh: 649; makefile: 283
file content (10 lines) | stat: -rw-r--r-- 319 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
#ifndef FMPZ_CONVERSIONS_H
#define FMPZ_CONVERSIONS_H

/* turn a pointer to an __mpz_struct into a fmpz_t */
#define PTR_TO_COEFF(x) (((ulong) (x) >> 2) | (WORD(1) << (FLINT_BITS - 2)))

/* turns an fmpz into a pointer to an mpz */
#define COEFF_TO_PTR(x) ((__mpz_struct *) ((x) << 2))

#endif /* FMPZ_CONVERSIONS_H */