-
Notifications
You must be signed in to change notification settings - Fork 13
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
BDD/Generator API #550
BDD/Generator API #550
Conversation
a1782ba
to
9862fa7
Compare
In multiple places, we want to compare the domain size, where a missing domain is treated as having size 0. We might as well just put this piece of code in one place
…al memory stack There is no need to make an external memory file for this algorithm. Adiar has a minimum requirement of 128 MiB of memory, and even if all levels are present, then they would only require up to 8 MiB of memory. This leaves enough space to open all relevant streams and it will be considerably faster (since we do no unecessary read/writes of tiny files to the disk)
The entire public API does not make use of Adiar's files (with the exception of 'domain_get()' and one overload of 'domain_set(...)', both of which are really only intended for an internal use-case anyway).
e128f44
to
0b98531
Compare
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #550 +/- ##
=============================================
+ Coverage 96.648% 96.653% +0.006%
=============================================
Files 84 83 -1
Lines 5787 5767 -20
=============================================
- Hits 5593 5574 -19
+ Misses 194 193 -1
☔ View full report in Codecov by Sentry. |
Benchmark Report 🟢
Minimum running time (s) for 9-Queens:
|
Benchmark Report 🟢
Minimum running time (s) for 12-Queens:
|
Benchmark Report 🟢
Minimum running time (s) for 14-Queens:
|
Deals with the breaking parts of #452 . The rest I will leave to be implemented another day.
bdd_restrict
with a generator function / iterator.bdd_eval
with a generator function / iterator.Furthermore,
domain_size()
function to remove code duplication (treating no domain as0
).bdd_satmin
andbdd_satmax
that return a cube. Before this change, they put the entire assignment to the disk and then popped it off afterwards. Since the number of levels never exceed 8 MiB, we can just place the entire stack in internal memory.With all of the above, we finally have removed all dependencies on the
adiar::map_pair
class (which seemed like a good idea that point in time, but really just is a mess) and the lifting of files fromadiar::internal
toadiar
. This closes #538 .