From a82d9b2266392a858e0a0d50db97a2f52ce517dd Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 19 Mar 2024 18:53:09 +0100 Subject: [PATCH] rulegen:: optimize in 2D, also debug information during optimize is toggleable --- rulegen.cpp | 5 +++++ rulegen3.cpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/rulegen.cpp b/rulegen.cpp index 9552f8ac..15584df5 100644 --- a/rulegen.cpp +++ b/rulegen.cpp @@ -85,6 +85,9 @@ static constexpr flagtype w_less_smart_advance = Flag(23); /*< stop early when e static constexpr flagtype w_no_queued_extensions = Flag(24); /*< consider extensions one by one */ static constexpr flagtype w_no_branch_skipping = Flag(24); /*< do not skip branches */ +/* extra */ +static constexpr flagtype w_optimize2 = Flag(25); /*< optimize in 2D */ + /* for 3D honeycombs */ static constexpr flagtype w_skip_transducers = Flag(32); /*< skip the transducer test */ static constexpr flagtype w_skip_transducer_loops = Flag(33); /*< skip loops during the transducer test */ @@ -2001,6 +2004,8 @@ EX void rules_iteration() { if(examine_branch(id, fb, sb)) checks_to_skip.insert(b); }; + if(WDIM == 2 && (flags & w_optimize2)) optimize(); + if(WDIM == 2) for(int id=0; id