Update isl to isl-0.17.1-84-g72ffe88

This is a regular maintenance update to ensure we are testing with a recent
version of isl.

llvm-svn: 273597
This commit is contained in:
Tobias Grosser 2016-06-23 18:59:30 +00:00
parent 1f99da54c2
commit 8a12bd9035
23 changed files with 1038 additions and 320 deletions

View File

@ -1 +1 @@
isl-0.17.1-57-g1879898
isl-0.17.1-84-g72ffe88

View File

@ -9,7 +9,9 @@ CLEANFILES = \
manual.out \
manual.blg \
manual.log \
manual.brf
manual.brf \
manual.bcf \
manual.run.xml
if GENERATE_DOC
export TEXINPUTS := $(srcdir):$(TEXINPUTS)

View File

@ -283,7 +283,9 @@ CLEANFILES = \
manual.out \
manual.blg \
manual.log \
manual.brf
manual.brf \
manual.bcf \
manual.run.xml
all: all-am

Binary file not shown.

View File

@ -3457,6 +3457,12 @@ be created.
__isl_give isl_printer *isl_printer_to_str(isl_ctx *ctx);
__isl_null isl_printer *isl_printer_free(
__isl_take isl_printer *printer);
C<isl_printer_to_file> prints to the given file, while
C<isl_printer_to_str> prints to a string that can be extracted
using the following function.
#include <isl/printer.h>
__isl_give char *isl_printer_get_str(
__isl_keep isl_printer *printer);
@ -8189,6 +8195,9 @@ Several node types have their own functions for querying
isl_schedule_node_band_set_ast_build_options(
__isl_take isl_schedule_node *node,
__isl_take isl_union_set *options);
__isl_give isl_set *
isl_schedule_node_band_get_ast_isolate_option(
__isl_keep isl_schedule_node *node);
The function C<isl_schedule_node_band_get_space> returns the space
of the partial schedule of the band.
@ -8217,6 +8226,9 @@ may return C<isl_ast_loop_error> if an error occurs.
The AST build options govern how an AST is generated for
the individual schedule dimensions during AST generation.
See L</"AST Generation Options (Schedule Tree)">.
The isolate option for the given node can be extracted from these
AST build options using the function
C<isl_schedule_node_band_get_ast_isolate_option>.
#include <isl/schedule_node.h>
__isl_give isl_set *
@ -8498,6 +8510,8 @@ using the following function.
The resulting outer band node contains the first C<pos> dimensions of
the schedule of C<node> while the inner band contains the remaining dimensions.
The schedules of the two band nodes live in anonymous spaces.
The loop AST generation type options and the isolate option
are split over the the two band nodes.
A band node can be moved down to the leaves of the subtree rooted
at the band node using the following function.

View File

@ -110,6 +110,8 @@ __isl_give isl_union_set *isl_schedule_node_band_get_ast_build_options(
__isl_keep isl_schedule_node *node);
__isl_give isl_schedule_node *isl_schedule_node_band_set_ast_build_options(
__isl_take isl_schedule_node *node, __isl_take isl_union_set *options);
__isl_give isl_set *isl_schedule_node_band_get_ast_isolate_option(
__isl_keep isl_schedule_node *node);
unsigned isl_schedule_node_band_n_member(__isl_keep isl_schedule_node *node);
__isl_export
isl_bool isl_schedule_node_band_member_get_coincident(

View File

@ -2387,9 +2387,6 @@ enum isl_ast_loop_type isl_ast_build_get_loop_type(
__isl_give isl_ast_build *isl_ast_build_extract_isolated(
__isl_take isl_ast_build *build)
{
isl_space *space, *space2;
isl_union_set *options;
int n, n2;
isl_set *isolated;
if (!build)
@ -2403,27 +2400,7 @@ __isl_give isl_ast_build *isl_ast_build_extract_isolated(
if (!build)
return NULL;
options = isl_schedule_node_band_get_ast_build_options(build->node);
space = isl_multi_aff_get_space(build->internal2input);
space = isl_space_range(space);
space2 = isl_set_get_space(build->domain);
if (isl_space_is_wrapping(space2))
space2 = isl_space_range(isl_space_unwrap(space2));
n2 = isl_space_dim(space2, isl_dim_set);
n = isl_space_dim(space, isl_dim_set);
if (n < n2)
isl_die(isl_ast_build_get_ctx(build), isl_error_internal,
"total input space dimension cannot be smaller "
"than dimension of innermost band",
space = isl_space_free(space));
space = isl_space_drop_dims(space, isl_dim_set, n - n2, n2);
space = isl_space_map_from_domain_and_range(space, space2);
space = isl_space_wrap(space);
space = isl_space_set_tuple_name(space, isl_dim_set, "isolate");
isolated = isl_union_set_extract_set(options, space);
isl_union_set_free(options);
isolated = isl_schedule_node_band_get_ast_isolate_option(build->node);
isolated = isl_set_flatten(isolated);
isolated = isl_set_preimage_multi_aff(isolated,
isl_multi_aff_copy(build->internal2input));

File diff suppressed because it is too large Load Diff

View File

@ -79,6 +79,11 @@ int isl_basic_set_constraint_is_redundant(struct isl_basic_set **bset,
* constraints. If the minimal value along the normal of a constraint
* is the same if the constraint is removed, then the constraint is redundant.
*
* Since some constraints may be mutually redundant, sort the constraints
* first such that constraints that involve existentially quantified
* variables are considered for removal before those that do not.
* The sorting is also need for the use in map_simple_hull.
*
* Alternatively, we could have intersected the basic map with the
* corresponding equality and then checked if the dimension was that
* of a facet.
@ -99,6 +104,7 @@ __isl_give isl_basic_map *isl_basic_map_remove_redundancies(
if (bmap->n_ineq <= 1)
return bmap;
bmap = isl_basic_map_sort_constraints(bmap);
tab = isl_tab_from_basic_map(bmap, 0);
if (isl_tab_detect_implicit_equalities(tab) < 0)
goto error;
@ -2399,11 +2405,12 @@ static __isl_give isl_basic_map *cached_simple_hull(__isl_take isl_map *map,
* by only (translates of) the constraints in the constituents of map.
* Translation is only allowed if "shift" is set.
*
* Sort the constraints before removing redundant constraints
* The constraints are sorted while removing redundant constraints
* in order to indicate a preference of which constraints should
* be preserved. In particular, pairs of constraints that are
* sorted together are preferred to either both be preserved
* or both be removed.
* or both be removed. The sorting is performed inside
* isl_basic_map_remove_redundancies.
*
* The result of the computation is stored in map->cached_simple_hull[shift]
* such that it can be reused in subsequent calls. The cache is cleared
@ -2444,7 +2451,6 @@ static __isl_give isl_basic_map *map_simple_hull(__isl_take isl_map *map,
hull = isl_basic_map_overlying_set(bset, model);
hull = isl_basic_map_intersect(hull, affine_hull);
hull = isl_basic_map_sort_constraints(hull);
hull = isl_basic_map_remove_redundancies(hull);
if (hull) {

View File

@ -907,6 +907,57 @@ error:
return NULL;
}
/* Return the "isolate" option associated to "band", assuming
* it at appears at schedule depth "depth".
*
* The isolate option is of the form
*
* isolate[[flattened outer bands] -> band]
*/
__isl_give isl_set *isl_schedule_band_get_ast_isolate_option(
__isl_keep isl_schedule_band *band, int depth)
{
isl_space *space;
isl_set *isolate;
if (!band)
return NULL;
space = isl_schedule_band_get_space(band);
space = isl_space_from_range(space);
space = isl_space_add_dims(space, isl_dim_in, depth);
space = isl_space_wrap(space);
space = isl_space_set_tuple_name(space, isl_dim_set, "isolate");
isolate = isl_union_set_extract_set(band->ast_build_options, space);
return isolate;
}
/* Replace the option "drop" in the AST build options by "add".
* That is, remove "drop" and add "add".
*/
__isl_give isl_schedule_band *isl_schedule_band_replace_ast_build_option(
__isl_take isl_schedule_band *band, __isl_take isl_set *drop,
__isl_take isl_set *add)
{
isl_union_set *options;
band = isl_schedule_band_cow(band);
if (!band)
return NULL;
options = band->ast_build_options;
options = isl_union_set_subtract(options, isl_union_set_from_set(drop));
options = isl_union_set_union(options, isl_union_set_from_set(add));
band->ast_build_options = options;
if (!band->ast_build_options)
return isl_schedule_band_free(band);
return band;
}
/* Multiply the partial schedule of "band" with the factors in "mv".
* Replace the result by its greatest integer part to ensure
* that the schedule is always integral.
@ -1117,8 +1168,7 @@ error:
* We apply the transformation even if "n" is zero to ensure consistent
* behavior with respect to changes in the schedule space.
*
* The loop AST generation types for the isolated part become
* meaningless after dropping dimensions, so we remove them.
* The caller is responsible for updating the isolate option.
*/
__isl_give isl_schedule_band *isl_schedule_band_drop(
__isl_take isl_schedule_band *band, int pos, int n)
@ -1144,8 +1194,10 @@ __isl_give isl_schedule_band *isl_schedule_band_drop(
if (band->loop_type)
for (i = pos + n; i < band->n; ++i)
band->loop_type[i - n] = band->loop_type[i];
free(band->isolate_loop_type);
band->isolate_loop_type = NULL;
if (band->isolate_loop_type)
for (i = pos + n; i < band->n; ++i)
band->isolate_loop_type[i - n] =
band->isolate_loop_type[i];
band->n -= n;

View File

@ -80,6 +80,11 @@ __isl_give isl_union_set *isl_schedule_band_get_ast_build_options(
__isl_keep isl_schedule_band *band);
__isl_give isl_schedule_band *isl_schedule_band_set_ast_build_options(
__isl_take isl_schedule_band *band, __isl_take isl_union_set *options);
__isl_give isl_set *isl_schedule_band_get_ast_isolate_option(
__isl_keep isl_schedule_band *band, int depth);
__isl_give isl_schedule_band *isl_schedule_band_replace_ast_build_option(
__isl_take isl_schedule_band *band, __isl_take isl_set *drop,
__isl_take isl_set *add);
int isl_schedule_band_n_member(__isl_keep isl_schedule_band *band);
isl_bool isl_schedule_band_member_get_coincident(

View File

@ -1670,6 +1670,20 @@ error:
return NULL;
}
/* Return the "isolate" option associated to band node "node".
*/
__isl_give isl_set *isl_schedule_node_band_get_ast_isolate_option(
__isl_keep isl_schedule_node *node)
{
int depth;
if (!node)
return NULL;
depth = isl_schedule_node_get_schedule_depth(node);
return isl_schedule_tree_band_get_ast_isolate_option(node->tree, depth);
}
/* Make sure that that spaces of "node" and "mv" are the same.
* Return -1 on error, reporting the error to the user.
*/
@ -1945,14 +1959,18 @@ __isl_give isl_schedule_node *isl_schedule_node_band_sink(
/* Split "node" into two nested band nodes, one with the first "pos"
* dimensions and one with the remaining dimensions.
* The schedules of the two band nodes live in anonymous spaces.
* The loop AST generation type options and the isolate option
* are split over the the two band nodes.
*/
__isl_give isl_schedule_node *isl_schedule_node_band_split(
__isl_take isl_schedule_node *node, int pos)
{
int depth;
isl_schedule_tree *tree;
depth = isl_schedule_node_get_schedule_depth(node);
tree = isl_schedule_node_get_tree(node);
tree = isl_schedule_tree_band_split(tree, pos);
tree = isl_schedule_tree_band_split(tree, pos, depth);
return isl_schedule_node_graft_tree(node, tree);
}

View File

@ -1284,6 +1284,22 @@ error:
return NULL;
}
/* Return the "isolate" option associated to the band tree root of "tree",
* which is assumed to appear at schedule depth "depth".
*/
__isl_give isl_set *isl_schedule_tree_band_get_ast_isolate_option(
__isl_keep isl_schedule_tree *tree, int depth)
{
if (!tree)
return NULL;
if (tree->type != isl_schedule_node_band)
isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
"not a band node", return NULL);
return isl_schedule_band_get_ast_isolate_option(tree->band, depth);
}
/* Return the context of the context tree root.
*/
__isl_give isl_set *isl_schedule_tree_context_get_context(
@ -2164,14 +2180,95 @@ error:
return NULL;
}
/* Given an isolate AST generation option "isolate" for a band of size pos + n,
* return the corresponding option for a band covering the first "pos"
* members.
*
* The input isolate option is of the form
*
* isolate[[flattened outer bands] -> [pos; n]]
*
* The output isolate option is of the form
*
* isolate[[flattened outer bands] -> [pos]]
*/
static __isl_give isl_set *isolate_initial(__isl_keep isl_set *isolate,
int pos, int n)
{
isl_id *id;
isl_map *map;
isolate = isl_set_copy(isolate);
id = isl_set_get_tuple_id(isolate);
map = isl_set_unwrap(isolate);
map = isl_map_project_out(map, isl_dim_out, pos, n);
isolate = isl_map_wrap(map);
isolate = isl_set_set_tuple_id(isolate, id);
return isolate;
}
/* Given an isolate AST generation option "isolate" for a band of size pos + n,
* return the corresponding option for a band covering the final "n"
* members within a band covering the first "pos" members.
*
* The input isolate option is of the form
*
* isolate[[flattened outer bands] -> [pos; n]]
*
* The output isolate option is of the form
*
* isolate[[flattened outer bands; pos] -> [n]]
*
*
* The range is first split into
*
* isolate[[flattened outer bands] -> [[pos] -> [n]]]
*
* and then the first pos members are moved to the domain
*
* isolate[[[flattened outer bands] -> [pos]] -> [n]]
*
* after which the domain is flattened to obtain the desired output.
*/
static __isl_give isl_set *isolate_final(__isl_keep isl_set *isolate,
int pos, int n)
{
isl_id *id;
isl_space *space;
isl_multi_aff *ma1, *ma2;
isl_map *map;
isolate = isl_set_copy(isolate);
id = isl_set_get_tuple_id(isolate);
map = isl_set_unwrap(isolate);
space = isl_space_range(isl_map_get_space(map));
ma1 = isl_multi_aff_project_out_map(isl_space_copy(space),
isl_dim_set, pos, n);
ma2 = isl_multi_aff_project_out_map(space, isl_dim_set, 0, pos);
ma1 = isl_multi_aff_range_product(ma1, ma2);
map = isl_map_apply_range(map, isl_map_from_multi_aff(ma1));
map = isl_map_uncurry(map);
map = isl_map_flatten_domain(map);
isolate = isl_map_wrap(map);
isolate = isl_set_set_tuple_id(isolate, id);
return isolate;
}
/* Split the band root node of "tree" into two nested band nodes,
* one with the first "pos" dimensions and
* one with the remaining dimensions.
* The tree is itself positioned at schedule depth "depth".
*
* The loop AST generation type options and the isolate option
* are split over the the two band nodes.
*/
__isl_give isl_schedule_tree *isl_schedule_tree_band_split(
__isl_take isl_schedule_tree *tree, int pos)
__isl_take isl_schedule_tree *tree, int pos, int depth)
{
int n;
isl_set *isolate, *tree_isolate, *child_isolate;
isl_schedule_tree *child;
if (!tree)
@ -2192,8 +2289,16 @@ __isl_give isl_schedule_tree *isl_schedule_tree_band_split(
if (!tree || !child)
goto error;
isolate = isl_schedule_tree_band_get_ast_isolate_option(tree, depth);
tree_isolate = isolate_initial(isolate, pos, n - pos);
child_isolate = isolate_final(isolate, pos, n - pos);
child->band = isl_schedule_band_drop(child->band, 0, pos);
child->band = isl_schedule_band_replace_ast_build_option(child->band,
isl_set_copy(isolate), child_isolate);
tree->band = isl_schedule_band_drop(tree->band, pos, n - pos);
tree->band = isl_schedule_band_replace_ast_build_option(tree->band,
isl_set_copy(isolate), tree_isolate);
isl_set_free(isolate);
if (!child->band || !tree->band)
goto error;

View File

@ -142,6 +142,8 @@ __isl_give isl_union_set *isl_schedule_tree_band_get_ast_build_options(
__isl_keep isl_schedule_tree *tree);
__isl_give isl_schedule_tree *isl_schedule_tree_band_set_ast_build_options(
__isl_take isl_schedule_tree *tree, __isl_take isl_union_set *options);
__isl_give isl_set *isl_schedule_tree_band_get_ast_isolate_option(
__isl_keep isl_schedule_tree *tree, int depth);
__isl_give isl_set *isl_schedule_tree_context_get_context(
__isl_keep isl_schedule_tree *tree);
__isl_give isl_union_set *isl_schedule_tree_domain_get_domain(
@ -230,7 +232,7 @@ __isl_give isl_schedule_tree *isl_schedule_tree_band_shift(
__isl_take isl_schedule_tree *tree,
__isl_take isl_multi_union_pw_aff *shift);
__isl_give isl_schedule_tree *isl_schedule_tree_band_split(
__isl_take isl_schedule_tree *tree, int pos);
__isl_take isl_schedule_tree *tree, int pos, int depth);
__isl_give isl_schedule_tree *isl_schedule_tree_band_gist(
__isl_take isl_schedule_tree *tree, __isl_take isl_union_set *context);

View File

@ -1839,6 +1839,31 @@ struct {
},
{ 1, "[n] -> { [a,b] : (exists e : 1 <= a <= 7e and 9e <= b <= n) or "
"(0 <= a <= b <= n) }" },
{ 1, "{ [a, b] : 0 <= a <= 2 and b >= 0 and "
"((0 < b <= 13) or (2*floor((a + b)/2) >= -5 + a + 2b)) }" },
{ 1, "{ [a] : (2 <= a <= 5) or (a mod 2 = 1 and 1 <= a <= 5) }" },
{ 1, "{ [a, b, c] : (b = -1 + a and 0 < a <= 3 and "
"9*floor((-4a + 2c)/9) <= -3 - 4a + 2c) or "
"(exists (e0 = floor((-16 + 2c)/9): a = 4 and "
"b = 3 and 9e0 <= -19 + 2c)) }" },
{ 0, "{ [a, b, c] : (b <= 2 and b <= -2 + a) or "
"(b = -1 + a and 0 < a <= 3 and "
"9*floor((-4a + 2c)/9) <= -3 - 4a + 2c) or "
"(exists (e0 = floor((-16 + 2c)/9): a = 4 and "
"b = 3 and 9e0 <= -19 + 2c)) }" },
{ 1, "{ [y, x] : (x - y) mod 3 = 2 and 2 <= y <= 200 and 0 <= x <= 2;"
"[1, 0] }" },
{ 1, "{ [x, y] : (x - y) mod 3 = 2 and 2 <= y <= 200 and 0 <= x <= 2;"
"[0, 1] }" },
{ 1, "{ [1, y] : -1 <= y <= 1; [x, -x] : 0 <= x <= 1 }" },
{ 1, "{ [1, y] : 0 <= y <= 1; [x, -x] : 0 <= x <= 1 }" },
{ 1, "{ [x, y] : 0 <= x <= 10 and x - 4*floor(x/4) <= 1 and y <= 0; "
"[x, y] : 0 <= x <= 10 and x - 4*floor(x/4) > 1 and y <= 0; "
"[x, y] : 0 <= x <= 10 and x - 5*floor(x/5) <= 1 and 0 < y; "
"[x, y] : 0 <= x <= 10 and x - 5*floor(x/5) > 1 and 0 < y }" },
{ 1, "{ [x, 0] : 0 <= x <= 10 and x mod 2 = 0; "
"[x, 0] : 0 <= x <= 10 and x mod 2 = 1; "
"[x, y] : 0 <= x <= 10 and 1 <= y <= 10 }" },
};
/* A specialized coalescing test case that would result

View File

@ -1,53 +1,53 @@
for (int c0 = 0; c0 < m; c0 += 32)
for (int c1 = (n >= 32 && m >= c0 + 2) || (m == 1 && c0 == 0) ? 0 : 32 * n - 32 * floord(31 * n + 31, 32); c1 <= ((n <= -1 && c0 == 0) || (m == 1 && n >= 0 && c0 == 0) ? max(0, n - 1) : n); c1 += 32)
for (int c2 = c0; c2 <= (m >= 2 && c0 + 31 >= m && n >= c1 && c1 + 31 >= n ? 2 * m - 3 : (m >= 2 * c0 + 63 && c1 <= -32 && n >= c1 && c1 + 31 >= n) || (m >= c0 + 32 && 2 * c0 + 62 >= m && n >= c1 && c1 + 31 >= n) || (n >= 0 && c0 >= 32 && m >= 2 * c0 + 63 && c1 == n) || (m >= 63 && n >= 32 && c0 == 0 && c1 == n) ? 2 * c0 + 61 : m - 1); c2 += 32) {
if (c1 >= n) {
if (c0 == 0 && c1 == 0)
if (m >= 2) {
if (n <= 0 && c0 == 0 && c1 == 0)
for (int c5 = 0; c5 <= min(31, m - c2 - 1); c5 += 1)
S_14(c2 + c5);
if (c1 == n)
for (int c3 = max(0, (c2 / 2) - c0 + 1); c3 <= min(31, m - c0 - 1); c3 += 1)
if (n >= 0 && c1 == n) {
for (int c3 = max(0, (c2 / 2) - c0 + 1); c3 <= min(31, m - c0 - 2); c3 += 1)
for (int c5 = max(0, c0 - c2 + c3); c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1)
S_29(-c0 + c2 - c3 + c5, c0 + c3);
} else if (c1 >= 0 && m >= c2 + 1) {
for (int c3 = 0; c3 <= min(min(31, m - c0 - 2), -c0 + c2 + 30); c3 += 1) {
for (int c4 = 0; c4 <= min(31, n - c1 - 1); c4 += 1) {
if (c0 == 0 && c2 == 0 && c3 == 0) {
if (c1 == 0 && c4 == 0)
S_14(0);
S_19(c1 + c4, 0);
}
for (int c5 = max(0, c0 - c2 + c3 + 1); c5 <= min(31, m - c2 - 1); c5 += 1) {
if (c0 == 0 && c1 == 0 && c3 == 0 && c4 == 0)
S_14(c2 + c5);
if (c0 == 0 && c3 == 0)
S_19(c1 + c4, c2 + c5);
S_27(c0 + c3, c2 + c5, c1 + c4);
} else if (n >= c1 + 1 && c1 >= 0 && c1 + 31 >= n && c2 >= m) {
for (int c3 = max(0, (c2 / 2) - c0 + 1); c3 <= min(31, m - c0 - 2); c3 += 1)
for (int c5 = 0; c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1)
S_29(-c0 + c2 - c3 + c5, c0 + c3);
} else if (c1 <= -32 && n >= c1 && c1 + 31 >= n) {
for (int c3 = max(0, (c2 / 2) - c0 + 1); c3 <= min(31, m - c0 - 2); c3 += 1)
for (int c5 = max(0, c0 - c2 + c3); c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1)
S_29(-c0 + c2 - c3 + c5, c0 + c3);
} else if (n >= c1 + 1 && c1 >= 0 && m >= c2 + 1) {
for (int c3 = 0; c3 <= min(min(31, m - c0 - 2), -c0 + c2 + 30); c3 += 1) {
for (int c4 = 0; c4 <= min(31, n - c1 - 1); c4 += 1) {
if (c0 == 0 && c2 == 0 && c3 == 0) {
if (c1 == 0 && c4 == 0)
S_14(0);
S_19(c1 + c4, 0);
}
for (int c5 = max(0, c0 - c2 + c3 + 1); c5 <= min(31, m - c2 - 1); c5 += 1) {
if (c0 == 0 && c1 == 0 && c3 == 0 && c4 == 0)
S_14(c2 + c5);
if (c0 == 0 && c3 == 0)
S_19(c1 + c4, c2 + c5);
S_27(c0 + c3, c2 + c5, c1 + c4);
}
}
if (c1 + 31 >= n)
for (int c5 = max(0, c0 - c2 + c3); c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1)
S_29(-c0 + c2 - c3 + c5, c0 + c3);
}
if (c1 + 31 >= n)
for (int c5 = max(0, c0 - c2 + c3); c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1)
S_29(-c0 + c2 - c3 + c5, c0 + c3);
}
if (c0 + 31 >= m && c1 + 31 >= n && c2 == c0) {
for (int c5 = m - c0 - 1; c5 <= min(31, 2 * m - c0 - 3); c5 += 1)
S_29(-m + c0 + c5 + 1, m - 1);
} else if (m >= c0 + 32 && c1 + 31 >= n && c2 == c0) {
if (c0 + 32 >= m && n >= c1 && c1 + 31 >= n) {
for (int c5 = max(0, m - c2 - 1); c5 <= min(31, 2 * m - c2 - 3); c5 += 1)
S_29(-m + c2 + c5 + 1, m - 1);
} else if (m >= c0 + 33 && n >= c1 + 1 && c1 >= 0 && c1 + 31 >= n && c2 == c0) {
S_29(0, c0 + 31);
}
} else if (c1 + 31 >= n && c2 >= m) {
for (int c3 = max(0, (c2 / 2) - c0 + 1); c3 <= min(31, m - c0 - 1); c3 += 1)
for (int c5 = 0; c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1)
S_29(-c0 + c2 - c3 + c5, c0 + c3);
} else if (c1 <= -32 && c1 + 31 >= n && m >= c2 + 1) {
for (int c3 = max(0, (c2 / 2) - c0 + 1); c3 <= min(31, m - c0 - 1); c3 += 1)
for (int c5 = max(0, c0 - c2 + c3); c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1)
S_29(-c0 + c2 - c3 + c5, c0 + c3);
}
if (m == 1 && c0 == 0 && c1 >= 32 && c2 == 0) {
} else if (c1 >= 32 && c2 == 0) {
for (int c4 = 0; c4 <= min(31, n - c1 - 1); c4 += 1)
S_19(c1 + c4, 0);
} else if (m == 1 && n >= 1 && c0 == 0 && c1 == 0 && c2 == 0) {
} else if (c1 == 0 && c2 == 0) {
S_14(0);
for (int c4 = 0; c4 <= min(31, n - 1); c4 += 1)
S_19(c4, 0);

View File

@ -1,3 +1,5 @@
for (int c0 = 1; c0 <= 5; c0 += 1)
for (int c1 = t1 - 64 * b + 64; c1 <= min(70, -((c0 - 1) % 2) - c0 + 73); c1 += 64)
A(c0, 64 * b + c1 - 8);
if (c0 <= 3 || (b == 1 && t1 + c0 >= 10) || (t1 == 5 && b == 1 && c0 == 4))
for (int c1 = t1 - 64 * b + 64; c1 <= min(70, -c0 + 73); c1 += 64)
if (c0 <= 3 || (t1 + c0 >= 10 && c1 == t1) || c1 == 5)
A(c0, 64 * b + c1 - 8);

View File

@ -1,7 +1,7 @@
for (int c0 = 0; c0 <= 3; c0 += 1)
for (int c1 = max(2 * c0 - 3, c0 / 2); c1 <= min(3, c0 + 1); c1 += 1)
for (int c1 = max(0, 2 * c0 - 3); c1 <= min(3, c0 + 1); c1 += 1)
for (int c2 = c0; c2 <= min(min(3, 2 * c0 - c1 + 1), 3 * c1 + 2); c2 += 1)
for (int c3 = max(max(max(0, c1 - (-c1 + 3) / 3), 2 * c0 - (c0 + c1 + 1) / 3 - 1), c2 + floord(3 * c1 - c2 - 1, 6)); c3 <= min(3, c0 + 1); c3 += 1)
for (int c3 = max(max(max(0, c1 - (-c1 + 3) / 3), c0 - (-c2 + 3) / 3), c2 + floord(3 * c1 - c2 - 1, 6)); c3 <= min(3, c0 + 1); c3 += 1)
for (int c4 = max(max(max(max(-200 * c1 + 400 * c3 - 199, 250 * c3 + 1), 667 * c0 - 333 * c1 - (c0 + c1 + 3) / 3 - 332), 333 * c1 + c1 / 3), 333 * c2 + (c2 + 1) / 3); c4 <= min(min(min(min(1000, 500 * c0 + 499), -200 * c1 + 400 * c3 + 400), 333 * c2 - (-c2 + 3) / 3 + 333), 333 * c3 - (-c3 + 3) / 3 + 334); c4 += 1)
for (int c5 = max(max(max(c4, 1000 * c0 - c4), 1000 * c3 - 2 * c4 + 2), 500 * c1 + (c4 + 1) / 2); c5 <= min(min(min(2 * c4 + 1, 1000 * c0 - c4 + 999), 1000 * c3 - 2 * c4 + 1001), 500 * c1 + (c4 + 1) / 2 + 499); c5 += 1)
s0(c0, c1, c2, c3, c4, c5);

View File

@ -1,5 +1,5 @@
for (int c0 = 0; c0 <= 3; c0 += 1)
for (int c1 = max(0, 2 * c0 - 3); c1 <= min(3, c0 + 1); c1 += 1)
for (int c1 = max(0, 2 * c0 - 3); c1 <= min(c0 + 1, -c0 + 6); c1 += 1)
for (int c2 = c0; c2 <= min(min(3, 2 * c0 - c1 + 1), 3 * c1 + 2); c2 += 1)
for (int c3 = max(max(max(0, c1 - (-c1 + 3) / 3), c0 - (-c2 + 3) / 3), c2 + floord(3 * c1 - c2 - 1, 6)); c3 <= min(3, c0 + 1); c3 += 1)
for (int c5 = max(max(max(max(0, 2 * c3 - 4), c1 - (-c1 + 3) / 3), c2 - (c2 + 3) / 3), c3 - (c3 + 3) / 3); c5 <= min(min(c1 + 1, c3), -c2 + 2 * c3 - (c2 + 3) / 3 + 2); c5 += 1)

View File

@ -1,25 +1,23 @@
{
if (c2 >= d2 + 1) {
for (int c0 = a1; c0 <= b1; c0 += 1)
for (int c1_0 = c1; c1_0 <= d1; c1_0 += 1)
s0(c0, c1_0);
} else {
for (int c0 = a1; c0 <= min(b1, a2 - 1); c0 += 1)
for (int c1_0 = c1; c1_0 <= d1; c1_0 += 1)
s0(c0, c1_0);
if (c2 >= d2 + 1) {
for (int c0 = max(a1, a2); c0 <= min(b1, b2); c0 += 1)
for (int c1_0 = c1; c1_0 <= d1; c1_0 += 1)
for (int c0 = a2; c0 <= b2; c0 += 1) {
if (c0 >= a1 && b1 >= c0)
for (int c1_0 = c1; c1_0 <= min(d1, c2 - 1); c1_0 += 1)
s0(c0, c1_0);
} else {
for (int c0 = a2; c0 <= b2; c0 += 1) {
if (c0 >= a1 && b1 >= c0)
for (int c1_0 = c1; c1_0 <= min(d1, c2 - 1); c1_0 += 1)
s0(c0, c1_0);
for (int c1_0 = c2; c1_0 <= d2; c1_0 += 1) {
if (c0 >= a1 && b1 >= c0 && c1_0 >= c1 && d1 >= c1_0)
s0(c0, c1_0);
s1(c0, c1_0);
}
if (c0 >= a1 && b1 >= c0)
for (int c1_0 = max(c1, d2 + 1); c1_0 <= d1; c1_0 += 1)
s0(c0, c1_0);
for (int c1_0 = c2; c1_0 <= d2; c1_0 += 1) {
if (c0 >= a1 && b1 >= c0 && c1_0 >= c1 && d1 >= c1_0)
s0(c0, c1_0);
s1(c0, c1_0);
}
if (c0 >= a1 && b1 >= c0)
for (int c1_0 = max(c1, d2 + 1); c1_0 <= d1; c1_0 += 1)
s0(c0, c1_0);
}
for (int c0 = max(max(a1, a2), b2 + 1); c0 <= b1; c0 += 1)
for (int c1_0 = c1; c1_0 <= d1; c1_0 += 1)

View File

@ -1,33 +1,31 @@
{
if (c2 >= d2 + 1) {
for (int c0 = a1; c0 <= b1; c0 += 1)
for (int c1_0 = c1; c1_0 <= d1; c1_0 += 1)
s0(c0, c1_0);
} else {
for (int c0 = a1; c0 <= min(b1, a2 - 1); c0 += 1)
for (int c1_0 = c1; c1_0 <= d1; c1_0 += 1)
s0(c0, c1_0);
if (c2 >= d2 + 1) {
for (int c0 = max(a1, a2); c0 <= min(b1, b2); c0 += 1)
for (int c1_0 = c1; c1_0 <= d1; c1_0 += 1)
for (int c0 = a2; c0 <= b2; c0 += 1) {
if (a1 >= c0 + 1) {
for (int c1_0 = c2; c1_0 <= d2; c1_0 += 1)
s1(c0, c1_0);
} else if (c0 >= b1 + 1) {
for (int c1_0 = c2; c1_0 <= d2; c1_0 += 1)
s1(c0, c1_0);
} else {
for (int c1_0 = c1; c1_0 <= min(d1, c2 - 1); c1_0 += 1)
s0(c0, c1_0);
} else {
for (int c0 = a2; c0 <= b2; c0 += 1) {
if (a1 >= c0 + 1) {
for (int c1_0 = c2; c1_0 <= d2; c1_0 += 1)
s1(c0, c1_0);
} else if (c0 >= b1 + 1) {
for (int c1_0 = c2; c1_0 <= d2; c1_0 += 1)
s1(c0, c1_0);
} else {
for (int c1_0 = c1; c1_0 <= min(d1, c2 - 1); c1_0 += 1)
s0(c0, c1_0);
for (int c1_0 = c2; c1_0 <= min(c1 - 1, d2); c1_0 += 1)
s1(c0, c1_0);
for (int c1_0 = max(c1, c2); c1_0 <= min(d1, d2); c1_0 += 1) {
s0(c0, c1_0);
s1(c0, c1_0);
}
for (int c1_0 = max(c1, d2 + 1); c1_0 <= d1; c1_0 += 1)
s0(c0, c1_0);
for (int c1_0 = max(max(c1, d1 + 1), c2); c1_0 <= d2; c1_0 += 1)
s1(c0, c1_0);
for (int c1_0 = c2; c1_0 <= min(c1 - 1, d2); c1_0 += 1)
s1(c0, c1_0);
for (int c1_0 = max(c1, c2); c1_0 <= min(d1, d2); c1_0 += 1) {
s0(c0, c1_0);
s1(c0, c1_0);
}
for (int c1_0 = max(c1, d2 + 1); c1_0 <= d1; c1_0 += 1)
s0(c0, c1_0);
for (int c1_0 = max(max(c1, d1 + 1), c2); c1_0 <= d2; c1_0 += 1)
s1(c0, c1_0);
}
}
for (int c0 = max(max(a1, a2), b2 + 1); c0 <= b1; c0 += 1)

View File

@ -2,14 +2,14 @@
write_shared_A(3, ((t1 + 3) % 4) + 1, ((t2 + 31) % 32) + 1);
if (t2 >= 1 && t2 <= 2 && t1 % 3 == 0)
write_shared_A(3, (-t1 / 3) + 4, t2 + 32);
if ((t1 >= 1 && t1 <= 2 && t2 >= 3 && t2 <= 4) || ((-((t1 + 3) % 4) + t2 + 30) % 32) + t1 >= -4 * ((-t1 + 4) / 4) + 4)
if (((-((t1 + 3) % 4) + t2 + 30) % 32) + t1 >= ((t1 + 3) % 4) + ((t2 + 1) % 2) - 4 * ((-t1 + 4) / 4) + 1)
write_shared_A(3, ((t1 + 3) % 4) + 5, -((((t1 + 3) % 4) - t2 + 33) % 32) + t1 + 4 * ((-t1 + 4) / 4) + 32);
if (t1 >= 1 && t2 >= t1 + 1 && t2 <= 4)
write_shared_A(3, t1 + 4, t2 + 32);
write_shared_A(4, ((t1 + 3) % 4) + 1, ((t2 + 31) % 32) + 1);
if (t2 >= 1 && t2 <= 2 && t1 % 3 == 0)
write_shared_A(4, (-t1 / 3) + 4, t2 + 32);
if ((t1 >= 1 && t1 <= 2 && t2 >= 3 && t2 <= 4) || ((-((t1 + 3) % 4) + t2 + 30) % 32) + t1 >= -4 * ((-t1 + 4) / 4) + 4)
if (((-((t1 + 3) % 4) + t2 + 30) % 32) + t1 >= ((t1 + 3) % 4) + ((t2 + 1) % 2) - 4 * ((-t1 + 4) / 4) + 1)
write_shared_A(4, ((t1 + 3) % 4) + 5, -((((t1 + 3) % 4) - t2 + 33) % 32) + t1 + 4 * ((-t1 + 4) / 4) + 32);
if (t1 >= 1 && t2 >= t1 + 1 && t2 <= 4)
write_shared_A(4, t1 + 4, t2 + 32);

View File

@ -1,5 +1,5 @@
{
if (nn >= 128 * g + 6 && nn >= ((t1 + 127) % 128) + 128 * g + 3 && ((t1 + 127) % 128) + 128 * g >= 0)
if (g >= 0 && nn >= 128 * g + 6 && nn >= ((t1 + 127) % 128) + 128 * g + 3)
for (int c1 = 393214; c1 < nn - 1; c1 += 393216)
A(c1, ((t1 + 127) % 128) + 128 * g + 1, ((t1 + 127) % 128) + 1);
if (t1 >= 1 && t1 <= 2 && nn >= t1 + 128 * g + 130 && t1 + 128 * g >= -127)