loki.transformations.array_indexing.tests.test_array_indexing
Functions
|
|
|
Test lowering constant array indices |
Test lowering constant array indices for a valid but somewhat academic example ... |
|
|
Test shifting array dimensions to zero (or rather shift dimension dim to dim - 1). |
|
Test flattening or arrays, meaning converting multi-dimensional arrays to one-dimensional arrays including corresponding index arithmetic. |
|
Test flattening or arrays, meaning converting multi-dimensional arrays to one-dimensional arrays including corresponding index arithmetic (for calls). |
Test normalization of array shape and access, thus changing arrays with start index different than "1" to have start index "1". |
- fixture_builder(tmp_path)
- test_transform_normalize_array_shape_and_access(tmp_path, frontend, start_index)
Test normalization of array shape and access, thus changing arrays with start index different than “1” to have start index “1”.
E.g.,
x1(5:len)->`x1(1:len-4)
- test_transform_flatten_arrays(tmp_path, frontend, builder, start_index)
Test flattening or arrays, meaning converting multi-dimensional arrays to one-dimensional arrays including corresponding index arithmetic.
- test_shift_to_zero_indexing(frontend, ignore)
Test shifting array dimensions to zero (or rather shift dimension dim to dim - 1). This does not produce valid Fortran, but is part of the F2C transpilation logic.
- test_transform_flatten_arrays_call(tmp_path, frontend, builder, explicit_dimensions)
Test flattening or arrays, meaning converting multi-dimensional arrays to one-dimensional arrays including corresponding index arithmetic (for calls).
- test_lower_constant_array_indices(tmp_path, frontend, recurse_to_kernels, inline_external_only, pass_as_kwarg)
Test lowering constant array indices
- test_lower_constant_array_indices_academic(tmp_path, frontend, recurse_to_kernels, inline_external_only)
Test lowering constant array indices for a valid but somewhat academic example …
The transformation is capable to handle that, but let’s just hope we’ll never see something like that out there in the wild …