SSoelvsten / cal

University of California BDD Package
https://ssoelvsten.github.io/cal/
Other
2 stars 2 forks source link

Move depth-first threshold into a CMake/Run-time variable #11

Open SSoelvsten opened 1 year ago

SSoelvsten commented 1 year ago

Currently, there is a hardcoded value of 219 threshold that switches whether an algorithm should be run with depth-first or with breadth-first operations. Yet, this variable was set based on hardware from the end of the 90s.

Hence, it would be useful if this variable could be changed more easily. This can be done in one of two ways:

  1. Turn it into a CMake variable that is then injected with the preprocessor.
  2. Turn the threshold into a global variable that you can change at run-time.
  3. Turn the threshold into a global variable that is set during initialisation based on the amount of available memory (see i-level cuts for Adiar here)
SSoelvsten commented 8 months ago

Alternatively, one can base it off of the available memory. If all inputs and the worst-case output fit into memory, then do it.