Reference: Basic Building Blocks¶
Context¶
Id¶
-
class
islpy.
Id
(name, user=None, context=None)¶ alloc()
(static)
read_from_str()
(static)
-
__hash__
()¶ Return hash(self).
-
static
alloc
(ctx, name, user)¶
Space¶
(formerly called Dim
. A compatibility alias is in place.)
-
class
islpy.
Space
¶ alloc()
(static)
params_alloc()
(static)set_alloc()
(static)unit()
(static)
-
__eq__
(other)¶ Return self==value.
-
__hash__
()¶ Return hash(self).
-
__ne__
(other)¶ Return self!=value.
-
add_named_tuple_id_ui
(self, tuple_id, dim)¶
-
static
alloc
(ctx, nparam, n_in, n_out)¶
-
static
create_from_names
(ctx, set=None, in_=None, out=None, params=())¶ Create a
Space
from lists of variable names.- Parameters
set – names of set-type variables.
in – names of in-type variables.
out – names of out-type variables.
params – names of parameter-type variables.
-
drop_dims
(self, type, first, num)¶
-
extend
(self, nparam, n_in, n_out)¶
-
find_dim_by_name
(self, type, name)¶
-
get_dim_name
(self, type, pos)¶
-
get_div
(self, pos)¶ - Parameters
self –
LocalSpace
pos –
int
- Returns
-
get_id_dict
(dimtype=None)¶ Return a dictionary mapping variable
Id
instances to tuples of (dim_type
, index).- Parameters
dimtype – None to get all variables, otherwise one of
dim_type
.
-
get_space
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
get_var_dict
(dimtype=None, ignore_out=False)¶ Return a dictionary mapping variable names to tuples of (
dim_type
, index).- Parameters
dimtype – None to get all variables, otherwise one of
dim_type
.
-
insert_dims
(self, type, pos, n)¶
-
intersect
(self, ls2)¶ - Parameters
self –
LocalSpace
ls2 –
LocalSpace
- Returns
-
lifting
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
match
(self, type1, space2, type2)¶
-
move_dims
(self, dst_type, dst_pos, src_type, src_pos, n)¶
-
static
set_alloc
(ctx, nparam, dim)¶
-
set_dim_id
(self, type, pos, id)¶
-
set_dim_name
(self, type, pos, name)¶
-
tuple_is_equal
(self, type1, space2, type2)¶
Local Space¶
-
class
islpy.
LocalSpace
¶ -
__eq__
(other)¶ Return self==value.
-
__hash__
()¶ Return hash(self).
-
__ne__
(other)¶ Return self!=value.
-
add_dims
(self, type, n)¶ - Parameters
self –
LocalSpace
type –
dim_type
n –
unsigned
- Returns
-
copy
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
dim
(self, type)¶ - Parameters
self –
LocalSpace
type –
dim_type
- Returns
isl_size
-
domain
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
drop_dims
(self, type, first, n)¶ - Parameters
self –
LocalSpace
type –
dim_type
first –
unsigned
n –
unsigned
- Returns
-
dump
(self)¶ - Parameters
self –
LocalSpace
- Returns
None
-
find_dim_by_name
(self, type, name)¶ - Parameters
self –
LocalSpace
type –
dim_type
name – string
- Returns
int
-
flatten_domain
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
flatten_range
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
from_domain
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
get_ctx
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
get_dim_id
(self, type, pos)¶ - Parameters
self –
LocalSpace
type –
dim_type
pos –
unsigned
- Returns
-
get_dim_name
(self, type, pos)¶ - Parameters
self –
LocalSpace
type –
dim_type
pos –
unsigned
- Returns
string
-
get_div
(self, pos)¶ - Parameters
self –
LocalSpace
pos –
int
- Returns
-
get_id_dict
(dimtype=None)¶ Return a dictionary mapping
Id
instances to tuples of (dim_type
, index).- Parameters
dimtype – None to get all variables, otherwise one of
dim_type
.
-
get_space
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
get_var_dict
(dimtype=None)¶ Return a dictionary mapping variable names to tuples of (
dim_type
, index).- Parameters
dimtype – None to get all variables, otherwise one of
dim_type
.
-
has_dim_id
(self, type, pos)¶ - Parameters
self –
LocalSpace
type –
dim_type
pos –
unsigned
- Returns
bool
-
has_dim_name
(self, type, pos)¶ - Parameters
self –
LocalSpace
type –
dim_type
pos –
unsigned
- Returns
bool
-
insert_dims
(self, type, first, n)¶ - Parameters
self –
LocalSpace
type –
dim_type
first –
unsigned
n –
unsigned
- Returns
-
intersect
(self, ls2)¶ - Parameters
self –
LocalSpace
ls2 –
LocalSpace
- Returns
-
is_equal
(self, ls2)¶ - Parameters
self –
LocalSpace
ls2 –
LocalSpace
- Returns
bool
-
is_params
(self)¶ - Parameters
self –
LocalSpace
- Returns
bool
-
is_set
(self)¶ - Parameters
self –
LocalSpace
- Returns
bool
-
lifting
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
range
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
set_dim_id
(self, type, pos, id)¶ - Parameters
self –
LocalSpace
type –
dim_type
pos –
unsigned
id –
Id
- Returns
-
set_dim_name
(self, type, pos, s)¶ - Parameters
self –
LocalSpace
type –
dim_type
pos –
unsigned
s – string
- Returns
-
set_from_params
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
set_tuple_id
(self, type, id)¶ - Parameters
self –
LocalSpace
type –
dim_type
id –
Id
- Returns
-
property
space
¶ get_space(self)
- Parameters
self –
LocalSpace
- Returns
-
wrap
(self)¶ - Parameters
self –
LocalSpace
- Returns
-
Constraints¶
-
class
islpy.
Constraint
¶ alloc_equality()
(static)alloc_inequality()
(static)equality_alloc()
(static)equality_from_aff()
(static)
inequality_alloc()
(static)inequality_from_aff()
(static)
-
__eq__
(other)¶ Return self==value.
-
__hash__
()¶ Return hash(self).
-
__ne__
(other)¶ Return self!=value.
-
static
alloc_equality
(ls)¶ - Parameters
ls –
LocalSpace
- Returns
-
static
alloc_inequality
(ls)¶ - Parameters
ls –
LocalSpace
- Returns
-
cmp_last_non_zero
(self, c2)¶ - Parameters
self –
Constraint
c2 –
Constraint
- Returns
int
-
copy
(self)¶ - Parameters
self –
Constraint
- Returns
-
dim
(self, type)¶ - Parameters
self –
Constraint
type –
dim_type
- Returns
isl_size
-
dump
(self)¶ - Parameters
self –
Constraint
- Returns
None
-
static
eq_from_names
(space, coefficients=None)¶ Create a constraint const + coeff_1*var_1 +… == 0.
- Parameters
Changed in version 2011.3: Eliminated the separate const parameter.
-
static
equality_alloc
(ls)¶ - Parameters
ls –
LocalSpace
- Returns
-
get_aff
(self)¶ - Parameters
self –
Constraint
- Returns
-
get_bound
(self, type, pos)¶ - Parameters
self –
Constraint
type –
dim_type
pos –
int
- Returns
-
get_coefficient_val
(self, type, pos)¶ - Parameters
self –
Constraint
type –
dim_type
pos –
int
- Returns
-
get_coefficients_by_name
(dimtype=None, dim_to_name=None)¶ Return a dictionary mapping variable names to coefficients.
- Parameters
dimtype – None to get all variables, otherwise one of
dim_type
.
Changed in version 2011.3: New for
Aff
-
get_constant_val
(self)¶ - Parameters
self –
Constraint
- Returns
-
get_ctx
(self)¶ - Parameters
self –
Constraint
- Returns
-
get_dim_name
(self, type, pos)¶ - Parameters
self –
Constraint
type –
dim_type
pos –
unsigned
- Returns
string
-
get_div
(self, pos)¶ - Parameters
self –
Constraint
pos –
int
- Returns
-
get_id_dict
(dimtype=None)¶ Return a dictionary mapping
Id
instances to tuples of (dim_type
, index).- Parameters
dimtype – None to get all variables, otherwise one of
dim_type
.
-
get_local_space
(self)¶ - Parameters
self –
Constraint
- Returns
-
get_space
(self)¶ - Parameters
self –
Constraint
- Returns
-
get_var_dict
(dimtype=None)¶ Return a dictionary mapping variable names to tuples of (
dim_type
, index).- Parameters
dimtype – None to get all variables, otherwise one of
dim_type
.
-
static
ineq_from_names
(space, coefficients=None)¶ Create a constraint const + coeff_1*var_1 +… >= 0.
- Parameters
Changed in version 2011.3: Eliminated the separate const parameter.
-
static
inequality_alloc
(ls)¶ - Parameters
ls –
LocalSpace
- Returns
-
involves_dims
(self, type, first, n)¶ - Parameters
self –
Constraint
type –
dim_type
first –
unsigned
n –
unsigned
- Returns
bool
-
is_div_constraint
(self)¶ - Parameters
self –
Constraint
- Returns
bool
-
is_equal
(self, constraint2)¶ - Parameters
self –
Constraint
constraint2 –
Constraint
- Returns
bool
-
is_equality
(self)¶ - Parameters
self –
Constraint
- Returns
bool
-
is_lower_bound
(self, type, pos)¶ - Parameters
self –
Constraint
type –
dim_type
pos –
unsigned
- Returns
bool
-
is_upper_bound
(self, type, pos)¶ - Parameters
self –
Constraint
type –
dim_type
pos –
unsigned
- Returns
bool
-
negate
(self)¶ - Parameters
self –
Constraint
- Returns
-
plain_cmp
(self, c2)¶ - Parameters
self –
Constraint
c2 –
Constraint
- Returns
int
-
set_coefficient_val
(self, type, pos, v)¶ - Parameters
self –
Constraint
type –
dim_type
pos –
int
v –
Val
- Returns
-
set_coefficients_by_name
(iterable, name_to_dim=None)¶ Set the coefficients and the constant.
- Parameters
iterable – a
dict
or iterable oftuple
instances mapping variable names to their coefficients. The constant is set to the value of the key ‘1’.
Changed in version 2011.3: New for
Aff
-
set_constant_val
(self, v)¶ - Parameters
self –
Constraint
v –
Val
- Returns
-
property
space
¶ get_space(self)
- Parameters
self –
Constraint
- Returns
-
to_list
(self)¶ - Parameters
self –
Constraint
- Returns
Value¶
-
class
islpy.
Val
(src, context=None)¶ infty()
(static)int_from_si()
(static)int_from_ui()
(static)
nan()
(static)neginfty()
(static)negone()
(static)one()
(static)read_from_str()
(static)zero()
(static)
-
__hash__
()¶ Return hash(self).
-
to_python
()¶
Multi-Value¶
-
class
islpy.
MultiVal
(s=None, context=None)¶ read_from_str()
(static)
-
__eq__
(value, /)¶ Return self==value.
-
__hash__
()¶ Return hash(self).
-
__ne__
(value, /)¶ Return self!=value.
-
drop_dims
(self, type, first, n)¶
-
find_dim_by_name
(self, type, name)¶
-
insert_dims
(self, type, first, n)¶
-
involves_dims
(self, type, first, n)¶
-
range_splice
(self, pos, multi2)¶
-
set_dim_id
(self, type, pos, id)¶
-
set_dim_name
(self, type, pos, s)¶
-
set_tuple_name
(self, type, s)¶
-
splice
(self, in_pos, out_pos, multi2)¶
Vector¶
Matrix¶
-
class
islpy.
Mat
¶ alloc()
(static)from_row_vec()
(static)identity()
(static)
-
__eq__
(other)¶ Return self==value.
-
__hash__
()¶ Return hash(self).
-
__ne__
(other)¶ Return self!=value.
-
static
alloc
(ctx, n_row, n_col)¶
-
move_cols
(self, dst_col, src_col, n)¶
Canonical Names for Internal Module¶
-
class
islpy._isl.
Context
¶ See
islpy.Context
.
-
class
islpy._isl.
MultiId
¶ See
islpy.MultiId
.
-
class
islpy._isl.
Space
¶ See
islpy.Space
.
-
class
islpy._isl.
LocalSpace
¶ See
islpy.LocalSpace
.
-
class
islpy._isl.
Constraint
¶ See
islpy.Constraint
.
-
class
islpy._isl.
MultiVal
¶ See
islpy.MultiVal
.
-
class
islpy._isl.
BasicSet
¶ See
islpy.BasicSet
.
-
class
islpy._isl.
BasicMap
¶ See
islpy.BasicMap
.
-
class
islpy._isl.
UnionSet
¶ See
islpy.UnionSet
.
-
class
islpy._isl.
UnionMap
¶ See
islpy.UnionMap
.
-
class
islpy._isl.
Point
¶ See
islpy.Point
.
-
class
islpy._isl.
Vertex
¶ See
islpy.Vertex
.
-
class
islpy._isl.
Vertices
¶ See
islpy.Vertices
.
-
class
islpy._isl.
StrideInfo
¶ See
islpy.StrideInfo
.
-
class
islpy._isl.
Cell
¶ See
islpy.Cell
.
-
class
islpy._isl.
FixedBox
¶ See
islpy.FixedBox
.
-
class
islpy._isl.
PwAff
¶ See
islpy.PwAff
.
-
class
islpy._isl.
UnionPwAff
¶ See
islpy.UnionPwAff
.
-
class
islpy._isl.
MultiUnionPwAff
¶
-
class
islpy._isl.
MultiAff
¶ See
islpy.MultiAff
.
-
class
islpy._isl.
PwMultiAff
¶ See
islpy.PwMultiAff
.
-
class
islpy._isl.
MultiPwAff
¶ See
islpy.MultiPwAff
.
-
class
islpy._isl.
UnionPwMultiAff
¶
-
class
islpy._isl.
Term
¶ See
islpy.Term
.
-
class
islpy._isl.
QPolynomial
¶ See
islpy.QPolynomial
.
-
class
islpy._isl.
PwQPolynomial
¶ See
islpy.PwQPolynomial
.
-
class
islpy._isl.
UnionPwQPolynomial
¶
-
class
islpy._isl.
QPolynomialFold
¶
-
class
islpy._isl.
PwQPolynomialFold
¶
-
class
islpy._isl.
UnionPwQPolynomialFold
¶