From 2b5946c8b3ee807113c38692fa399702db986914 Mon Sep 17 00:00:00 2001 From: Oleksandr Zinenko Date: Mon, 15 Sep 2014 14:07:50 +0200 Subject: [PATCH] Proper skew transformation --- source/transformation.c | 53 ++++- tests/Makefile.am | 7 +- .../must_fail/skew_overflow_statement.c.clay.scop | 2 +- tests/{unitary => must_fail}/skew_statement.c | 0 tests/must_fail/skew_statement.c.clay.scop | 1 + .../skew_statement.c.orig.scop | 0 tests/{unitary => must_fail}/skew_statement1.c | 0 tests/must_fail/skew_statement1.c.clay.scop | 1 + .../skew_statement1.c.orig.scop | 0 tests/unitary/skew_loop1.c.clay.scop | 6 +- tests/unitary/skew_loop1.c.orig.scop | 2 +- tests/unitary/skew_loop2.c.clay.scop | 6 +- tests/unitary/skew_loop2.c.orig.scop | 2 +- tests/unitary/skew_loop3.c | 11 + ...ew_loop1.c.clay.scop => skew_loop3.c.clay.scop} | 18 +- ...ew_loop1.c.orig.scop => skew_loop3.c.orig.scop} | 53 ++--- tests/unitary/skew_statement.c.clay.scop | 148 ------------ tests/unitary/skew_statement1.c.clay.scop | 257 --------------------- 18 files changed, 91 insertions(+), 476 deletions(-) rename tests/{unitary => must_fail}/skew_statement.c (100%) create mode 100644 tests/must_fail/skew_statement.c.clay.scop rename tests/{unitary => must_fail}/skew_statement.c.orig.scop (100%) rename tests/{unitary => must_fail}/skew_statement1.c (100%) create mode 100644 tests/must_fail/skew_statement1.c.clay.scop rename tests/{unitary => must_fail}/skew_statement1.c.orig.scop (100%) create mode 100644 tests/unitary/skew_loop3.c copy tests/unitary/{skew_loop1.c.clay.scop => skew_loop3.c.clay.scop} (90%) copy tests/unitary/{skew_loop1.c.orig.scop => skew_loop3.c.orig.scop} (85%) delete mode 100644 tests/unitary/skew_statement.c.clay.scop delete mode 100644 tests/unitary/skew_statement1.c.clay.scop diff --git a/source/transformation.c b/source/transformation.c index 59b3c15..98593e8 100644 --- a/source/transformation.c +++ b/source/transformation.c @@ -388,14 +388,19 @@ int clay_fuse(osl_scop_p scop, clay_array_p beta_loop, /** - * clay_skew function: - * Skew the loop (or statement) from the `depth'th loop - * (i, j) -> (i, j+i*coeff) where `depth' is the loop of i + * Skew the loop, i.e. add an outer iterator of the loop nest multiplied by the + * coefficient to the current loop iterator. Use the beta-prefix length to + * identify the "target" iteartor, use #depth to identify the outer loop + * ("source") iterator. + * (i, j) -> (i, j+i*coeff). + * Skew applies only to loops by definition. To perform the skewing + * transformation for a statement, split it and then do the skewing, or call + * shift directly. * \param[in,out] scop - * \param[in] beta Beta vector - * \param[in] depth >= 1 - * \param[in] coeff != 0 - * \param[in] options + * \param[in] beta Beta-prefix that identifies the loop to skew + * \param[in] depth Depth of the "source" loop iterator (between 1 and length of beta-prefix) + * \param[in] coeff Coefficient for the "source" iterator. + * \param[in] options Clay options * \return Status */ int clay_skew(osl_scop_p scop, @@ -404,18 +409,43 @@ int clay_skew(osl_scop_p scop, /* Description: * This is a special case of shifting, where params and constant - * are equal to zero + * are equal to zero. + * + * Call clay_shift with the same beta, depth = beta_size and a vector set up + * so that it corresponds to 1*i + coeff*j shifting, i.e. it contains the + * value coeff at depth-s index and 1 at the end, all the other elements + * being zero. + * + * Individual statements cannot be skewed because we do not have information. + * The length of the beta-prefix is used to indentify the loop to skew, which + * would require an addiitonal parameter in case of beta-vector for + * statement. */ if (beta->size == 0) return CLAY_ERROR_BETA_EMPTY; - if (depth <= 0 || depth > beta->size) + if (depth <= 0 || depth >= beta->size) return CLAY_ERROR_DEPTH_OVERFLOW; if (coeff == 0) return CLAY_ERROR_WRONG_COEFF; clay_list_p vector; int i, ret; + osl_statement_p statement; + osl_relation_p scattering; + + // Check if beta matches only loops. + statement = clay_beta_find(scop->statement, beta); + while (statement != NULL) { + for (scattering = statement->scattering; + scattering != NULL; + scattering = scattering->next) { + if (!clay_beta_check_relation(scattering, beta)) + continue; + CLAY_BETA_IS_LOOP(beta, scattering); + } + statement = statement->next; + } // create the vector vector = clay_list_malloc(); @@ -429,8 +459,11 @@ int clay_skew(osl_scop_p scop, for (i = 0 ; i < depth-1 ; i++) clay_array_add(vector->data[0], 0); clay_array_add(vector->data[0], coeff); + for (i = depth + 1; i < beta->size; i++) + clay_array_add(vector->data[0], 0); + clay_array_add(vector->data[0], 1); - ret = clay_shift(scop, beta, depth, vector, options); + ret = clay_shift(scop, beta, beta->size, vector, options); clay_list_free(vector); return ret; diff --git a/tests/Makefile.am b/tests/Makefile.am index 38d4fdb..73eda51 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -90,8 +90,7 @@ UNITARY_TEST_FILES = \ $(top_srcdir)/tests/unitary/reverse_statement2.c \ $(top_srcdir)/tests/unitary/skew_loop1.c \ $(top_srcdir)/tests/unitary/skew_loop2.c \ - $(top_srcdir)/tests/unitary/skew_statement1.c \ - $(top_srcdir)/tests/unitary/skew_statement.c \ + $(top_srcdir)/tests/unitary/skew_loop3.c \ $(top_srcdir)/tests/unitary/stripmine_loop1.c \ $(top_srcdir)/tests/unitary/stripmine_non_pretty.c \ $(top_srcdir)/tests/unitary/stripmine_pretty.c \ @@ -128,8 +127,10 @@ FAIL_TEST_FILES = \ $(top_srcdir)/tests/must_fail/reverse_overflow_loop.c \ $(top_srcdir)/tests/must_fail/reverse_overflow_statement.c \ $(top_srcdir)/tests/must_fail/skew_overflow_loop.c \ - $(top_srcdir)/tests/must_fail/skew_overflow_statement2.c \ $(top_srcdir)/tests/must_fail/skew_overflow_statement.c \ + $(top_srcdir)/tests/must_fail/skew_overflow_statement2.c \ + $(top_srcdir)/tests/must_fail/skew_statement.c \ + $(top_srcdir)/tests/must_fail/skew_statement1.c \ $(top_srcdir)/tests/must_fail/stripmine_not_in_a_loop.c \ $(top_srcdir)/tests/must_fail/context.c \ $(top_srcdir)/tests/must_fail/dimprivatize_cant_privatize.c diff --git a/tests/must_fail/skew_overflow_statement.c.clay.scop b/tests/must_fail/skew_overflow_statement.c.clay.scop index 37b08dd..d7fe890 100644 --- a/tests/must_fail/skew_overflow_statement.c.clay.scop +++ b/tests/must_fail/skew_overflow_statement.c.clay.scop @@ -1 +1 @@ -[Clay] Error: line 1, the beta need to be in a loop +[Clay] Error: line 1, depth overflow diff --git a/tests/unitary/skew_statement.c b/tests/must_fail/skew_statement.c similarity index 100% rename from tests/unitary/skew_statement.c rename to tests/must_fail/skew_statement.c diff --git a/tests/must_fail/skew_statement.c.clay.scop b/tests/must_fail/skew_statement.c.clay.scop new file mode 100644 index 0000000..d123553 --- /dev/null +++ b/tests/must_fail/skew_statement.c.clay.scop @@ -0,0 +1 @@ +[Clay] Error: line 1: the beta is not a loop diff --git a/tests/unitary/skew_statement.c.orig.scop b/tests/must_fail/skew_statement.c.orig.scop similarity index 100% rename from tests/unitary/skew_statement.c.orig.scop rename to tests/must_fail/skew_statement.c.orig.scop diff --git a/tests/unitary/skew_statement1.c b/tests/must_fail/skew_statement1.c similarity index 100% rename from tests/unitary/skew_statement1.c rename to tests/must_fail/skew_statement1.c diff --git a/tests/must_fail/skew_statement1.c.clay.scop b/tests/must_fail/skew_statement1.c.clay.scop new file mode 100644 index 0000000..d123553 --- /dev/null +++ b/tests/must_fail/skew_statement1.c.clay.scop @@ -0,0 +1 @@ +[Clay] Error: line 1: the beta is not a loop diff --git a/tests/unitary/skew_statement1.c.orig.scop b/tests/must_fail/skew_statement1.c.orig.scop similarity index 100% rename from tests/unitary/skew_statement1.c.orig.scop rename to tests/must_fail/skew_statement1.c.orig.scop diff --git a/tests/unitary/skew_loop1.c.clay.scop b/tests/unitary/skew_loop1.c.clay.scop index de30d7d..20d5e80 100644 --- a/tests/unitary/skew_loop1.c.clay.scop +++ b/tests/unitary/skew_loop1.c.clay.scop @@ -38,9 +38,9 @@ SCATTERING 5 11 5 2 0 2 # e/i| c1 c2 c3 c4 c5 | i j | N M | 1 0 -1 0 0 0 0 0 0 0 0 0 ## c1 == 0 - 0 0 -2 0 0 0 1 0 0 0 0 ## -2*c2+i == 0 + 0 0 -1 0 0 0 1 0 0 0 0 ## c2 == i 0 0 0 -1 0 0 0 0 0 0 0 ## c3 == 0 - 0 0 0 0 -1 0 0 1 0 0 0 ## c4 == j + 0 0 -2 0 -1 0 0 1 0 0 0 ## -2*c2-c4+j == 0 0 0 0 0 0 -1 0 0 0 0 0 ## c5 == 0 # ---------------------------------------------- 1.3 Access @@ -121,7 +121,7 @@ b0 i b1 j b2 # File name -./unitary/skew_loop1.c +unitary/skew_loop1.c # Starting line and column 2 0 # Ending line and column diff --git a/tests/unitary/skew_loop1.c.orig.scop b/tests/unitary/skew_loop1.c.orig.scop index 925f633..ac4a862 100644 --- a/tests/unitary/skew_loop1.c.orig.scop +++ b/tests/unitary/skew_loop1.c.orig.scop @@ -176,7 +176,7 @@ b0 i b1 j b2 # File name -./unitary/skew_loop1.c +unitary/skew_loop1.c # Starting line and column 2 0 # Ending line and column diff --git a/tests/unitary/skew_loop2.c.clay.scop b/tests/unitary/skew_loop2.c.clay.scop index f022c8e..d8c850a 100644 --- a/tests/unitary/skew_loop2.c.clay.scop +++ b/tests/unitary/skew_loop2.c.clay.scop @@ -41,11 +41,11 @@ SCATTERING 7 15 7 3 0 3 # e/i| c1 c2 c3 c4 c5 c6 c7 | i j k | N M P | 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 ## c1 == 0 - 0 0 -2 0 0 0 0 0 1 0 0 0 0 0 0 ## -2*c2+i == 0 + 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 ## c2 == i 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 ## c3 == 0 0 0 0 0 -1 0 0 0 0 1 0 0 0 0 0 ## c4 == j 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 ## c5 == 0 - 0 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 ## c6 == k + 0 0 -2 0 0 0 -1 0 0 0 1 0 0 0 0 ## -2*c2-c6+k == 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 ## c7 == 0 # ---------------------------------------------- 1.3 Access @@ -89,7 +89,7 @@ b0 i b1 j b2 k b3 # File name -./unitary/skew_loop2.c +unitary/skew_loop2.c # Starting line and column 2 0 # Ending line and column diff --git a/tests/unitary/skew_loop2.c.orig.scop b/tests/unitary/skew_loop2.c.orig.scop index e8ac6e8..b98b9b2 100644 --- a/tests/unitary/skew_loop2.c.orig.scop +++ b/tests/unitary/skew_loop2.c.orig.scop @@ -131,7 +131,7 @@ b0 i b1 j b2 k b3 # File name -./unitary/skew_loop2.c +unitary/skew_loop2.c # Starting line and column 2 0 # Ending line and column diff --git a/tests/unitary/skew_loop3.c b/tests/unitary/skew_loop3.c new file mode 100644 index 0000000..68c2a02 --- /dev/null +++ b/tests/unitary/skew_loop3.c @@ -0,0 +1,11 @@ +#pragma scop +/* Clay + skew([0,0],1,-1); + */ +for (i = 0; i <= N; i++) { + for (j = 0; j <= M; j++) { + A[i][j] = 0; + } + B[i] = 0; +} +#pragma endscop diff --git a/tests/unitary/skew_loop1.c.clay.scop b/tests/unitary/skew_loop3.c.clay.scop similarity index 90% copy from tests/unitary/skew_loop1.c.clay.scop copy to tests/unitary/skew_loop3.c.clay.scop index de30d7d..ac1b4ca 100644 --- a/tests/unitary/skew_loop1.c.clay.scop +++ b/tests/unitary/skew_loop3.c.clay.scop @@ -38,16 +38,16 @@ SCATTERING 5 11 5 2 0 2 # e/i| c1 c2 c3 c4 c5 | i j | N M | 1 0 -1 0 0 0 0 0 0 0 0 0 ## c1 == 0 - 0 0 -2 0 0 0 1 0 0 0 0 ## -2*c2+i == 0 + 0 0 -1 0 0 0 1 0 0 0 0 ## c2 == i 0 0 0 -1 0 0 0 0 0 0 0 ## c3 == 0 - 0 0 0 0 -1 0 0 1 0 0 0 ## c4 == j + 0 0 1 0 -1 0 0 1 0 0 0 ## c2-c4+j == 0 0 0 0 0 0 -1 0 0 0 0 0 ## c5 == 0 # ---------------------------------------------- 1.3 Access WRITE 3 9 3 2 0 2 # e/i| Arr [1] [2]| i j | N M | 1 - 0 -1 0 0 0 0 0 0 5 ## Arr == a + 0 -1 0 0 0 0 0 0 5 ## Arr == A 0 0 -1 0 1 0 0 0 0 ## [1] == i 0 0 0 -1 0 1 0 0 0 ## [2] == j @@ -60,7 +60,7 @@ WRITE # List of original iterators i j # Statement body expression -a[i][j] = 0; +A[i][j] = 0; # =============================================== Statement 2 @@ -87,7 +87,7 @@ SCATTERING WRITE 2 7 2 1 0 2 # e/i| Arr [1]| i | N M | 1 - 0 -1 0 0 0 0 6 ## Arr == b + 0 -1 0 0 0 0 6 ## Arr == B 0 0 -1 1 0 0 0 ## [1] == i # ---------------------------------------------- 2.4 Statement Extensions @@ -99,7 +99,7 @@ WRITE # List of original iterators i # Statement body expression -b[i] = 0; +B[i] = 0; # =============================================== Extensions @@ -115,13 +115,13 @@ b0 i b1 j b2 2 N 3 j 4 M -5 a -6 b +5 A +6 B # File name -./unitary/skew_loop1.c +unitary/skew_loop3.c # Starting line and column 2 0 # Ending line and column diff --git a/tests/unitary/skew_loop1.c.orig.scop b/tests/unitary/skew_loop3.c.orig.scop similarity index 85% copy from tests/unitary/skew_loop1.c.orig.scop copy to tests/unitary/skew_loop3.c.orig.scop index 925f633..aefa43a 100644 --- a/tests/unitary/skew_loop1.c.orig.scop +++ b/tests/unitary/skew_loop3.c.orig.scop @@ -1,11 +1,10 @@ -[Clan] Info: parsing file #1 (./unitary/skew_loop1.c) # # <| # A # /.\ # <| [""M# # A | # Clan McCloog Castle -# /.\ [""M# [Generated by Clan 0.7.1] +# /.\ [""M# [Generated by Clan 0.8.0] # [""M# | # U"U#U # | # | # \ .:/ # | # | #___| # @@ -26,7 +25,7 @@ # :' ::::8P::::::::::88aa. _ _- -- --_ --- __ --- __-- #.:: :::::::::::::::::::Y88as88a...s88aa. # -# [File generated by the OpenScop Library 0.8.4] +# [File generated by the OpenScop Library 0.9.0] @@ -76,35 +75,22 @@ SCATTERING WRITE 3 9 3 2 0 2 # e/i| Arr [1] [2]| i j | N M | 1 - 0 -1 0 0 0 0 0 0 5 ## Arr == a + 0 -1 0 0 0 0 0 0 5 ## Arr == A 0 0 -1 0 1 0 0 0 0 ## [1] == i 0 0 0 -1 0 1 0 0 0 ## [2] == j # ---------------------------------------------- 1.4 Statement Extensions # Number of Statement Extensions -2 +1 # Number of original iterators 2 # List of original iterators i j # Statement body expression -a[i][j] = 0; +A[i][j] = 0; - -# Number of accesses -1 -# Access coordinates (start/length) -0 7 -# Number of original iterators -2 -# List of original iterators -i j -# Statement body expression -a[i][j] = 0; - - # =============================================== Statement 2 # Number of relations describing the statement: 3 @@ -129,34 +115,21 @@ SCATTERING WRITE 2 7 2 1 0 2 # e/i| Arr [1]| i | N M | 1 - 0 -1 0 0 0 0 6 ## Arr == b + 0 -1 0 0 0 0 6 ## Arr == B 0 0 -1 1 0 0 0 ## [1] == i # ---------------------------------------------- 2.4 Statement Extensions # Number of Statement Extensions -2 +1 # Number of original iterators 1 # List of original iterators i # Statement body expression -b[i] = 0; +B[i] = 0; - -# Number of accesses -1 -# Access coordinates (start/length) -0 4 -# Number of original iterators -1 -# List of original iterators -i -# Statement body expression -b[i] = 0; - - # =============================================== Extensions b0 i b1 j b2 @@ -170,13 +143,13 @@ b0 i b1 j b2 2 N 3 j 4 M -5 a -6 b +5 A +6 B # File name -./unitary/skew_loop1.c +unitary/skew_loop3.c # Starting line and column 2 0 # Ending line and column @@ -186,8 +159,8 @@ b0 i b1 j b2 - skew([0,0], 1, 2); - + skew([0,0],1,-1); + diff --git a/tests/unitary/skew_statement.c.clay.scop b/tests/unitary/skew_statement.c.clay.scop deleted file mode 100644 index 860bcd4..0000000 --- a/tests/unitary/skew_statement.c.clay.scop +++ /dev/null @@ -1,148 +0,0 @@ - - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -0 5 0 0 0 3 - -# Parameters are provided -1 - -P N M - - -# Number of statements -2 - -# =============================================== Statement 1 -# Number of relations describing the statement: -3 - -# ---------------------------------------------- 1.1 Domain -DOMAIN -6 7 2 0 0 3 -# e/i| k i | P N M | 1 - 1 1 0 0 0 0 0 ## k >= 0 - 1 -1 0 1 0 0 -1 ## -k+P-1 >= 0 - 1 0 0 1 0 0 -1 ## P-1 >= 0 - 1 0 1 0 0 0 0 ## i >= 0 - 1 0 -1 0 1 0 0 ## -i+N >= 0 - 1 0 0 0 1 0 0 ## N >= 0 - -# ---------------------------------------------- 1.2 Scattering -SCATTERING -5 12 5 2 0 3 -# e/i| c1 c2 c3 c4 c5 | k i | P N M | 1 - 0 -1 0 0 0 0 0 0 0 0 0 0 ## c1 == 0 - 0 0 -2 0 0 0 1 0 0 0 0 0 ## -2*c2+k == 0 - 0 0 0 -1 0 0 0 0 0 0 0 0 ## c3 == 0 - 0 0 0 0 -1 0 0 1 0 0 0 0 ## c4 == i - 0 0 0 0 0 -1 0 0 0 0 0 0 ## c5 == 0 - -# ---------------------------------------------- 1.3 Access -WRITE -3 10 3 2 0 3 -# e/i| Arr [1] [2]| k i | P N M | 1 - 0 -1 0 0 0 0 0 0 0 5 ## Arr == a - 0 0 -1 0 0 1 0 0 0 0 ## [1] == i - 0 0 0 -1 1 0 0 0 0 0 ## [2] == k - -# ---------------------------------------------- 1.4 Statement Extensions -# Number of Statement Extensions -1 - -# Number of original iterators -2 -# List of original iterators -k i -# Statement body expression -a[i][k] = 0; - - -# =============================================== Statement 2 -# Number of relations describing the statement: -3 - -# ---------------------------------------------- 2.1 Domain -DOMAIN -9 8 3 0 0 3 -# e/i| k i j | P N M | 1 - 1 1 0 0 0 0 0 0 ## k >= 0 - 1 -1 0 0 1 0 0 -1 ## -k+P-1 >= 0 - 1 0 0 0 1 0 0 -1 ## P-1 >= 0 - 1 0 1 0 0 0 0 0 ## i >= 0 - 1 0 -1 0 0 1 0 0 ## -i+N >= 0 - 1 0 0 0 0 1 0 0 ## N >= 0 - 1 0 0 1 0 0 0 0 ## j >= 0 - 1 0 0 -1 0 0 1 0 ## -j+M >= 0 - 1 0 0 0 0 0 1 0 ## M >= 0 - -# ---------------------------------------------- 2.2 Scattering -SCATTERING -7 15 7 3 0 3 -# e/i| c1 c2 c3 c4 c5 c6 c7 | k i j | P N M | 1 - 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 ## c1 == 0 - 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 ## c2 == k - 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 ## c3 == 0 - 0 0 0 0 -1 0 0 0 0 1 0 0 0 0 0 ## c4 == i - 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 1 ## c5 == 1 - 0 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 ## c6 == j - 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 ## c7 == 0 - -# ---------------------------------------------- 2.3 Access -WRITE -4 12 4 3 0 3 -# e/i| Arr [1] [2] [3]| k i j | P N M | 1 - 0 -1 0 0 0 0 0 0 0 0 0 8 ## Arr == b - 0 0 -1 0 0 0 1 0 0 0 0 0 ## [1] == i - 0 0 0 -1 0 0 0 1 0 0 0 0 ## [2] == j - 0 0 0 0 -1 1 0 0 0 0 0 0 ## [3] == k - -# ---------------------------------------------- 2.4 Statement Extensions -# Number of Statement Extensions -1 - -# Number of original iterators -3 -# List of original iterators -k i j -# Statement body expression -b[i][j][k] = 0; - - -# =============================================== Extensions - -b0 k b1 i b2 j b3 - - - -# Number of arrays -8 -# Mapping array-identifiers/array-names -1 k -2 P -3 i -4 N -5 a -6 j -7 M -8 b - - - -# File name -./unitary/skew_statement.c -# Starting line and column -2 0 -# Ending line and column -13 0 -# Indentation -0 - - - - diff --git a/tests/unitary/skew_statement1.c.clay.scop b/tests/unitary/skew_statement1.c.clay.scop deleted file mode 100644 index 9ac0844..0000000 --- a/tests/unitary/skew_statement1.c.clay.scop +++ /dev/null @@ -1,257 +0,0 @@ - - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -0 4 0 0 0 2 - -# Parameters are provided -1 - -N M - - -# Number of statements -5 - -# =============================================== Statement 1 -# Number of relations describing the statement: -3 - -# ---------------------------------------------- 1.1 Domain -DOMAIN -0 4 0 0 0 2 - -# ---------------------------------------------- 1.2 Scattering -SCATTERING -1 5 1 0 0 2 -# e/i| c1 | N M | 1 - 0 -1 0 0 0 ## c1 == 0 - -# ---------------------------------------------- 1.3 Access -WRITE -1 5 1 0 0 2 -# e/i| Arr| N M | 1 - 0 -1 0 0 1 ## Arr == z - -# ---------------------------------------------- 1.4 Statement Extensions -# Number of Statement Extensions -1 - -# Number of original iterators -0 -# Statement body expression -z = 0; - - -# =============================================== Statement 2 -# Number of relations describing the statement: -3 - -# ---------------------------------------------- 2.1 Domain -DOMAIN -3 5 1 0 0 2 -# e/i| i | N M | 1 - 1 1 0 0 0 ## i >= 0 - 1 -1 1 0 0 ## -i+N >= 0 - 1 0 1 0 0 ## N >= 0 - -# ---------------------------------------------- 2.2 Scattering -SCATTERING -3 8 3 1 0 2 -# e/i| c1 c2 c3 | i | N M | 1 - 0 -1 0 0 0 0 0 1 ## c1 == 1 - 0 0 -1 0 1 0 0 0 ## c2 == i - 0 0 0 -1 0 0 0 0 ## c3 == 0 - -# ---------------------------------------------- 2.3 Access -WRITE -2 7 2 1 0 2 -# e/i| Arr [1]| i | N M | 1 - 0 -1 0 0 0 0 4 ## Arr == y - 0 0 -1 1 0 0 0 ## [1] == i - -# ---------------------------------------------- 2.4 Statement Extensions -# Number of Statement Extensions -1 - -# Number of original iterators -1 -# List of original iterators -i -# Statement body expression -y[i] = 0; - - -# =============================================== Statement 3 -# Number of relations describing the statement: -3 - -# ---------------------------------------------- 3.1 Domain -DOMAIN -6 6 2 0 0 2 -# e/i| i j | N M | 1 - 1 1 0 0 0 0 ## i >= 0 - 1 -1 0 1 0 0 ## -i+N >= 0 - 1 0 0 1 0 0 ## N >= 0 - 1 0 1 0 0 0 ## j >= 0 - 1 0 -1 0 1 0 ## -j+M >= 0 - 1 0 0 0 1 0 ## M >= 0 - -# ---------------------------------------------- 3.2 Scattering -SCATTERING -5 11 5 2 0 2 -# e/i| c1 c2 c3 c4 c5 | i j | N M | 1 - 0 -1 0 0 0 0 0 0 0 0 1 ## c1 == 1 - 0 0 -1 0 0 0 1 0 0 0 0 ## c2 == i - 0 0 0 -1 0 0 0 0 0 0 1 ## c3 == 1 - 0 0 0 0 -1 0 0 1 0 0 0 ## c4 == j - 0 0 0 0 0 -1 0 0 0 0 0 ## c5 == 0 - -# ---------------------------------------------- 3.3 Access -WRITE -3 9 3 2 0 2 -# e/i| Arr [1] [2]| i j | N M | 1 - 0 -1 0 0 0 0 0 0 7 ## Arr == a - 0 0 -1 0 1 0 0 0 0 ## [1] == i - 0 0 0 -1 0 1 0 0 0 ## [2] == j - -# ---------------------------------------------- 3.4 Statement Extensions -# Number of Statement Extensions -1 - -# Number of original iterators -2 -# List of original iterators -i j -# Statement body expression -a[i][j] = 0; - - -# =============================================== Statement 4 -# Number of relations describing the statement: -3 - -# ---------------------------------------------- 4.1 Domain -DOMAIN -6 6 2 0 0 2 -# e/i| i j | N M | 1 - 1 1 0 0 0 0 ## i >= 0 - 1 -1 0 1 0 0 ## -i+N >= 0 - 1 0 0 1 0 0 ## N >= 0 - 1 0 1 0 0 0 ## j >= 0 - 1 0 -1 0 1 0 ## -j+M >= 0 - 1 0 0 0 1 0 ## M >= 0 - -# ---------------------------------------------- 4.2 Scattering -SCATTERING -5 11 5 2 0 2 -# e/i| c1 c2 c3 c4 c5 | i j | N M | 1 - 0 -1 0 0 0 0 0 0 0 0 1 ## c1 == 1 - 0 0 -2 0 0 0 1 0 0 0 0 ## -2*c2+i == 0 - 0 0 0 -1 0 0 0 0 0 0 1 ## c3 == 1 - 0 0 0 0 -1 0 0 1 0 0 0 ## c4 == j - 0 0 0 0 0 -1 0 0 0 0 1 ## c5 == 1 - -# ---------------------------------------------- 4.3 Access -WRITE -3 9 3 2 0 2 -# e/i| Arr [1] [2]| i j | N M | 1 - 0 -1 0 0 0 0 0 0 8 ## Arr == b - 0 0 -1 0 1 0 0 0 0 ## [1] == i - 0 0 0 -1 0 1 0 0 0 ## [2] == j - -# ---------------------------------------------- 4.4 Statement Extensions -# Number of Statement Extensions -1 - -# Number of original iterators -2 -# List of original iterators -i j -# Statement body expression -b[i][j] = 0; - - -# =============================================== Statement 5 -# Number of relations describing the statement: -3 - -# ---------------------------------------------- 5.1 Domain -DOMAIN -6 6 2 0 0 2 -# e/i| i j | N M | 1 - 1 1 0 0 0 0 ## i >= 0 - 1 -1 0 1 0 0 ## -i+N >= 0 - 1 0 0 1 0 0 ## N >= 0 - 1 0 1 0 0 0 ## j >= 0 - 1 0 -1 0 1 0 ## -j+M >= 0 - 1 0 0 0 1 0 ## M >= 0 - -# ---------------------------------------------- 5.2 Scattering -SCATTERING -5 11 5 2 0 2 -# e/i| c1 c2 c3 c4 c5 | i j | N M | 1 - 0 -1 0 0 0 0 0 0 0 0 1 ## c1 == 1 - 0 0 -1 0 0 0 1 0 0 0 0 ## c2 == i - 0 0 0 -1 0 0 0 0 0 0 1 ## c3 == 1 - 0 0 0 0 -1 0 0 1 0 0 0 ## c4 == j - 0 0 0 0 0 -1 0 0 0 0 2 ## c5 == 2 - -# ---------------------------------------------- 5.3 Access -WRITE -3 9 3 2 0 2 -# e/i| Arr [1] [2]| i j | N M | 1 - 0 -1 0 0 0 0 0 0 9 ## Arr == c - 0 0 -1 0 1 0 0 0 0 ## [1] == i - 0 0 0 -1 0 1 0 0 0 ## [2] == j - -# ---------------------------------------------- 5.4 Statement Extensions -# Number of Statement Extensions -1 - -# Number of original iterators -2 -# List of original iterators -i j -# Statement body expression -c[i][j] = 0; - - -# =============================================== Extensions - -b0 i b1 j b2 - - - -# Number of arrays -9 -# Mapping array-identifiers/array-names -1 z -2 i -3 N -4 y -5 j -6 M -7 a -8 b -9 c - - - -# File name -./unitary/skew_statement1.c -# Starting line and column -2 0 -# Ending line and column -14 0 -# Indentation -0 - - - - -- 2.11.4.GIT