Skip to content

Changing the pattern concept #507

Open
@ddiefenthaler

Description

@ddiefenthaler

While implementing the pattern visualizer I stumbled across the fact that it would be useful to know how many tiles one unit holds. This works for the calling unit, as there is the function local_size(). But there is know way to call this function for different units.

A workaround for this is to use local_extents(unit u). By multiplying those extents up this yields the searched size for normal patterns. This workaround is also used by @rkowalewski in PR #467 (diff).
But unfortunately this breaks for some patterns, i.e. the ShiftTilePattern.

My suggestion is to add a function local_size(unit u) to the pattern concept.
In the same go I would also add the function local_extents() without a parameter which would result in the local extents for the active units.
This is already destined for the function global. For the fact that this is not implemented for all patterns see issue #508 .

The title of this issue is left vague on purpose, as if more changes for the concept arise they should be done in one go.

For the current pattern concept see this section from the code documentation: Pattern Concept

Proposed changes:

  • add size local_size(unit u)
  • add size[d] local_extents()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions