Reference: Basic Building Blocks¶

Context¶

class islpy.Context¶
__eq__(other)¶

Return self==value.

__hash__()¶

Return hash(self).

__ne__(other)¶

Return self!=value.

get_ast_always_print_block(self)¶
Parameters

self – Context

Returns

int

get_ast_build_allow_else(self)¶
Parameters

self – Context

Returns

int

get_ast_build_allow_or(self)¶
Parameters

self – Context

Returns

int

get_ast_build_atomic_upper_bound(self)¶
Parameters

self – Context

Returns

int

get_ast_build_detect_min_max(self)¶
Parameters

self – Context

Returns

int

get_ast_build_exploit_nested_bounds(self)¶
Parameters

self – Context

Returns

int

get_ast_build_group_coscheduled(self)¶
Parameters

self – Context

Returns

int

get_ast_build_prefer_pdiv(self)¶
Parameters

self – Context

Returns

int

get_ast_build_scale_strides(self)¶
Parameters

self – Context

Returns

int

get_ast_build_separation_bounds(self)¶
Parameters

self – Context

Returns

int

get_ast_iterator_type(self)¶
Parameters

self – Context

Returns

string

get_ast_print_macro_once(self)¶
Parameters

self – Context

Returns

int

get_ast_print_outermost_block(self)¶
Parameters

self – Context

Returns

int

get_bound(self)¶
Parameters

self – Context

Returns

int

get_coalesce_bounded_wrapping(self)¶
Parameters

self – Context

Returns

int

get_coalesce_preserve_locals(self)¶
Parameters

self – Context

Returns

int

get_gbr_only_first(self)¶
Parameters

self – Context

Returns

int

get_on_error(self)¶
Parameters

self – Context

Returns

int

get_pip_symmetry(self)¶
Parameters

self – Context

Returns

int

get_schedule_algorithm(self)¶
Parameters

self – Context

Returns

int

get_schedule_carry_self_first(self)¶
Parameters

self – Context

Returns

int

get_schedule_max_coefficient(self)¶
Parameters

self – Context

Returns

int

get_schedule_max_constant_term(self)¶
Parameters

self – Context

Returns

int

get_schedule_maximize_band_depth(self)¶
Parameters

self – Context

Returns

int

get_schedule_maximize_coincidence(self)¶
Parameters

self – Context

Returns

int

get_schedule_outer_coincidence(self)¶
Parameters

self – Context

Returns

int

get_schedule_separate_components(self)¶
Parameters

self – Context

Returns

int

get_schedule_serialize_sccs(self)¶
Parameters

self – Context

Returns

int

get_schedule_split_scaled(self)¶
Parameters

self – Context

Returns

int

get_schedule_treat_coalescing(self)¶
Parameters

self – Context

Returns

int

get_schedule_whole_component(self)¶
Parameters

self – Context

Returns

int

get_tile_scale_tile_loops(self)¶
Parameters

self – Context

Returns

int

get_tile_shift_point_loops(self)¶
Parameters

self – Context

Returns

int

set_ast_always_print_block(self, val)¶
Parameters
Returns

isl_stat

set_ast_build_allow_else(self, val)¶
Parameters
Returns

isl_stat

set_ast_build_allow_or(self, val)¶
Parameters
Returns

isl_stat

set_ast_build_atomic_upper_bound(self, val)¶
Parameters
Returns

isl_stat

set_ast_build_detect_min_max(self, val)¶
Parameters
Returns

isl_stat

set_ast_build_exploit_nested_bounds(self, val)¶
Parameters
Returns

isl_stat

set_ast_build_group_coscheduled(self, val)¶
Parameters
Returns

isl_stat

set_ast_build_prefer_pdiv(self, val)¶
Parameters
Returns

isl_stat

set_ast_build_scale_strides(self, val)¶
Parameters
Returns

isl_stat

set_ast_build_separation_bounds(self, val)¶
Parameters
Returns

isl_stat

set_ast_iterator_type(self, val)¶
Parameters
  • self – Context

  • val – string

Returns

isl_stat

set_ast_print_macro_once(self, val)¶
Parameters
Returns

isl_stat

set_ast_print_outermost_block(self, val)¶
Parameters
Returns

isl_stat

set_bound(self, val)¶
Parameters
Returns

isl_stat

set_coalesce_bounded_wrapping(self, val)¶
Parameters
Returns

isl_stat

set_coalesce_preserve_locals(self, val)¶
Parameters
Returns

isl_stat

set_gbr_only_first(self, val)¶
Parameters
Returns

isl_stat

set_on_error(self, val)¶
Parameters
Returns

isl_stat

set_pip_symmetry(self, val)¶
Parameters
Returns

isl_stat

set_schedule_algorithm(self, val)¶
Parameters
Returns

isl_stat

set_schedule_carry_self_first(self, val)¶
Parameters
Returns

isl_stat

set_schedule_max_coefficient(self, val)¶
Parameters
Returns

isl_stat

set_schedule_max_constant_term(self, val)¶
Parameters
Returns

isl_stat

set_schedule_maximize_band_depth(self, val)¶
Parameters
Returns

isl_stat

set_schedule_maximize_coincidence(self, val)¶
Parameters
Returns

isl_stat

set_schedule_outer_coincidence(self, val)¶
Parameters
Returns

isl_stat

set_schedule_separate_components(self, val)¶
Parameters
Returns

isl_stat

set_schedule_serialize_sccs(self, val)¶
Parameters
Returns

isl_stat

set_schedule_split_scaled(self, val)¶
Parameters
Returns

isl_stat

set_schedule_treat_coalescing(self, val)¶
Parameters
Returns

isl_stat

set_schedule_whole_component(self, val)¶
Parameters
Returns

isl_stat

set_tile_scale_tile_loops(self, val)¶
Parameters
Returns

isl_stat

set_tile_shift_point_loops(self, val)¶
Parameters
Returns

isl_stat

Id¶

class islpy.Id(name, user=None, context=None)¶
__eq__(self, other)¶
Parameters
  • self – Id

  • other – Id

Returns

bool

__hash__()¶

Return hash(self).

__ne__(self, other)¶
Parameters
  • self – Id

  • other – Id

Returns

bool

static alloc(ctx, name, user)¶
Parameters
  • ctx – Context

  • name – string

  • user – a user-specified Python object

Returns

Id

dump(self)¶
Parameters

self – Id

Returns

None

get_ctx(self)¶
Parameters

self – Id

Returns

Context

get_name(self)¶
Parameters

self – Id

Returns

string

get_user(self)¶
Parameters

self – Id

Returns

a user-specified python object

property name¶

get_name(self)

Parameters

self – Id

Returns

string

static read_from_str(ctx, str)¶
Parameters
  • ctx – Context

  • str – string

Returns

Id

to_str(self)¶
Parameters

self – Id

Returns

string

property user¶

get_user(self)

Parameters

self – Id

Returns

a user-specified python object

class islpy.MultiId(s=None, context=None)¶
__eq__(value, /)¶

Return self==value.

__hash__()¶

Return hash(self).

__ne__(value, /)¶

Return self!=value.

align_params(self, model)¶
Parameters
Returns

MultiId

copy(self)¶
Parameters

self – MultiId

Returns

MultiId

dump(self)¶
Parameters

self – MultiId

Returns

None

factor_range(self)¶
Parameters

self – MultiId

Returns

MultiId

flatten_range(self)¶
Parameters

self – MultiId

Returns

MultiId

from_range(self)¶
Parameters

self – MultiId

Returns

MultiId

get_ctx(self)¶
Parameters

self – MultiId

Returns

Context

get_domain_space(self)¶
Parameters

self – MultiId

Returns

Space

get_id(self, pos)¶
Parameters
Returns

Id

range_factor_domain(self)¶
Parameters

self – MultiId

Returns

MultiId

range_factor_range(self)¶
Parameters

self – MultiId

Returns

MultiId

range_is_wrapping(self)¶
Parameters

self – MultiId

Returns

bool

range_splice(self, pos, multi2)¶
Parameters
Returns

MultiId

static read_from_str(ctx, str)¶
Parameters
  • ctx – Context

  • str – string

Returns

MultiId

reset_user(self)¶
Parameters

self – MultiId

Returns

MultiId

set_id(self, pos, el)¶
Parameters
Returns

MultiId

to_str(self)¶
Parameters

self – MultiId

Returns

string

Space¶

(formerly called Dim. A compatibility alias is in place.)

class islpy.Space¶
__eq__(other)¶

Return self==value.

__hash__()¶

Return hash(self).

__ne__(other)¶

Return self!=value.

add_dims(self, type, n)¶
Parameters
Returns

Space

add_named_tuple_id_ui(self, tuple_id, dim)¶
Parameters
Returns

Space

add_param_id(self, id)¶
Parameters
Returns

Space

add_unnamed_tuple_ui(self, dim)¶
Parameters
Returns

Space

align_params(self, space2)¶
Parameters
Returns

Space

static alloc(ctx, nparam, n_in, n_out)¶
Parameters
Returns

Space

can_curry(self)¶
Parameters

self – Space

Returns

bool

can_range_curry(self)¶
Parameters

self – Space

Returns

bool

can_uncurry(self)¶
Parameters

self – Space

Returns

bool

can_zip(self)¶
Parameters

self – Space

Returns

bool

copy(self)¶
Parameters

self – Space

Returns

Space

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.

curry(self)¶
Parameters

self – Space

Returns

Space

dim(self, type)¶
Parameters
Returns

isl_size

domain(self)¶
Parameters

self – Space

Returns

Space

domain_factor_domain(self)¶
Parameters

self – Space

Returns

Space

domain_factor_range(self)¶
Parameters

self – Space

Returns

Space

domain_is_wrapping(self)¶
Parameters

self – Space

Returns

bool

domain_map(self)¶
Parameters

self – Space

Returns

Space

domain_map_multi_aff(self)¶
Parameters

self – Space

Returns

MultiAff

domain_map_pw_multi_aff(self)¶
Parameters

self – Space

Returns

PwMultiAff

domain_product(self, right)¶
Parameters
Returns

Space

drop_all_params(self)¶
Parameters

self – Space

Returns

Space

drop_dims(self, type, first, num)¶
Parameters
Returns

Space

drop_inputs(self, first, n)¶
Parameters
Returns

Space

drop_outputs(self, first, n)¶
Parameters
Returns

Space

dump(self)¶
Parameters

self – Space

Returns

None

extend(self, nparam, n_in, n_out)¶
Parameters
Returns

Space

factor_domain(self)¶
Parameters

self – Space

Returns

Space

factor_range(self)¶
Parameters

self – Space

Returns

Space

find_dim_by_id(self, type, id)¶
Parameters
Returns

int

find_dim_by_name(self, type, name)¶
Parameters
Returns

int

flatten_domain(self)¶
Parameters

self – Space

Returns

Space

flatten_range(self)¶
Parameters

self – Space

Returns

Space

from_domain(self)¶
Parameters

self – Space

Returns

Space

from_range(self)¶
Parameters

self – Space

Returns

Space

get_ctx(self)¶
Parameters

self – Space

Returns

Context

get_dim_id(self, type, pos)¶
Parameters
Returns

Id

get_dim_name(self, type, pos)¶
Parameters
Returns

string

get_div(self, pos)¶
Parameters
Returns

Aff

get_domain_tuple_id(self)¶
Parameters

self – Space

Returns

Id

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_range_tuple_id(self)¶
Parameters

self – Space

Returns

Id

get_space(self)¶
Parameters

self – LocalSpace

Returns

Space

get_tuple_id(self, type)¶
Parameters
Returns

Id

get_tuple_name(self, type)¶
Parameters
Returns

string

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.

get_var_ids(dimtype)¶

Return a list of Id instances for dim_type dimtype.

get_var_names(dimtype)¶

Return a list of dim names (in order) for dim_type dimtype.

has_dim_id(self, type, pos)¶
Parameters
Returns

bool

has_dim_name(self, type, pos)¶
Parameters
Returns

bool

has_domain_tuple_id(self)¶
Parameters

self – Space

Returns

bool

has_equal_params(self, space2)¶
Parameters
Returns

bool

has_equal_tuples(self, space2)¶
Parameters
Returns

bool

has_range_tuple_id(self)¶
Parameters

self – Space

Returns

bool

has_tuple_id(self, type)¶
Parameters
Returns

bool

has_tuple_name(self, type)¶
Parameters
Returns

bool

identity_pw_multi_aff_on_domain(self)¶
Parameters

self – Space

Returns

PwMultiAff

insert_dims(self, type, pos, n)¶
Parameters
Returns

Space

intersect(self, ls2)¶
Parameters
Returns

LocalSpace

is_domain(self, space2)¶
Parameters
Returns

bool

is_equal(self, space2)¶
Parameters
Returns

bool

is_map(self)¶
Parameters

self – Space

Returns

bool

is_params(self)¶
Parameters

self – Space

Returns

bool

is_product(self)¶
Parameters

self – Space

Returns

bool

is_range(self, space2)¶
Parameters
Returns

bool

is_set(self)¶
Parameters

self – Space

Returns

bool

is_wrapping(self)¶
Parameters

self – Space

Returns

bool

join(self, right)¶
Parameters
Returns

Space

lifting(self)¶
Parameters

self – LocalSpace

Returns

BasicMap

map_from_domain_and_range(self, range)¶
Parameters
Returns

Space

map_from_set(self)¶
Parameters

self – Space

Returns

Space

match(self, type1, space2, type2)¶
Parameters
Returns

bool

move_dims(self, dst_type, dst_pos, src_type, src_pos, n)¶
Parameters
Returns

Space

multi_aff_on_domain_multi_val(self, mv)¶
Parameters
Returns

MultiAff

params(self)¶
Parameters

self – Space

Returns

Space

static params_alloc(ctx, nparam)¶
Parameters
Returns

Space

product(self, right)¶
Parameters
Returns

Space

range(self)¶
Parameters

self – Space

Returns

Space

range_curry(self)¶
Parameters

self – Space

Returns

Space

range_factor_domain(self)¶
Parameters

self – Space

Returns

Space

range_factor_range(self)¶
Parameters

self – Space

Returns

Space

range_is_wrapping(self)¶
Parameters

self – Space

Returns

bool

range_map(self)¶
Parameters

self – Space

Returns

Space

range_map_multi_aff(self)¶
Parameters

self – Space

Returns

MultiAff

range_map_pw_multi_aff(self)¶
Parameters

self – Space

Returns

PwMultiAff

range_product(self, right)¶
Parameters
Returns

Space

range_reverse(self)¶
Parameters

self – Space

Returns

Space

reset_tuple_id(self, type)¶
Parameters
Returns

Space

reset_user(self)¶
Parameters

self – Space

Returns

Space

reverse(self)¶
Parameters

self – Space

Returns

Space

static set_alloc(ctx, nparam, dim)¶
Parameters
Returns

Space

set_dim_id(self, type, pos, id)¶
Parameters
Returns

Space

set_dim_name(self, type, pos, name)¶
Parameters
Returns

Space

set_domain_tuple_id(self, id)¶
Parameters
Returns

Space

set_from_params(self)¶
Parameters

self – Space

Returns

Space

set_range_tuple_id(self, id)¶
Parameters
Returns

Space

set_tuple_id(self, type, id)¶
Parameters
Returns

Space

set_tuple_name(self, type, s)¶
Parameters
Returns

Space

to_str(self)¶
Parameters

self – Space

Returns

string

tuple_is_equal(self, type1, space2, type2)¶
Parameters
Returns

bool

uncurry(self)¶
Parameters

self – Space

Returns

Space

static unit(ctx)¶
Parameters

ctx – Context

Returns

Space

universe_map(self)¶
Parameters

self – Space

Returns

Map

universe_set(self)¶
Parameters

self – Space

Returns

Set

unwrap(self)¶
Parameters

self – Space

Returns

Space

wrap(self)¶
Parameters

self – Space

Returns

Space

zero_aff_on_domain(self)¶
Parameters

self – Space

Returns

Aff

zip(self)¶
Parameters

self – Space

Returns

Space

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
Returns

LocalSpace

copy(self)¶
Parameters

self – LocalSpace

Returns

LocalSpace

dim(self, type)¶
Parameters
Returns

isl_size

domain(self)¶
Parameters

self – LocalSpace

Returns

LocalSpace

drop_dims(self, type, first, n)¶
Parameters
Returns

LocalSpace

dump(self)¶
Parameters

self – LocalSpace

Returns

None

find_dim_by_name(self, type, name)¶
Parameters
Returns

int

flatten_domain(self)¶
Parameters

self – LocalSpace

Returns

LocalSpace

flatten_range(self)¶
Parameters

self – LocalSpace

Returns

LocalSpace

from_domain(self)¶
Parameters

self – LocalSpace

Returns

LocalSpace

static from_space(space)¶
Parameters

space – Space

Returns

LocalSpace

get_ctx(self)¶
Parameters

self – LocalSpace

Returns

Context

get_dim_id(self, type, pos)¶
Parameters
Returns

Id

get_dim_name(self, type, pos)¶
Parameters
Returns

string

get_div(self, pos)¶
Parameters
Returns

Aff

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

Space

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.

get_var_ids(dimtype)¶

Return a list of Id instances for dim_type dimtype.

get_var_names(dimtype)¶

Return a list of dim names (in order) for dim_type dimtype.

has_dim_id(self, type, pos)¶
Parameters
Returns

bool

has_dim_name(self, type, pos)¶
Parameters
Returns

bool

insert_dims(self, type, first, n)¶
Parameters
Returns

LocalSpace

intersect(self, ls2)¶
Parameters
Returns

LocalSpace

is_equal(self, ls2)¶
Parameters
Returns

bool

is_params(self)¶
Parameters

self – LocalSpace

Returns

bool

is_set(self)¶
Parameters

self – LocalSpace

Returns

bool

lifting(self)¶
Parameters

self – LocalSpace

Returns

BasicMap

range(self)¶
Parameters

self – LocalSpace

Returns

LocalSpace

set_dim_id(self, type, pos, id)¶
Parameters
Returns

LocalSpace

set_dim_name(self, type, pos, s)¶
Parameters
Returns

LocalSpace

set_from_params(self)¶
Parameters

self – LocalSpace

Returns

LocalSpace

set_tuple_id(self, type, id)¶
Parameters
Returns

LocalSpace

property space¶

get_space(self)

Parameters

self – LocalSpace

Returns

Space

wrap(self)¶
Parameters

self – LocalSpace

Returns

LocalSpace

Constraints¶

class islpy.Constraint¶
__eq__(other)¶

Return self==value.

__hash__()¶

Return hash(self).

__ne__(other)¶

Return self!=value.

static alloc_equality(ls)¶
Parameters

ls – LocalSpace

Returns

Constraint

static alloc_inequality(ls)¶
Parameters

ls – LocalSpace

Returns

Constraint

cmp_last_non_zero(self, c2)¶
Parameters
Returns

int

copy(self)¶
Parameters

self – Constraint

Returns

Constraint

dim(self, type)¶
Parameters
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
  • space – Space

  • coefficients – a dict or iterable of tuple instances mapping variable names to their coefficients The constant is set to the value of the key ‘1’.

Changed in version 2011.3: Eliminated the separate const parameter.

static equality_alloc(ls)¶
Parameters

ls – LocalSpace

Returns

Constraint

static equality_from_aff(aff)¶
Parameters

aff – Aff

Returns

Constraint

get_aff(self)¶
Parameters

self – Constraint

Returns

Aff

get_bound(self, type, pos)¶
Parameters
Returns

Aff

get_coefficient_val(self, type, pos)¶
Parameters
Returns

Val

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

Val

get_ctx(self)¶
Parameters

self – Constraint

Returns

Context

get_dim_name(self, type, pos)¶
Parameters
Returns

string

get_div(self, pos)¶
Parameters
Returns

Aff

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

LocalSpace

get_space(self)¶
Parameters

self – Constraint

Returns

Space

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.

get_var_ids(dimtype)¶

Return a list of Id instances for dim_type dimtype.

get_var_names(dimtype)¶

Return a list of dim names (in order) for dim_type dimtype.

static ineq_from_names(space, coefficients=None)¶

Create a constraint const + coeff_1*var_1 +… >= 0.

Parameters
  • space – Space

  • coefficients – a dict or iterable of tuple instances mapping variable names to their coefficients The constant is set to the value of the key ‘1’.

Changed in version 2011.3: Eliminated the separate const parameter.

static inequality_alloc(ls)¶
Parameters

ls – LocalSpace

Returns

Constraint

static inequality_from_aff(aff)¶
Parameters

aff – Aff

Returns

Constraint

involves_dims(self, type, first, n)¶
Parameters
Returns

bool

is_div_constraint(self)¶
Parameters

self – Constraint

Returns

bool

is_equal(self, constraint2)¶
Parameters
Returns

bool

is_equality(self)¶
Parameters

self – Constraint

Returns

bool

is_lower_bound(self, type, pos)¶
Parameters
Returns

bool

is_upper_bound(self, type, pos)¶
Parameters
Returns

bool

negate(self)¶
Parameters

self – Constraint

Returns

Constraint

plain_cmp(self, c2)¶
Parameters
Returns

int

set_coefficient_val(self, type, pos, v)¶
Parameters
Returns

Constraint

set_coefficients(dim_tp, args)¶
Parameters
  • dim_tp – dim_type

  • args – list of coefficients, for indices 0..len(args)-1.

Changed in version 2011.3: New for Aff

set_coefficients_by_name(iterable, name_to_dim=None)¶

Set the coefficients and the constant.

Parameters

iterable – a dict or iterable of tuple 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
Returns

Constraint

property space¶

get_space(self)

Parameters

self – Constraint

Returns

Space

to_list(self)¶
Parameters

self – Constraint

Returns

ConstraintList

Value¶

class islpy.Val(src, context=None)¶
__eq__()¶

eq(self, v2)

Parameters
  • self – Val

  • v2 – Val

Returns

bool

__hash__()¶

Return hash(self).

__ne__()¶

ne(self, v2)

Parameters
  • self – Val

  • v2 – Val

Returns

bool

to_python()¶
2exp(self)¶
Parameters

self – Val

Returns

Val

abs(self)¶
Parameters

self – Val

Returns

Val

abs_eq(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

bool

add(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

Val

ceil(self)¶
Parameters

self – Val

Returns

Val

cmp_si(self, i)¶
Parameters
Returns

int

copy(self)¶
Parameters

self – Val

Returns

Val

div(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

Val

dump(self)¶
Parameters

self – Val

Returns

None

eq(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

bool

floor(self)¶
Parameters

self – Val

Returns

Val

gcd(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

Val

gcdext(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

tuple: (Val, x (Val), y (Val))

ge(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

bool

get_ctx(self)¶
Parameters

self – Val

Returns

Context

get_d(self)¶
Parameters

self – Val

Returns

double

get_den_val(self)¶
Parameters

self – Val

Returns

Val

get_num_si(self)¶
Parameters

self – Val

Returns

long

gt(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

bool

static infty(ctx)¶
Parameters

ctx – Context

Returns

Val

static int_from_si(ctx, i)¶
Parameters
Returns

Val

static int_from_ui(ctx, u)¶
Parameters
Returns

Val

inv(self)¶
Parameters

self – Val

Returns

Val

is_divisible_by(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

bool

is_infty(self)¶
Parameters

self – Val

Returns

bool

is_int(self)¶
Parameters

self – Val

Returns

bool

is_nan(self)¶
Parameters

self – Val

Returns

bool

is_neg(self)¶
Parameters

self – Val

Returns

bool

is_neginfty(self)¶
Parameters

self – Val

Returns

bool

is_negone(self)¶
Parameters

self – Val

Returns

bool

is_nonneg(self)¶
Parameters

self – Val

Returns

bool

is_nonpos(self)¶
Parameters

self – Val

Returns

bool

is_one(self)¶
Parameters

self – Val

Returns

bool

is_pos(self)¶
Parameters

self – Val

Returns

bool

is_rat(self)¶
Parameters

self – Val

Returns

bool

is_zero(self)¶
Parameters

self – Val

Returns

bool

le(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

bool

lt(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

bool

max(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

Val

min(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

Val

mod(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

Val

mul(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

Val

n_abs_num_chunks(self, size)¶
Parameters
Returns

isl_size

static nan(ctx)¶
Parameters

ctx – Context

Returns

Val

ne(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

bool

neg(self)¶
Parameters

self – Val

Returns

Val

static neginfty(ctx)¶
Parameters

ctx – Context

Returns

Val

static negone(ctx)¶
Parameters

ctx – Context

Returns

Val

static one(ctx)¶
Parameters

ctx – Context

Returns

Val

pow2(self)¶
Parameters

self – Val

Returns

Val

static read_from_str(ctx, str)¶
Parameters
  • ctx – Context

  • str – string

Returns

Val

set_si(self, i)¶
Parameters
Returns

Val

sgn(self)¶
Parameters

self – Val

Returns

int

sub(self, v2)¶
Parameters
  • self – Val

  • v2 – Val

Returns

Val

to_str(self)¶
Parameters

self – Val

Returns

string

trunc(self)¶
Parameters

self – Val

Returns

Val

static zero(ctx)¶
Parameters

ctx – Context

Returns

Val

Multi-Value¶

class islpy.MultiVal(s=None, context=None)¶
__eq__(value, /)¶

Return self==value.

__hash__()¶

Return hash(self).

__ne__(value, /)¶

Return self!=value.

add_dims(self, type, n)¶
Parameters
Returns

MultiVal

add_val(self, v)¶
Parameters
Returns

MultiVal

align_params(self, model)¶
Parameters
Returns

MultiVal

copy(self)¶
Parameters

self – MultiVal

Returns

MultiVal

dim(self, type)¶
Parameters
Returns

isl_size

drop_dims(self, type, first, n)¶
Parameters
Returns

MultiVal

dump(self)¶
Parameters

self – MultiVal

Returns

None

factor_range(self)¶
Parameters

self – MultiVal

Returns

MultiVal

find_dim_by_id(self, type, id)¶
Parameters
Returns

int

find_dim_by_name(self, type, name)¶
Parameters
Returns

int

flatten_range(self)¶
Parameters

self – MultiVal

Returns

MultiVal

from_range(self)¶
Parameters

self – MultiVal

Returns

MultiVal

get_ctx(self)¶
Parameters

self – MultiVal

Returns

Context

get_dim_id(self, type, pos)¶
Parameters
Returns

Id

get_domain_space(self)¶
Parameters

self – MultiVal

Returns

Space

get_tuple_id(self, type)¶
Parameters
Returns

Id

get_tuple_name(self, type)¶
Parameters
Returns

string

get_val(self, pos)¶
Parameters
Returns

Val

has_tuple_id(self, type)¶
Parameters
Returns

bool

insert_dims(self, type, first, n)¶
Parameters
Returns

MultiVal

involves_dims(self, type, first, n)¶
Parameters
Returns

bool

is_zero(self)¶
Parameters

self – MultiVal

Returns

bool

mod_multi_val(self, mv)¶
Parameters
Returns

MultiVal

mod_val(self, v)¶
Parameters
Returns

MultiVal

project_domain_on_params(self)¶
Parameters

self – MultiVal

Returns

MultiVal

range_factor_domain(self)¶
Parameters

self – MultiVal

Returns

MultiVal

range_factor_range(self)¶
Parameters

self – MultiVal

Returns

MultiVal

range_is_wrapping(self)¶
Parameters

self – MultiVal

Returns

bool

range_splice(self, pos, multi2)¶
Parameters
Returns

MultiVal

static read_from_str(ctx, str)¶
Parameters
  • ctx – Context

  • str – string

Returns

MultiVal

reset_tuple_id(self, type)¶
Parameters
Returns

MultiVal

reset_user(self)¶
Parameters

self – MultiVal

Returns

MultiVal

scale_down_multi_val(self, mv)¶
Parameters
Returns

MultiVal

scale_down_val(self, v)¶
Parameters
Returns

MultiVal

scale_multi_val(self, mv)¶
Parameters
Returns

MultiVal

scale_val(self, v)¶
Parameters
Returns

MultiVal

set_dim_id(self, type, pos, id)¶
Parameters
Returns

MultiVal

set_dim_name(self, type, pos, s)¶
Parameters
Returns

MultiVal

set_range_tuple_id(self, id)¶
Parameters
Returns

MultiVal

set_tuple_id(self, type, id)¶
Parameters
Returns

MultiVal

set_tuple_name(self, type, s)¶
Parameters
Returns

MultiVal

set_val(self, pos, el)¶
Parameters
Returns

MultiVal

splice(self, in_pos, out_pos, multi2)¶
Parameters
Returns

MultiVal

to_str(self)¶
Parameters

self – MultiVal

Returns

string

Vector¶

class islpy.Vec¶
__eq__(other)¶

Return self==value.

__hash__()¶

Return hash(self).

__len__()¶

size(self)

Parameters

self – Vec

Returns

isl_size

__ne__(other)¶

Return self!=value.

add(self, vec2)¶
Parameters
  • self – Vec

  • vec2 – Vec

Returns

Vec

add_els(self, n)¶
Parameters
Returns

Vec

static alloc(ctx, size)¶
Parameters
Returns

Vec

ceil(self)¶
Parameters

self – Vec

Returns

Vec

clr(self)¶
Parameters

self – Vec

Returns

Vec

cmp_element(self, vec2, pos)¶
Parameters
  • self – Vec

  • vec2 – Vec

  • pos – int

Returns

int

concat(self, vec2)¶
Parameters
  • self – Vec

  • vec2 – Vec

Returns

Vec

copy(self)¶
Parameters

self – Vec

Returns

Vec

drop_els(self, pos, n)¶
Parameters
Returns

Vec

dump(self)¶
Parameters

self – Vec

Returns

None

extend(self, size)¶
Parameters
Returns

Vec

get_ctx(self)¶
Parameters

self – Vec

Returns

Context

get_element_val(self, pos)¶
Parameters
  • self – Vec

  • pos – int

Returns

Val

insert_els(self, pos, n)¶
Parameters
Returns

Vec

insert_zero_els(self, pos, n)¶
Parameters
Returns

Vec

is_equal(self, vec2)¶
Parameters
  • self – Vec

  • vec2 – Vec

Returns

bool

mat_product(self, mat)¶
Parameters
  • self – Vec

  • mat – Mat

Returns

Vec

move_els(self, dst_col, src_col, n)¶
Parameters
Returns

Vec

neg(self)¶
Parameters

self – Vec

Returns

Vec

normalize(self)¶
Parameters

self – Vec

Returns

Vec

set_element_val(self, pos, v)¶
Parameters
  • self – Vec

  • pos – int

  • v – Val

Returns

Vec

set_val(self, v)¶
Parameters
  • self – Vec

  • v – Val

Returns

Vec

sort(self)¶
Parameters

self – Vec

Returns

Vec

static zero(ctx, size)¶
Parameters
Returns

Vec

zero_extend(self, size)¶
Parameters
Returns

Vec

Matrix¶

class islpy.Mat¶
__eq__(other)¶

Return self==value.

__hash__()¶

Return hash(self).

__ne__(other)¶

Return self!=value.

add_rows(self, n)¶
Parameters
Returns

Mat

add_zero_cols(self, n)¶
Parameters
Returns

Mat

add_zero_rows(self, n)¶
Parameters
Returns

Mat

aff_direct_sum(self, right)¶
Parameters
  • self – Mat

  • right – Mat

Returns

Mat

static alloc(ctx, n_row, n_col)¶
Parameters
Returns

Mat

col_add(self, dst_col, src_col)¶
Parameters
  • self – Mat

  • dst_col – int

  • src_col – int

Returns

None

cols(self)¶
Parameters

self – Mat

Returns

isl_size

concat(self, bot)¶
Parameters
  • self – Mat

  • bot – Mat

Returns

Mat

copy(self)¶
Parameters

self – Mat

Returns

Mat

diagonal(self, mat2)¶
Parameters
  • self – Mat

  • mat2 – Mat

Returns

Mat

drop_cols(self, col, n)¶
Parameters
Returns

Mat

drop_rows(self, row, n)¶
Parameters
Returns

Mat

dump(self)¶
Parameters

self – Mat

Returns

None

extend(self, n_row, n_col)¶
Parameters
Returns

Mat

static from_row_vec(vec)¶
Parameters

vec – Vec

Returns

Mat

get_ctx(self)¶
Parameters

self – Mat

Returns

Context

get_element_val(self, row, col)¶
Parameters
  • self – Mat

  • row – int

  • col – int

Returns

Val

has_linearly_independent_rows(self, mat2)¶
Parameters
  • self – Mat

  • mat2 – Mat

Returns

bool

static identity(ctx, n_row)¶
Parameters
Returns

Mat

initial_non_zero_cols(self)¶
Parameters

self – Mat

Returns

int

insert_cols(self, col, n)¶
Parameters
Returns

Mat

insert_rows(self, row, n)¶
Parameters
Returns

Mat

insert_zero_cols(self, first, n)¶
Parameters
Returns

Mat

insert_zero_rows(self, row, n)¶
Parameters
Returns

Mat

inverse_product(self, right)¶
Parameters
  • self – Mat

  • right – Mat

Returns

Mat

is_equal(self, mat2)¶
Parameters
  • self – Mat

  • mat2 – Mat

Returns

bool

left_hermite(self, neg)¶
Parameters
  • self – Mat

  • neg – int

Returns

tuple: (Mat, U (Mat), Q (Mat))

lin_to_aff(self)¶
Parameters

self – Mat

Returns

Mat

move_cols(self, dst_col, src_col, n)¶
Parameters
Returns

Mat

normalize(self)¶
Parameters

self – Mat

Returns

Mat

normalize_row(self, row)¶
Parameters
  • self – Mat

  • row – int

Returns

Mat

product(self, right)¶
Parameters
  • self – Mat

  • right – Mat

Returns

Mat

rank(self)¶
Parameters

self – Mat

Returns

isl_size

right_inverse(self)¶
Parameters

self – Mat

Returns

Mat

right_kernel(self)¶
Parameters

self – Mat

Returns

Mat

row_basis(self)¶
Parameters

self – Mat

Returns

Mat

row_basis_extension(self, mat2)¶
Parameters
  • self – Mat

  • mat2 – Mat

Returns

Mat

rows(self)¶
Parameters

self – Mat

Returns

isl_size

set_element_val(self, row, col, v)¶
Parameters
  • self – Mat

  • row – int

  • col – int

  • v – Val

Returns

Mat

swap_cols(self, i, j)¶
Parameters
Returns

Mat

swap_rows(self, i, j)¶
Parameters
Returns

Mat

transpose(self)¶
Parameters

self – Mat

Returns

Mat

unimodular_complete(self, row)¶
Parameters
  • self – Mat

  • row – int

Returns

Mat

vec_concat(self, bot)¶
Parameters
  • self – Mat

  • bot – Vec

Returns

Mat

vec_inverse_product(self, vec)¶
Parameters
  • self – Mat

  • vec – Vec

Returns

Vec

vec_product(self, vec)¶
Parameters
  • self – Mat

  • vec – Vec

Returns

Vec

Canonical Names for Internal Module¶

class islpy._isl.Context¶

See islpy.Context.

class islpy._isl.Id¶

See islpy.Id.

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.Val¶

See islpy.Val.

class islpy._isl.MultiVal¶

See islpy.MultiVal.

class islpy._isl.Vec¶

See islpy.Vec.

class islpy._isl.Mat¶

See islpy.Mat.

class islpy._isl.BasicSet¶

See islpy.BasicSet.

class islpy._isl.BasicMap¶

See islpy.BasicMap.

class islpy._isl.Set¶

See islpy.Set.

class islpy._isl.Map¶

See islpy.Map.

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.Aff¶

See islpy.Aff.

class islpy._isl.Div¶

See islpy.Aff (not a typo!).

class islpy._isl.PwAff¶

See islpy.PwAff.

class islpy._isl.UnionPwAff¶

See islpy.UnionPwAff.

class islpy._isl.MultiUnionPwAff¶

See islpy.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¶

See islpy.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¶

See islpy.UnionPwQPolynomial.

class islpy._isl.QPolynomialFold¶

See islpy.QPolynomialFold.

class islpy._isl.PwQPolynomialFold¶

See islpy.PwQPolynomialFold.

class islpy._isl.UnionPwQPolynomialFold¶

See islpy.UnionPwQPolynomialFold.