Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Plewinski
pystencils
Commits
f9bbace0
Commit
f9bbace0
authored
Nov 21, 2016
by
Martin Bauer
Browse files
new CI target to build documentation as artifact
parent
b48605b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
transformations.py
View file @
f9bbace0
...
...
@@ -12,12 +12,13 @@ import pystencils.ast as ast
def
makeLoopOverDomain
(
body
,
functionName
,
iterationSlice
=
None
,
ghostLayers
=
None
,
loopOrder
=
None
):
"""
Uses :class:`pystencils.field.Field.Access` to create (multiple) loops around given AST.
:param body: list of nodes
:param functionName: name of generated C function
:param iterationSlice: if not None, iteration is done only over this slice of the field
:param ghostLayers: a sequence of pairs for each coordinate with lower and upper nr of ghost layers
if None, the number of ghost layers is determined automatically and assumed to be equal for a
all dimensions
if None, the number of ghost layers is determined automatically and assumed to be equal for a
all dimensions
:param loopOrder: loop ordering from outer to inner loop (optimal ordering is same as layout)
:return: :class:`LoopOverCoordinate` instance with nested loops, ordered according to field layouts
"""
...
...
@@ -316,10 +317,11 @@ def moveConstantsBeforeLoop(astNode):
def
splitInnerLoop
(
astNode
,
symbolGroups
):
"""
Splits inner loop into multiple loops to minimize the amount of simultaneous load/store streams
:param astNode: AST root
:param symbolGroups: sequence of symbol sequences: for each symbol sequence a new inner loop is created which
updates these symbols and their dependent symbols. Symbols which are in none of the symbolGroups and which
no symbol in a symbol group depends on, are not updated!
updates these symbols and their dependent symbols. Symbols which are in none of the symbolGroups and which
no symbol in a symbol group depends on, are not updated!
:return: transformed AST
"""
allLoops
=
astNode
.
atoms
(
ast
.
LoopOverCoordinate
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment