pyccel.decorators module#

This module contains all the provided decorator methods.

pyccel.decorators.allow_negative_index(f, *args)[source]#

Decorator indicates that all arrays mentioned as args can be accessed with negative indexes. As a result all non-constant indexing uses a modulo function. This can have negative results on the performance

Parameters:
  • f (Function) – The function to which the decorator is applied

  • args (list of str) – A list containing the names of all arrays which can be accessed with non-constant negative indexes

pyccel.decorators.bypass(f)[source]#
pyccel.decorators.elemental(f)[source]#
pyccel.decorators.inline(f)[source]#

Indicates that function calls to this function should print the function body directly

pyccel.decorators.private(f)[source]#
pyccel.decorators.pure(f)[source]#
pyccel.decorators.stack_array(f, *args)[source]#

Decorator indicates that all arrays mentioned as args should be stored on the stack.

Parameters:
  • f (Function) – The function to which the decorator is applied

  • args (list of str) – A list containing the names of all arrays which should be stored on the stack

pyccel.decorators.sympy(f)[source]#