loki.transformations.array_indexing.vector_notation
Utilities to manipulate vector notation in array expressions.
Functions
|
Make dimensions of arrays explicit within |
|
Remove colon notation from array dimensions within |
|
Resolve implicit vector notation by inserting explicit loops |
- remove_explicit_array_dimensions(routine, calls_only=False)
Remove colon notation from array dimensions within
Subroutine
routine
. E.g., convert two-dimensional arrayarr2d(:,:)
toarr2d
orarr3d(:,:,:)
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
Subroutine
routine
. E.g., convert two-dimensional arrayarr2d
toarr2d(:,:)
orarr3d
toarr3d(:,:,:)
.- Parameters:
routine (
Subroutine
) – The subroutine to check
- resolve_vector_notation(routine)
Resolve implicit vector notation by inserting explicit loops