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

✨ SiQAD coordinate iteration #223

Merged
merged 13 commits into from
May 24, 2023
Merged

Conversation

wlambooy
Copy link
Contributor

@wlambooy wlambooy commented May 22, 2023

Description

This PR extracts coord_iterator from the offset namespace and instead allows for specialisations depending on the CoordinateType template argument. The default implementation for offset coordinates is left in tact, and a specialisation for SiQAD coordinates is added. Additionally, print_charge_layout is updated to use this new way of iteration over SiQAD coordinates.

Lastly, a mistake in the documentation of coordinate, ground_coordinate, foreach_coordinate, and foreach_ground_coordinate was found: the end bound was stated to be inclusive, but this is not the case. I have added (exclusive) in order to avoid further confusion.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

include/fiction/layouts/coordinates.hpp Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Merging #223 (0953003) into main (27223ad) will increase coverage by 0.11%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #223      +/-   ##
==========================================
+ Coverage   94.31%   94.42%   +0.11%     
==========================================
  Files          82       82              
  Lines        7406     7431      +25     
==========================================
+ Hits         6985     7017      +32     
+ Misses        421      414       -7     
Impacted Files Coverage Δ
include/fiction/io/print_layout.hpp 95.13% <100.00%> (-0.07%) ⬇️
include/fiction/layouts/cartesian_layout.hpp 98.25% <100.00%> (-0.02%) ⬇️
include/fiction/layouts/coordinates.hpp 99.43% <100.00%> (+4.13%) ⬆️
include/fiction/layouts/hexagonal_layout.hpp 98.50% <100.00%> (-0.01%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27223ad...0953003. Read the comment docs.

@marcelwa marcelwa added enhancement New feature or request small fix Non-critical issue or inconsistency labels May 23, 2023
Copy link
Collaborator

@marcelwa marcelwa left a comment

Choose a reason for hiding this comment

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

Functionality-wise, everything looks nice—just a couple of nit-picky comments regarding structure.

include/fiction/io/print_layout.hpp Show resolved Hide resolved
include/fiction/layouts/coordinates.hpp Outdated Show resolved Hide resolved
include/fiction/layouts/coordinates.hpp Show resolved Hide resolved
test/layouts/coordinates.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

include/fiction/layouts/coordinates.hpp Show resolved Hide resolved
marcelwa
marcelwa previously approved these changes May 23, 2023
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@wlambooy
Copy link
Contributor Author

The volume of a SiQAD coodinate returns (x + 1) * (y + 1) * (z * 1) like the other coordinate types. Perhaps this should be reviewed. I left the SiQAD coordinates out of the coordinate types to test the volume for.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@wlambooy wlambooy requested a review from marcelwa May 24, 2023 10:42
Copy link
Collaborator

@marcelwa marcelwa left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Many thanks once again for your effort!

@marcelwa marcelwa merged commit 6a58846 into cda-tum:main May 24, 2023
@wlambooy wlambooy deleted the siqad-coord-iteration branch May 26, 2023 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request small fix Non-critical issue or inconsistency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants