aboutsummaryrefslogtreecommitdiff
path: root/TODO/build-options.md
blob: 83b8a34be78a2dbf2bfa635cb0118e0db79a3faa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Build options for memory and multithreading

## Investigate

* Check exactly how much memory is needed for everything.
* Take note of which parts use threading (solving, genptable, other?).

## Prepare code

* Use define / ifdef or similar to compile and build tables only for the
  parts to be used.
* If threads = 1, use a much simpler version of the solve method. Remember
  that checking if enough solutions have been found is the first thing to
  do in singlethread (no locking).
* Do not include pthread if threads = 1. 
* Only one optimal solver should be compiled.
* Some simple steps may also need alternatives with smaller tables
  (e.g. for staying sub 1Gb). For example dr and drfin.
* If necessary, work out alternatives to "twophase" for low-resource versions.

## Makefile

* Figure out how to change these options via makefile. For example: one
  variable for the maximum allowed ram and one for the number of threads.
* (Optional) use a configure script?
* (Optional) interactive installation script?

## Automate

* Scout for resources during installation and choose best configuration
  automatically.
* How to do this in Linux / POSIX?
* How to do this in Windows?

Generated with cgit - Back to sebastiano.tronto.net