<project.out>.trafo
The file <project.out>.trafo contains the list of the transformation
matrices used and their inverse matrices, plus a list of vectors indicating
the indices that make up the basis of the transformation and linear combinations
for each index bound by a loop that does not build a base vector for the
transformation.
(See also the format of the <project.out>.qual file)
Read:
- Directory targout, File functionList.cc,
Function functionList::loadAffineFunctions
(only transformations)
- Directory targout, File transformations.cc,
Function prepareVarTrafos
(only usage vectors and linear combijnations)
- Directory dispo2, File trafomat.cc, Function
load_trafos
Write: Directory targgen, File save_targout.cc,
Function save_all_for_targout
Format:
file --> num_stat [<func_and_inv>] num_stat [<uvect_and_lincombs>]
(where <func_and_inv> and <uvect_and_lincombs> occur
num_stat times)
func_and_inv --> stat_ID 1 <func> <func>
(where the second occurrence of <func> corresponds to
the transformation matrix T, while the first one
corresponds to its inverse)
func --> n_vars n_pars n_rows <matrix>
matrix --> denom [entry]
uvect_and_lincombs --> stat_ID <uvect> <all_lincombs>
uvect --> ulength [<is_used>]
(with is_used occurring ulength times and
the n-th occurrence being 1, iff the n-th outermost
loop built a base vector for the transformation)
is_used --> 1|0
all_lincombs --> nr_lincombs [<lincomb>]
(where <lincomb> occurs nr_lincombs times)
lincomb --> nr_coef lin_denom [coef]
(with coef occurring coef_nr times)
where
- num_stat is the number of statements in the target program
- stat_ID is the target statement number of a statement in the
target program
- n_vars is the number of variables taken into account
by an affine mapping
- n_pars is the number of parameters taken into account
by an affine mapping
- n_rows is the number of rows of a matrix defining
an affine mapping
- entry is the numerator part of a matrix entry
- CONSISTENCY CONDITIONS:
- the i-th column of the trafo matrix corresponds to the i-th outermost source loop surrounding the statement
- the i-th row of the trafo matrix corresponds to the i-th outermost, non-trivial
target loop (the trivial, i.e., linearly dependent dimensions are dropped; thus, even in, e.g., synchronous programs, the first row might be a placement if the schedule of that statement is constantly 0)
- the name entry j of the i-th outermost loop is not necessarily
equal to i, but gives the column (or row) number of the variable in coefficient
vectors/matrices such as inequality systems describing the index set (since
matrix entries are enumerated from 0, but names from 1, the column/row is
j-1)
- denom is the denominator of a matrix
- ulength is the number of loops surrounding a statement
in the transformed parse tree
- CONSISTENCY CONDITIONS:
- ulength is NOT always equal to the number of surrounding loops in the
original parse tree
- ulength can be greater than the number of surrounding loops in the original
parse tree, if
dim(schedule) + dim(alloc) < dim(origISPC)
- the number of 1-entries in the used vector (is_used) is
equal to the number of rows/columns in the trafo matrix for the statement
that represent index variable dimensions
- ulength is always equal to the length of the loop quality vector
- nr_lincombs is the number of loops not building
up a base vector for the transformation (i.e. the number
of linear combinations)
- nr_coef is the number of coefficients of base
vectors in a linear combination representing the
dimension of a loop that did not build up a base
vector for the transformation
- lin_denom is the denominator of a linear
combination as described above
- coef (in its n-th occurrence)
is the coefficient of the n-th base vector in
a linear combination as described
above
- the n-th entry in
[ lincombs ]
stands for the linear
combination for the n-th not-0 entry in the used-vector
- the n-th coefficient stands for the n-th not-0 variable in
the used-vector.
The remaining coefficients stand for all parameters
and the 1-constant.
Peter Faber, 14.11.1997