Skip to content

Allow printing of parameters in Fortran#1811

Draft
EmilyBourne wants to merge 39 commits intodevelfrom
devel-issue1807
Draft

Allow printing of parameters in Fortran#1811
EmilyBourne wants to merge 39 commits intodevelfrom
devel-issue1807

Conversation

@EmilyBourne
Copy link
Copy Markdown
Member

@EmilyBourne EmilyBourne commented Mar 29, 2024

Allow the printing of constants as parameter in Fortran. Use this improvement to avoid unnecessary sign checks when using negative indices.

@EmilyBourne EmilyBourne added the blocked Cannot be solved/merged until something else is fixed label Mar 29, 2024
@pyccel-bot
Copy link
Copy Markdown

pyccel-bot bot commented Mar 29, 2024

Hello again! Thank you for this new pull request 🤩.

Please begin by requesting your checklist using the command /bot checklist

@EmilyBourne EmilyBourne linked an issue Apr 2, 2024 that may be closed by this pull request
EmilyBourne added a commit that referenced this pull request May 14, 2024
Print unknown constants using their values. This fixes #1047 but may be
reverted in #1811 to prefer declaring constants with names. However this
PR also adds support for `NaN` in C and an associated test. It also
removes the duplicate `_print_Constant` function.

---------

Co-authored-by: EmilyBourne <[email protected]>
@EmilyBourne EmilyBourne removed the blocked Cannot be solved/merged until something else is fixed label May 14, 2024
EmilyBourne added a commit to pyccel/pyccel-cuda that referenced this pull request May 14, 2024
Print unknown constants using their values. This fixes pyccel#1047 but may be
reverted in pyccel#1811 to prefer declaring constants with names. However this
PR also adds support for `NaN` in C and an associated test. It also
removes the duplicate `_print_Constant` function.

---------

Co-authored-by: EmilyBourne <[email protected]>
@EmilyBourne EmilyBourne self-assigned this May 22, 2024
EmilyBourne added a commit that referenced this pull request Sep 24, 2024
Print unknown constants using their values. This fixes #1047 but may be
reverted in #1811 to prefer declaring constants with names. However this
PR also adds support for `NaN` in C and an associated test. It also
removes the duplicate `_print_Constant` function.

---------

Co-authored-by: EmilyBourne <[email protected]>
EmilyBourne added a commit that referenced this pull request Sep 24, 2024
Print unknown constants using their values. This fixes #1047 but may be
reverted in #1811 to prefer declaring constants with names. However this
PR also adds support for `NaN` in C and an associated test. It also
removes the duplicate `_print_Constant` function.

---------

Co-authored-by: EmilyBourne <[email protected]>
EmilyBourne added a commit that referenced this pull request Sep 24, 2024
Print unknown constants using their values. This fixes #1047 but may be
reverted in #1811 to prefer declaring constants with names. However this
PR also adds support for `NaN` in C and an associated test. It also
removes the duplicate `_print_Constant` function.

---------

Co-authored-by: EmilyBourne <[email protected]>
EmilyBourne added a commit that referenced this pull request Mar 16, 2025
Print all constant C variables with `const` specifier. This helps avoid
warnings in the wrapper stage (see #2200) and may help the compiler. It
may also be relevant for #1811 . Before this PR only arguments with a
`const` specifier were declared as const.
EmilyBourne added a commit that referenced this pull request Jun 19, 2025
Print all constant C variables with `const` specifier. This helps avoid
warnings in the wrapper stage (see #2200) and may help the compiler. It
may also be relevant for #1811 . Before this PR only arguments with a
`const` specifier were declared as const.
@EmilyBourne EmilyBourne mentioned this pull request Jun 19, 2025
EmilyBourne added a commit that referenced this pull request Jun 19, 2025
When creating the release branch I noticed an import which was
accidentally deleted although it is used in the file. This PR puts it
back. The object is used here:
https://github.com/pyccel/pyccel/blob/devel/pyccel/codegen/printing/ccode.py#L2795

This is the fallback case for Constant which we do not use currently
(i.e. it is not currently tested). It will either be removed with
#1811 or will start being used and
tested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve handling of Constant scalars

1 participant