Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler: Make code gen of elementary funcs dtype-aware #2349

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

FabioLuporini
Copy link
Contributor

cos(np.float32) now generates cosf(...)

@FabioLuporini FabioLuporini added the bug-C-minor bug in the generated code not affecting correctness label Apr 11, 2024
Copy link

codecov bot commented Apr 11, 2024

Codecov Report

Attention: Patch coverage is 90.32258% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 79.44%. Comparing base (3a8c46e) to head (3c8edea).

Files Patch % Lines
devito/symbolics/printer.py 88.23% 2 Missing ⚠️
devito/symbolics/inspection.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2349   +/-   ##
=======================================
  Coverage   79.44%   79.44%           
=======================================
  Files         232      232           
  Lines       43587    43607   +20     
  Branches     8070     8072    +2     
=======================================
+ Hits        34629    34645   +16     
- Misses       8202     8206    +4     
  Partials      756      756           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@EdCaunt EdCaunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. Approved

@@ -255,6 +274,11 @@ def _print_Fallback(self, expr):
_print_Basic = _print_Fallback


# Lifted from SymPy so that we go through our own `_print_math_func`
for k in ('exp log sin cos tan ceiling floor').split():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it ceil not ceiling

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@FabioLuporini FabioLuporini merged commit 42cce7e into master Apr 12, 2024
31 checks passed
@FabioLuporini FabioLuporini deleted the fix-elementary-dtype branch April 12, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-C-minor bug in the generated code not affecting correctness
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants