loki.transformations.array_indexing.demote

Utilities for demoting the rank of array variables.

Functions

demote_variables(routine, variable_names, ...)

Demote a list of array variables by removing any occurence of a provided set of dimension symbols.

demote_variables(routine, variable_names, dimensions)

Demote a list of array variables by removing any occurence of a provided set of dimension symbols.

Parameters:
  • routine (Subroutine) – The subroutine in which the variables should be promoted.

  • variable_names (list of str) – The names of variables to be promoted. Matching of variables against names is case-insensitive.

  • dimensions (pymbolic.Expression or tuple) – Symbol name or tuple of symbol names representing the dimension to remove from all occurances of the named variables.