Closed NailLegProcessorDivide closed 1 year ago
These implementations really are awesomely fast :D
I'm working on making accessing a pcube file a bit easier over in #21, FYI! You can cherry-pick or copy paste stuff from there for the time being if you feel like it.
Also renamed PolyCube
to NaivePolyCube
so that it's a bit clearer that it is not the be-all-end-all PolyCube.
Oooh, this manages to calculate N = 14 using ~61 GB of memory! Ran it on a machine with two E5-2630 v3s and 96 GB of ram.
Awesome to see n=14 done Im slightly supprised the memory was so low considering I didnt think I improved the data size that much from something that ran out of memory after N=12 on my 32GB of ram.
One "flaw" in my implementations is they are hard coded to have the data structures statically sized to only work for n<=16 to keep accesses as fast as possible and reduce both heap usage and fragmentation so I should get around to adding checks for that before trying to launch an panicing if anyone gets there with one of them.
If there is a way of making a hashset of N u16s that are dynamic over the life of the program but static to a hashmap I think it would also be a small step but ultimately still far from getting up to N=16 or more.
Is there a way to implement Into for structs in different modules?
I implemented map_pos_to_naive and naive_to_map_pos for now but if I can do it in a more rusty way then it would be nice. I tried From but it seemed like it didnt like it or maybe I just didnt understand the issue.
Wdym? Generally you want to implement From<X> for Y
. That automatically implements Into<Y> for X
by reverse (see From
).
As a note, I think converting from/to RawPCube
is what we should be aiming for for all reprs, since that is the "easiest" and most portable version of a polycube. For all other things we could then just do ThirdRepr::from(RawPCube::from(some_repr))
. That was my plan, at least, but having multiple impls works well too, of course :)
accidentally closed trying to rebase on main, I feel like this is in a good place to merge
Woops, before we get this in: could you cargo fmt
:)
I could have sworn I did. Do you have a specific config? checking out the branch again and running cargo fmt
in the rust/
folder also doesnt show any changes in git for me
and intentionally messing stuff up a bit and re running show unstaged changes that go away again after formatting
My bad, I had checked out the wrong main
. It's formatted already!
@bertie2 if you're available for a review/to merge this, it would be appreciated! It looks good to me, and I think @NailLegProcessorDivide was happy with it as well
Yes, if you could review and merge that would be great!
Done: Add -m mode flag to determine enumeration algo Support -p parallel disable flag for point-list mode
Create polycube_reps file which stores poly cube representations used my my code, I dont Like that its a separate file from existing PolyCube rep but I cant think of how to group it more cleanly