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

✨ Option for efficient determination of non-operational status #602

Open
wants to merge 78 commits into
base: main
Choose a base branch
from

Conversation

Drewniok
Copy link
Collaborator

@Drewniok Drewniok commented Dec 3, 2024

Description

This PR adds an option to efficiently determine if a layout is non-operational. This is achieved by applying the pruning strategies from QuickCell.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have added a changelog entry.
  • I have created/adjusted the Python bindings for any new or updated functionality.
  • 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.

@Drewniok Drewniok added the enhancement New feature or request label Dec 3, 2024
@Drewniok Drewniok self-assigned this Dec 3, 2024
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 94.64945% with 29 lines in your changes missing coverage. Please review.

Project coverage is 98.11%. Comparing base (a363f8a) to head (f7085e2).

Files with missing lines Patch % Lines
...tion/algorithms/simulation/sidb/is_operational.hpp 88.60% 26 Missing and 1 partial ⚠️
...n/algorithms/physical_design/design_sidb_gates.hpp 94.28% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #602      +/-   ##
==========================================
- Coverage   98.13%   98.11%   -0.02%     
==========================================
  Files         232      232              
  Lines       35410    35680     +270     
  Branches     1691     1703      +12     
==========================================
+ Hits        34748    35009     +261     
- Misses        660      670      +10     
+ Partials        2        1       -1     
Files with missing lines Coverage Δ
...ude/fiction/algorithms/iter/bdl_input_iterator.hpp 99.12% <100.00%> (-0.88%) ⬇️
...imulation/sidb/calculate_energy_and_state_type.hpp 100.00% <100.00%> (ø)
...lgorithms/simulation/sidb/critical_temperature.hpp 93.00% <100.00%> (ø)
.../algorithms/simulation/sidb/operational_domain.hpp 94.35% <100.00%> (-0.12%) ⬇️
.../fiction/algorithms/simulation/sidb/quickexact.hpp 100.00% <100.00%> (ø)
.../algorithms/simulation/sidb/verify_logic_match.hpp 100.00% <100.00%> (ø)
include/fiction/layouts/cell_level_layout.hpp 100.00% <100.00%> (ø)
...fiction/technology/charge_distribution_surface.hpp 99.85% <100.00%> (+0.44%) ⬆️
include/fiction/utils/truth_table_utils.hpp 100.00% <100.00%> (ø)
test/algorithms/iter/bdl_input_iterator.cpp 96.87% <ø> (ø)
... and 11 more

... and 3 files 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 a363f8a...f7085e2. Read the comment docs.

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/utils/truth_table_utils.hpp Outdated Show resolved Hide resolved
include/fiction/utils/truth_table_utils.hpp Outdated Show resolved Hide resolved
@Drewniok Drewniok requested a review from marcelwa December 4, 2024 15:51
Signed-off-by: GitHub Actions <[email protected]>
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

@Drewniok
Copy link
Collaborator Author

7245945 shows the following runtimes:

grafik

@Drewniok
Copy link
Collaborator Author

@marcelwa, I have now fixed the Windows CI issue. This means that this PR will no longer change significantly.

@marcelwa
Copy link
Collaborator

@marcelwa, I have now fixed the Windows CI issue. This means that this PR will no longer change significantly.

Fantastic! 🎉 In other words, I can finalize my review?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Drewniok, add the latest version before merging.

@Drewniok
Copy link
Collaborator Author

@marcelwa, I have now fixed the Windows CI issue. This means that this PR will no longer change significantly.

Fantastic! 🎉 In other words, I can finalize my review?

That would be great! I think we will be the fastest overall if you finish it, although there might be some issues I could realize if I go through it again carefully.

include/fiction/utils/truth_table_utils.hpp Show resolved Hide resolved
[[nodiscard]] inline uint64_t determine_output(const std::vector<kitty::dynamic_truth_table>& truth_tables,
const uint64_t current_input_index) noexcept
{
std::bitset<64> bits{};
Copy link
Collaborator

Choose a reason for hiding this comment

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

The choice of return type and this variable limit the input size of truth_tables to 64. However, no error handling is conducted in case truth_tables.size() > 64. Maybe an std::vector<bool> is a more suitable return type for this function.

include/fiction/utils/truth_table_utils.hpp Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants