poly_int
arithmetic ¶There are tentative routines for other operations besides division:
Return true if we can calculate ‘a | b’ at compile time, storing the result in result if so.
Also, ANDs with a value ‘(1 << y) - 1’ or its inverse can be
treated as alignment operations. See Alignment of poly_int
s.
In addition, the following miscellaneous routines are available:
Return the greatest common divisor of all nonzero coefficients in a, or zero if a is known to be zero.
Return a value that is a multiple of both a and b, where
one value is a poly_int
and the other is a scalar. The result
will be the least common multiple for some indeterminate values but
not necessarily for all.
Return a value that is a multiple of both poly_int
a and
poly_int
b, asserting that such a value exists. The
result will be the least common multiple for some indeterminate values
but not necessarily for all.
When using this routine, please add a comment explaining why the assertion is known to hold.
Please add any other operations that you find to be useful.