# loki.transformations.temporaries.tests.test_hoist_variables

A selection of tests for the (generic) hoist variables functionalities.

Functions

`check_arguments`(scheduler, ...[, ...]) | Check the subroutine and call arguments of each subroutine.
`check_variable_declaration`(item, key) |
`compile_and_test`(scheduler, path[, a, ...]) | Compile the source code and call the driver function in order to test the results for correctness.
`fixture_config`() | Default configuration dict with basic options.
`fixture_here`() |
`fixture_testdir`(here) |
`test_hoist`(tmp_path, testdir, frontend, ...) | Basic testing of the non-modified Hoist functionality, thus hoisting all (non-parameter) local variables.
`test_hoist_allocatable`(tmp_path, testdir, ...) | Testing hoist functionality for local arrays with variable `a` in the array dimensions using the `HoistTemporaryArraysAnalysis` for the Analysis part and a Synthesis implementation using declaring hoisted arrays as allocatable, including allocation and de-allocation using `HoistTemporaryArraysTransformationAllocatable`.
`test_hoist_arrays`(tmp_path, testdir, ...) | Testing hoist functionality for local arrays using the `HoistTemporaryArraysAnalysis` for the Analysis part.
`test_hoist_arrays_inline`(tmp_path, testdir, ...) | Testing hoist functionality for local arrays using the `HoistTemporaryArraysAnalysis` for the Analysis part.
`test_hoist_dim_alias`(tmp_path, testdir, ...) | Test that temporaries declared with an aliased dimension aren't repeated.
`test_hoist_dim_mapping`(tmp_path, frontend, ...) |
`test_hoist_disable`(tmp_path, testdir, ...) | Basic testing of the non-modified Hoist functionality excluding/disabling some subroutines, thus hoisting all (non-parameter) local variables for the non-disabled subroutines.
`test_hoist_mixed_variable_declarations`(...) |
`test_hoist_specific_variables`(tmp_path, ...) | Testing hoist functionality for local arrays with variable `a` in the array dimensions using the `HoistTemporaryArraysAnalysis` for the Analysis part.

fixture_here()

fixture_testdir(here)

fixture_config()

  Default configuration dict with basic options.

compile_and_test(scheduler, path, a=(5,), frontend='', test_name='', items=None, inline=False)

  Compile the source code and call the driver function in order to test the results for correctness.

check_arguments(scheduler, subroutine_arguments, call_arguments, call_kwarguments, driver_item=None, driver_name=None, include_device_functions=False, include_another_driver=True, subroutine_mod=None)

  Check the subroutine and call arguments of each subroutine.

test_hoist(tmp_path, testdir, frontend, config, as_kwarguments)

  Basic testing of the non-modified Hoist functionality, thus hoisting all (non-parameter) local variables.

test_hoist_disable(tmp_path, testdir, frontend, config, as_kwarguments)

  Basic testing of the non-modified Hoist functionality excluding/disabling some subroutines, thus hoisting all (non-parameter) local variables for the non-disabled subroutines.

test_hoist_arrays_inline(tmp_path, testdir, frontend, config, as_kwarguments)

  Testing hoist functionality for local arrays using the `HoistTemporaryArraysAnalysis` for the Analysis part. The hoisted kernel contains inline function calls.

test_hoist_arrays(tmp_path, testdir, frontend, config, as_kwarguments)

  Testing hoist functionality for local arrays using the `HoistTemporaryArraysAnalysis` for the Analysis part.

test_hoist_specific_variables(tmp_path, testdir, frontend, config, as_kwarguments)

  Testing hoist functionality for local arrays with variable `a` in the array dimensions using the `HoistTemporaryArraysAnalysis` for the Analysis part.

check_variable_declaration(item, key)

test_hoist_allocatable(tmp_path, testdir, frontend, config, as_kwarguments)

  Testing hoist functionality for local arrays with variable `a` in the array dimensions using the `HoistTemporaryArraysAnalysis` for the Analysis part and a Synthesis implementation using declaring hoisted arrays as allocatable, including allocation and de-allocation using `HoistTemporaryArraysTransformationAllocatable`.

test_hoist_mixed_variable_declarations(tmp_path, frontend, config)

test_hoist_dim_mapping(tmp_path, frontend, config, remap_dimensions)

test_hoist_dim_alias(tmp_path, testdir, frontend, config)

  Test that temporaries declared with an aliased dimension aren’t repeated.