Reference: Expression-Like Objects

Quasi-affine expression

class namedisl.Aff(_obj: IslObjectT_co, space: Space, _isl_names_ok: bool = False)[source]
static zero_on_domain(space: Space) Aff[source]
set_coefficient(name: str, value: int) Aff[source]
as_pw_aff() PwAff[source]
num_divs
get_div(index: int) Aff[source]
get_div_coefficient(index: int) Val[source]
get_constant() Val[source]
get_denominator() Val[source]
is_constant() bool[source]
gist(set: Set) Self[source]
gist_params(set: Set) Self[source]
__mod__(other: Val | int) Self[source]
__neg__()[source]
__add__(other: Self | int) Self[source]
__radd__(other: int) Self[source]
__sub__(other: Self | int) Self[source]
__rsub__(other: int) Self[source]
__mul__(other: Self | int) Self[source]
__rmul__(other: int) Self[source]
__bool__()[source]
is_zero() bool[source]
plain_is_zero() bool[source]
equals(other: object) bool[source]
_obj: IslObjectT_co
space: Space
active_dim_types: ClassVar[frozenset[DimType]] = frozenset({DimType.param, DimType.in_})
add_dims(dt: DimType, names_to_add: Collection[str], /) Self[source]
move_dims(names: Collection[str], dest_dt: DimType) Self[source]
rename_dims(renaming: Iterable[tuple[str, str]]) Self[source]
as_isl() IslObjectT_co[source]
__hash__() int[source]

Return hash(self).

__eq__(other: object) bool[source]

This is intended to be cheap and strict, suitable mainly for hashing. Some subclasses (e.g. namedisl.Set) may provide a different, ‘mathematically exact’ notion of equality as a different method that is more expensive to check for.

__str__() str[source]

Return str(self).

namedisl.make_aff(src: str, ctx: Context | None = None) Aff[source]
namedisl.make_aff(src: Aff) Aff
namedisl.affs_from_domain_space(space: Space) Mapping[str | Literal[0], Aff][source]

Piecewise quasi-affine expression

class namedisl.PwAff(_obj: IslObjectT_co, space: Space, _isl_names_ok: bool = False)[source]
static from_piece_and_aff(piece: Set, aff: Aff) PwAff[source]
var_pw_aff(name: str) PwAff[source]

Return a PwAff that evaluates to name in the space of self.

where(op: Literal['<', '<=', '=', '!=', '>=', '>'], rhs: int | PwAff) Set[source]
get_pieces() list[tuple[Set, Aff]][source]
coalesce() PwAff[source]
eq_set(rhs: int | PwAff) Set[source]
ne_set(rhs: int | PwAff) Set[source]
ge_set(rhs: int | PwAff) Set[source]
le_set(rhs: int | PwAff) Set[source]
gt_set(rhs: int | PwAff) Set[source]
lt_set(rhs: int | PwAff) Set[source]
max(other: PwAff) PwAff[source]
min(other: PwAff) PwAff[source]
div(other: PwAff) PwAff[source]
floor() PwAff[source]
get_aggregate_domain() Set[source]
union_max(other: PwAff) PwAff[source]
union_min(other: PwAff) PwAff[source]
union_add(other: PwAff) PwAff[source]
is_constant() bool[source]
gist(set: Set) Self[source]
gist_params(set: Set) Self[source]
__mod__(other: Val | int) Self[source]
__neg__()[source]
__add__(other: Self | int) Self[source]
__radd__(other: int) Self[source]
__sub__(other: Self | int) Self[source]
__rsub__(other: int) Self[source]
__mul__(other: Self | int) Self[source]
__rmul__(other: int) Self[source]
__bool__()[source]
is_zero() bool[source]
plain_is_zero() bool[source]
equals(other: object) bool[source]
_obj: IslObjectT_co
space: Space
active_dim_types: ClassVar[frozenset[DimType]] = frozenset({DimType.param, DimType.in_})
add_dims(dt: DimType, names_to_add: Collection[str], /) Self[source]
move_dims(names: Collection[str], dest_dt: DimType) Self[source]
rename_dims(renaming: Iterable[tuple[str, str]]) Self[source]
as_isl() IslObjectT_co[source]
__hash__() int[source]

Return hash(self).

__eq__(other: object) bool[source]

This is intended to be cheap and strict, suitable mainly for hashing. Some subclasses (e.g. namedisl.Set) may provide a different, ‘mathematically exact’ notion of equality as a different method that is more expensive to check for.

__str__() str[source]

Return str(self).

namedisl.make_pw_aff(src: str, ctx: Context | None = None) PwAff[source]
namedisl.make_pw_aff(src: PwAff) PwAff

Create a PwAff from isl syntax or an islpy.PwAff.

namedisl.pw_affs_from_domain_space(space: Space) Mapping[str | Literal[0], PwAff][source]

This creates a lazily-evaluated mapping, i.e. you do not pay for the creation of unused dimensions.

Quasipolynomial

class namedisl.QPolynomial(_obj: IslObjectT_co, space: Space, _isl_names_ok: bool = False)[source]
__pow__(other: int) Self[source]
__neg__()[source]
__add__(other: Self | int) Self[source]
__radd__(other: int) Self[source]
__sub__(other: Self | int) Self[source]
__rsub__(other: int) Self[source]
__mul__(other: Self | int) Self[source]
__rmul__(other: int) Self[source]
__bool__()[source]
is_zero() bool[source]
plain_is_zero() bool[source]
equals(other: object) bool[source]
_obj: IslObjectT_co
space: Space
active_dim_types: ClassVar[frozenset[DimType]] = frozenset({DimType.param, DimType.in_})
add_dims(dt: DimType, names_to_add: Collection[str], /) Self[source]
move_dims(names: Collection[str], dest_dt: DimType) Self[source]
rename_dims(renaming: Iterable[tuple[str, str]]) Self[source]
as_isl() IslObjectT_co[source]
__hash__() int[source]

Return hash(self).

__eq__(other: object) bool[source]

This is intended to be cheap and strict, suitable mainly for hashing. Some subclasses (e.g. namedisl.Set) may provide a different, ‘mathematically exact’ notion of equality as a different method that is more expensive to check for.

__str__() str[source]

Return str(self).

namedisl.make_qpolynomial(src: str, ctx: Context | None = None) QPolynomial[source]
namedisl.make_qpolynomial(src: QPolynomial) QPolynomial

Create a QPolynomial from isl syntax or an isl qpolynomial.

Piecewise quasipolynomial

class namedisl.PwQPolynomial(_obj: IslObjectT_co, space: Space, _isl_names_ok: bool = False)[source]
get_pieces() list[tuple[Set, QPolynomial]][source]
__pow__(other: int) Self[source]
__neg__()[source]
__add__(other: Self | int) Self[source]
__radd__(other: int) Self[source]
__sub__(other: Self | int) Self[source]
__rsub__(other: int) Self[source]
__mul__(other: Self | int) Self[source]
__rmul__(other: int) Self[source]
__bool__()[source]
is_zero() bool[source]
plain_is_zero() bool[source]
equals(other: object) bool[source]
_obj: IslObjectT_co
space: Space
active_dim_types: ClassVar[frozenset[DimType]] = frozenset({DimType.param, DimType.in_})
add_dims(dt: DimType, names_to_add: Collection[str], /) Self[source]
move_dims(names: Collection[str], dest_dt: DimType) Self[source]
rename_dims(renaming: Iterable[tuple[str, str]]) Self[source]
as_isl() IslObjectT_co[source]
__hash__() int[source]

Return hash(self).

__eq__(other: object) bool[source]

This is intended to be cheap and strict, suitable mainly for hashing. Some subclasses (e.g. namedisl.Set) may provide a different, ‘mathematically exact’ notion of equality as a different method that is more expensive to check for.

__str__() str[source]

Return str(self).

namedisl.make_pw_qpolynomial(src: str, ctx: Context | None = None) PwQPolynomial[source]
namedisl.make_pw_qpolynomial(src: PwQPolynomial) PwQPolynomial

Create a PwQPolynomial from isl syntax or an isl object.

Vector-valued quasi-affine expression

final class namedisl.MultiAff(_obj: IslObjectT_co, space: Space, _isl_names_ok: bool = False)[source]
__getitem__(name: str) Aff[source]
__neg__()[source]
__add__(other: Self | int) Self[source]
__radd__(other: int) Self[source]
__sub__(other: Self | int) Self[source]
__rsub__(other: int) Self[source]
__mul__(other: Self | int) Self[source]
__rmul__(other: int) Self[source]
__bool__()[source]
is_zero() bool[source]
plain_is_zero() bool[source]
equals(other: object) bool[source]
_obj: IslObjectT_co
space: Space
active_dim_types: ClassVar[frozenset[DimType]] = frozenset({DimType.param, DimType.in_, DimType.out})
add_dims(dt: DimType, names_to_add: Collection[str], /) Self[source]
move_dims(names: Collection[str], dest_dt: DimType) Self[source]
rename_dims(renaming: Iterable[tuple[str, str]]) Self[source]
as_isl() IslObjectT_co[source]
__hash__() int[source]

Return hash(self).

__eq__(other: object) bool[source]

This is intended to be cheap and strict, suitable mainly for hashing. Some subclasses (e.g. namedisl.Set) may provide a different, ‘mathematically exact’ notion of equality as a different method that is more expensive to check for.

__str__() str[source]

Return str(self).

namedisl.make_multi_aff(src: str, ctx: Context | None = None) MultiAff[source]
namedisl.make_multi_aff(src: MultiAff) MultiAff

Create a MultiAff from isl syntax or an islpy.MultiAff.

Piecewise vector-valued quasi-affine expression

class namedisl.PwMultiAff(_obj: IslObjectT_co, space: Space, _isl_names_ok: bool = False)[source]
__getitem__(name: str) PwAff[source]
as_multi_aff() MultiAff[source]
__neg__()[source]
__add__(other: Self | int) Self[source]
__radd__(other: int) Self[source]
__sub__(other: Self | int) Self[source]
__rsub__(other: int) Self[source]
__mul__(other: Self | int) Self[source]
__rmul__(other: int) Self[source]
__bool__()[source]
is_zero() bool[source]
plain_is_zero() bool[source]
equals(other: object) bool[source]
_obj: IslObjectT_co
space: Space
active_dim_types: ClassVar[frozenset[DimType]] = frozenset({DimType.param, DimType.in_, DimType.out})
add_dims(dt: DimType, names_to_add: Collection[str], /) Self[source]
move_dims(names: Collection[str], dest_dt: DimType) Self[source]
rename_dims(renaming: Iterable[tuple[str, str]]) Self[source]
as_isl() IslObjectT_co[source]
__hash__() int[source]

Return hash(self).

__eq__(other: object) bool[source]

This is intended to be cheap and strict, suitable mainly for hashing. Some subclasses (e.g. namedisl.Set) may provide a different, ‘mathematically exact’ notion of equality as a different method that is more expensive to check for.

__str__() str[source]

Return str(self).

namedisl.make_pw_multi_aff(src: str, ctx: Context | None = None) PwMultiAff[source]
namedisl.make_pw_multi_aff(src: PwMultiAff) PwMultiAff