Skip to content

Commit

Permalink
SplitReadWrite: improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
awnawab committed Aug 13, 2024
1 parent f4f1496 commit a391277
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions loki/transformations/split_read_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ class SplitReadWriteWalk(Transformer):
"""
A :any:`Transformer` class to traverse the IR, in-place replace read-write
assignments with reads, and build a transformer map for the corresponding writes.
Parameters
----------
dimensions : list
A list of :any:`Dimension` objects corresponding to all :any:`Loop`s in the body.
variable_map : dict
The variable_map of the parent :any:`Subroutine`.
count : int
A running count of the newly created temporaries in the parent :any:`Subroutine` so that
temporaries created by previous ``!$loki split-read-write`` regions are not redefined.
"""

def __init__(self, dimensions, variable_map, count=-1, **kwargs):
Expand Down Expand Up @@ -116,6 +126,11 @@ class SplitReadWriteTransformation(Transformation):
var(jlon, n2) = loki_temp_1(jlon)
enddo
!$loki end split-read-write
Parameters
----------
dimensions : list
A list of :any:`Dimension` objects corresponding to all :any:`Loop`s in the body.
"""

item_filter = (ProcedureItem,)
Expand Down

0 comments on commit a391277

Please sign in to comment.