@@ -410,28 +410,17 @@ Annotation Node types Origin
410410Loop Node
411411^^^^^^^^^
412412
413- The `Loop ` node is sub-classed in all of the domains supported by
414- PSyclone. This then allows the class to be configured with a
415- domain-specific list of valid loop 'types'. For instance, the GOcean
416- sub-class, `GOLoop `, has "inner" and "outer" while the LFRic
417- (dynamo0.3) sub-class, `DynLoop `, has "dofs", "colours", "colour", ""
418- and "null". The default loop type (iterating over cells) is here
419- indicated by the empty string. The concept of a "null" loop type is
420- currently required because the dependency analysis that determines the
421- placement of halo exchanges is handled within the `Loop ` class. As a
422- result, every `Kernel ` call must be associated with a `Loop ` node.
423- However, the LFRic domain has support for kernels which operate on the
424- 'domain' and thus do not require a loop over cells or dofs in the
425- generated PSy layer. Supporting a `DynLoop ` of "null" type allows us
426- to retain the dependence-analysis functionality within the `Loop `
427- while not actually producing a loop in the generated code. When
428- `#1148 <https://github.com/stfc/PSyclone/issues/1148 >`_ is tackled,
429- the dependence-analysis functionality will be removed from
430- the `Loop ` class and this concept of a "null" loop can be dropped.
413+ The `Loop ` node is the cannonical representation of a bounded loop, it
414+ has the start, stop, step and loop_body of the loop as its children. The
415+ node has the same semantics than the Fortran do construct: the boundary
416+ values are inclusive (both are part of the iteration space) and the start,
417+ stop and step expressions are evaluated just once at the beginning of the
418+ loop.
431419
432420For more details on the `Loop ` node, see the full API in the
433421:ref_guide: `reference guide psyclone.psyir.nodes.html#psyclone.psyir.nodes.Loop `.
434422
423+
435424Ranges
436425------
437426
@@ -790,11 +779,53 @@ symbols, transformations, front-ends and back-ends. None of this is
790779domain specific.
791780
792781To obtain domain-specific concepts the language-level PSyIR can be
793- specialised or extended. In LFRic there are specialisations for
782+ specialised or extended. All domains follow the PSyKAl separation of
783+ concerns with the Algorithm-layer and the PSy-layer having its own
784+ domain-specific concepts, this can be found in
785+ ``psyclone.domain.common.algorithm `` and ``psyclone.domain.common.psylayer ``
786+ respectively (some concepts are still on ``psyclone.psyGen `` for legacy
787+ reasons but will be moved to the new locations over time).
788+
789+ PSy-layer concepts
790+ ------------------
791+
792+ * The `PSyLoop ` is a `Loop ` where the boundaries are given by the domain
793+ specific iteration space that the kernels are applied to. In turn it is
794+ sub-classed in all of the domains supported by PSyclone. This then allows
795+ the class to be configured with a list of valid loop 'types'. For instance,
796+ the GOcean sub-class, `GOLoop `, has "inner" and "outer" while the LFRic
797+ (dynamo0.3) sub-class, `DynLoop `, has "dofs", "colours", "colour", ""
798+ and "null". The default loop type (iterating over cells) is here
799+ indicated by the empty string. The concept of a "null" loop type is
800+ currently required because the dependency analysis that determines the
801+ placement of halo exchanges is handled within the `Loop ` class. As a
802+ result, every `Kernel ` call must be associated with a `Loop ` node.
803+ However, the LFRic domain has support for kernels which operate on the
804+ 'domain' and thus do not require a loop over cells or dofs in the
805+ generated PSy layer. Supporting a `DynLoop ` of "null" type allows us
806+ to retain the dependence-analysis functionality within the `Loop `
807+ while not actually producing a loop in the generated code. When
808+ `#1148 <https://github.com/stfc/PSyclone/issues/1148 >`_ is tackled,
809+ the dependence-analysis functionality will be removed from
810+ the `Loop ` class and this concept of a "null" loop can be dropped.
811+ * The `Kern `, which can be of type `CodedKern `, `InlinedKern ` or `BuiltIn `
812+ are the singular units of computation that can be found inside a
813+ `PSyLoop `.
814+ * The `HaloExchange ` is a distributed-memory concept in the PSy-layer.
815+ * The `GlobalSum ` is a distributed-memory concept in the PSy-layer.
816+
817+
818+ Other specializations
819+ ---------------------
820+
821+ In LFRic there are specialisations for
794822kernel-layer datatypes and symbols. For the algorithm layer in both
795823GOcean1.0 and LFRic there are specialisations for invokes and kernel
796824calls. This is discussed further in the following sections.
797825
826+
827+
828+
798829The LFRic PSyIR
799830===============
800831
0 commit comments