Contiguous/non-contiguous decorator #1608
EmilyBourne
started this conversation in
Ideas
Replies: 2 comments 14 replies
-
Can you please share a minimal working example? |
Beta Was this translation helpful? Give feedback.
14 replies
-
If you add the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@dominikbell noticed that the compilation time for Pyccel became significantly slower when we released version 1.8.0.
One reason for this is that the wrapper is now more complicated as it also handles slices. This is not useful for every application.
Additionally knowing that an array is contiguous allows some compilers to provide additional optimisations (Fortran provides a keyword for this).
I wonder if it would be useful to add an
@contiguous
decorator? This would act similarly to the@allow_negative_indexes
decorator and would lead to the mentioned array being marked ascontiguous
in Fortran. Additionally it would remove the need for the step parameter in the wrapper. In the example provided by @dominikbell this change reduces the time spent compiling the wrapper by half.Beta Was this translation helpful? Give feedback.
All reactions