isl_seq.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright 2008-2009 Katholieke Universiteit Leuven
  3. *
  4. * Use of this software is governed by the MIT license
  5. *
  6. * Written by Sven Verdoolaege, K.U.Leuven, Departement
  7. * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
  8. */
  9. #ifndef ISL_SEQ_H
  10. #define ISL_SEQ_H
  11. #include <sys/types.h>
  12. #include <isl_int.h>
  13. #include <isl/ctx.h>
  14. #if defined(__cplusplus)
  15. extern "C" {
  16. #endif
  17. /* Some common operations on sequences of isl_int's */
  18. void isl_seq_clr(isl_int *p, unsigned len);
  19. void isl_seq_set(isl_int *p, isl_int v, unsigned len);
  20. void isl_seq_set_si(isl_int *p, int v, unsigned len);
  21. void isl_seq_neg(isl_int *dst, isl_int *src, unsigned len);
  22. void isl_seq_cpy(isl_int *dst, isl_int *src, unsigned len);
  23. void isl_seq_addmul(isl_int *dst, isl_int f, isl_int *src, unsigned len);
  24. void isl_seq_submul(isl_int *dst, isl_int f, isl_int *src, unsigned len);
  25. void isl_seq_swp_or_cpy(isl_int *dst, isl_int *src, unsigned len);
  26. void isl_seq_scale(isl_int *dst, isl_int *src, isl_int f, unsigned len);
  27. void isl_seq_scale_down(isl_int *dst, isl_int *src, isl_int f, unsigned len);
  28. void isl_seq_cdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len);
  29. void isl_seq_fdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len);
  30. void isl_seq_fdiv_r(isl_int *dst, isl_int *src, isl_int m, unsigned len);
  31. void isl_seq_combine(isl_int *dst, isl_int m1, isl_int *src1,
  32. isl_int m2, isl_int *src2, unsigned len);
  33. void isl_seq_elim(isl_int *dst, isl_int *src, unsigned pos, unsigned len,
  34. isl_int *m);
  35. void isl_seq_abs_max(isl_int *p, unsigned len, isl_int *max);
  36. void isl_seq_gcd(isl_int *p, unsigned len, isl_int *gcd);
  37. void isl_seq_lcm(isl_int *p, unsigned len, isl_int *lcm);
  38. void isl_seq_normalize(struct isl_ctx *ctx, isl_int *p, unsigned len);
  39. void isl_seq_inner_product(isl_int *p1, isl_int *p2, unsigned len,
  40. isl_int *prod);
  41. int isl_seq_first_non_zero(isl_int *p, unsigned len);
  42. int isl_seq_last_non_zero(isl_int *p, unsigned len);
  43. int isl_seq_abs_min_non_zero(isl_int *p, unsigned len);
  44. int isl_seq_eq(isl_int *p1, isl_int *p2, unsigned len);
  45. int isl_seq_cmp(isl_int *p1, isl_int *p2, unsigned len);
  46. int isl_seq_is_neg(isl_int *p1, isl_int *p2, unsigned len);
  47. void isl_seq_substitute(isl_int *p, int pos, isl_int *subs,
  48. int p_len, int subs_len, isl_int v);
  49. uint32_t isl_seq_get_hash(isl_int *p, unsigned len);
  50. uint32_t isl_seq_get_hash_bits(isl_int *p, unsigned len, unsigned bits);
  51. #if defined(__cplusplus)
  52. }
  53. #endif
  54. #endif