psyclone.domain.gocean.transformations.gocean_loop_fuse_trans

This module contains the GOcean-specific loop-fusion transformation.

Classes

class psyclone.domain.gocean.transformations.gocean_loop_fuse_trans.GOceanLoopFuseTrans

GOcean API specialisation of the base class in order to fuse two GOcean loops after performing validity checks (e.g. that the loops are over the same grid-point type). For example:

>>> from psyclone.parse.algorithm import parse
>>> from psyclone.psyGen import PSyFactory
>>> ast, invokeInfo = parse("shallow_alg.f90")
>>> psy = PSyFactory("gocean1.0").create(invokeInfo)
>>> schedule = psy.invokes.get('invoke_0').schedule
>>> print(schedule.view())
>>>
>>> from psyclone.transformations import GOceanLoopFuseTrans
>>> ftrans = GOceanLoopFuseTrans()
>>> ftrans.apply(schedule[0], schedule[1])
>>> print(schedule.view())

Inheritance

Inheritance diagram of GOceanLoopFuseTrans
validate(node1, node2, options=None)

Checks if it is valid to apply the GOceanLoopFuseTrans transform. It ensures that the fused loops are over the same grid-point types, before calling the normal LoopFuseTrans validation function.

Parameters:
Raises: