File: fmpz-conversions-single.in

package info (click to toggle)
flint 2.5.2-15~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 30,216 kB
  • sloc: ansic: 289,367; cpp: 11,210; python: 1,280; sh: 649; makefile: 282
file content (10 lines) | stat: -rw-r--r-- 319 bytes parent folder | download | duplicates (15)
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 */