loki.transformations.array_indexing.vector_notation module
Utilities to manipulate vector notation in array expressions.
- remove_explicit_array_dimensions(routine, calls_only=False)
Remove colon notation from array dimensions within
Subroutineroutine. E.g., convert two-dimensional arrayarr2d(:,:)toarr2dorarr3d(:,:,:)toarr3d, but NOT e.g.,arr(1,:,:).- Parameters:
routine (
Subroutine) – The subroutine to checkcalls_only (bool) – Whether to remove colon notation from array dimensions only from arrays within (inline) calls or all arrays (default: False)
- add_explicit_array_dimensions(routine)
Make dimensions of arrays explicit within
Subroutineroutine. E.g., convert two-dimensional arrayarr2dtoarr2d(:,:)orarr3dtoarr3d(:,:,:).- Parameters:
routine (
Subroutine) – The subroutine to check
- resolve_vector_notation(routine)
Resolve implicit vector notation by inserting explicit loops