Understanding the Division Dimensions of a "pw_qpolynomial"

8 views
Skip to first unread message

Siddhartha Neyagapula

unread,
Sep 6, 2026, 4:47:05 AM (14 days ago) Sep 6
to isl Development
 [i0, i1, i2, i3] -> ( (floor((2i1)/4)  +  floor((2i1)/3)) +  floor((136 + 2i1)/5)) : i3 = 0 and 0 <= i0 <= 59 and 2 <= i2 <= 76 and 3 <= i1 <= 68

consider this polynomial 
when I iterate over the terms using "isl_qpolynomial_foreach_term"
  dims = isl_term_dim(term, isl_dim_div);

gives me dims as 3. Now I understand that the three corresponds to the division
2i/4 
2i1/3
(136 + 2i1)/5

but Now I want to know what set dimension is this division on?  Eg here the division is on i2 
How do i retrieve that information ?


Disclaimer:- This footer text is to convey that this email is sent by one of the users of IITH. So, do not mark it as SPAM.

Sven Verdoolaege

unread,
Sep 6, 2026, 6:37:59 AM (14 days ago) Sep 6
to Siddhartha Neyagapula, isl Development
On Sat, Sep 05, 2026 at 11:58:03PM -0700, 'Siddhartha Neyagapula' via isl Development wrote:
> [i0, i1, i2, i3] -> ( (floor((2i1)/4) + floor((2i1)/3)) + floor((136 +
> 2i1)/5)) : i3 = 0 and 0 <= i0 <= 59 and 2 <= i2 <= 76 and 3 <= i1 <= 68
>
> consider this polynomial
> when I iterate over the terms using "isl_qpolynomial_foreach_term"
> dims = isl_term_dim(term, isl_dim_div);
>
> gives me dims as 3. Now I understand that the three corresponds to the
> division
> 2i/4
> 2i1/3
> (136 + 2i1)/5
>
> but Now I want to know what set dimension is this division on? Eg here the
> division is on i2
> How do i retrieve that information ?

You can obtain the expression of each integer division using isl_term_get_div.
What would you like to do with this information?

Also, I'm curious, how did you obtain that quasi-polynomial?

skimo
Reply all
Reply to author
Forward
0 new messages