Skip to content

Make constexpr variables static or inline #2094

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ndgrigorian
Copy link
Collaborator

This PR proposes changes throughout dpctl to make constexpr variables in namespaces in headers inline and other constexpr variables static

This results in some improvements to binary size and build time

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?
  • If this PR is a work in progress, are you opening the PR as a draft?

Copy link

github-actions bot commented Jun 4, 2025

Copy link

github-actions bot commented Jun 4, 2025

Array API standard conformance tests for dpctl=0.21.0dev0=py310h93fe807_3 ran successfully.
Passed: 1115
Failed: 6
Skipped: 119

@coveralls
Copy link
Collaborator

coveralls commented Jun 4, 2025

Coverage Status

coverage: 84.978% (-0.006%) from 84.984%
when pulling 6edcc21 on inline-static-constexpr-variables
into a26cac1 on master.

this gives these constants external linkage and prevents duplication
@ndgrigorian ndgrigorian force-pushed the inline-static-constexpr-variables branch from efb27bc to 6edcc21 Compare June 5, 2025 23:22
Copy link

github-actions bot commented Jun 6, 2025

Array API standard conformance tests for dpctl=0.21.0dev0=py310h93fe807_5 ran successfully.
Passed: 1114
Failed: 7
Skipped: 119

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.

2 participants