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

MNT: Remove useless variables in Cython code #4196

Merged
merged 5 commits into from
Nov 2, 2022

Conversation

cphyc
Copy link
Member

@cphyc cphyc commented Nov 2, 2022

PR Summary

This removes all unused variables in Cython files as flagged by https://github.com/MarcoGorelli/cython-lint (see #4193).

Additional nits:

  • removed a few useless variables. The few catches were found by compiling with CC="gcc -Werror=unused" CXX="g++ -Werror=unused" python setup.py develop. Note that the project does not compile with the above-mentioned flags due to some function being defined deep in Numpy and not used by yt.
  • brought back support for parallel raycasting for octrees. The issue was that the .hpp file was not compiled with the -fopenmp flag on, so that the OMP pragma was just ignored.

@cphyc cphyc added the dead code removing internal bits that have no effect label Nov 2, 2022
@cphyc cphyc changed the title Remove useless variables MNT: Remove useless variables Nov 2, 2022
@cphyc cphyc changed the title MNT: Remove useless variables MNT: Remove useless variables in Cython code Nov 2, 2022
cphyc added 4 commits November 2, 2022 11:36
This is a C/C++ relicate wihch is unnecessary in Python
The function `self.mask` sets a few private variables,
including `_last_mask_sum`
@neutrinoceros neutrinoceros merged commit 57f3255 into yt-project:main Nov 2, 2022
@cphyc cphyc deleted the cython-remove-unused-var branch November 2, 2022 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dead code removing internal bits that have no effect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants