diff options
-rw-r--r-- | include/solver_conformity.h | 3 | ||||
-rw-r--r-- | include/solver_greedy.h | 3 | ||||
-rw-r--r-- | src/evanix.c | 30 | ||||
-rw-r--r-- | src/meson.build | 4 | ||||
-rw-r--r-- | src/queue.c | 2 | ||||
-rw-r--r-- | src/solver_conformity.c (renamed from src/solver_greedy.c) | 4 |
6 files changed, 23 insertions, 23 deletions
diff --git a/include/solver_conformity.h b/include/solver_conformity.h new file mode 100644 index 0000000..0f6e825 --- /dev/null +++ b/include/solver_conformity.h @@ -0,0 +1,3 @@ +#include "jobs.h" + +int solver_conformity(struct job **job, struct job_clist *q, int32_t resources); diff --git a/include/solver_greedy.h b/include/solver_greedy.h deleted file mode 100644 index b76aed9..0000000 --- a/include/solver_greedy.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "jobs.h" - -int solver_greedy(struct job **job, struct job_clist *q, int32_t resources); diff --git a/src/evanix.c b/src/evanix.c index d7963ee..197beed 100644 --- a/src/evanix.c +++ b/src/evanix.c @@ -6,25 +6,25 @@ #include "build.h" #include "evanix.h" #include "queue.h" -#include "solver_greedy.h" +#include "solver_conformity.h" #include "solver_highs.h" #include "util.h" static const char usage[] = "Usage: evanix [options] expr\n" "\n" - " -h, --help Show help message and quit.\n" - " -f, --flake Build a flake.\n" - " -d, --dry-run Show what derivations would be " + " -h, --help Show help message and quit.\n" + " -f, --flake Build a flake.\n" + " -d, --dry-run Show what derivations would be " "built.\n" - " -s, --system System to build for.\n" - " -m, --max-build Max number of builds.\n" - " -b, --break-evanix Enable experimental features.\n" - " -r, --solver-report Print solver report.\n" - " -p, --pipelined <bool> Use evanix build pipeline.\n" - " -l, --check_cache-status <bool> Perform cache locality check.\n" - " -c, --close-unused-fd <bool> Close stderr on exec.\n" - " -k, --solver highs|greedy Solver to use.\n" + " -s, --system System to build for.\n" + " -m, --max-build Max number of builds.\n" + " -b, --break-evanix Enable experimental features.\n" + " -r, --solver-report Print solver report.\n" + " -p, --pipelined <bool> Use evanix build pipeline.\n" + " -l, --check_cache-status <bool> Perform cache locality check.\n" + " -c, --close-unused-fd <bool> Close stderr on exec.\n" + " -k, --solver conformity|highs Solver to use.\n" "\n"; struct evanix_opts_t evanix_opts = { @@ -36,7 +36,7 @@ struct evanix_opts_t evanix_opts = { .system = NULL, .solver_report = false, .check_cache_status = true, - .solver = solver_greedy, + .solver = solver_conformity, .break_evanix = false, }; @@ -170,8 +170,8 @@ int opts_read(struct evanix_opts_t *opts, char **expr, int argc, char *argv[]) opts->solver_report = true; break; case 'k': - if (!strcmp(optarg, "greedy")) { - opts->solver = solver_greedy; + if (!strcmp(optarg, "conformity")) { + opts->solver = solver_conformity; } else if (!strcmp(optarg, "highs")) { opts->solver = solver_highs; } else { diff --git a/src/meson.build b/src/meson.build index b0dac71..53ba531 100644 --- a/src/meson.build +++ b/src/meson.build @@ -8,14 +8,14 @@ e = executable( 'queue.c', 'build.c', 'jobid.c', - 'solver_greedy.c', + 'solver_conformity.c', 'solver_highs.c', ], include_directories: evanix_inc, dependencies: [ cjson_dep, highs_dep ], install: true, - c_args: [f'-DNIX_EVAL_JOBS_PATH=@NIX_EVAL_JOBS_PATH@'], + c_args: [f'-DNIX_EVAL_JOBS_PATH=@NIX_EVAL_JOBS_PATH@'], ) test('evanix', e) diff --git a/src/queue.c b/src/queue.c index d53dc0d..c3ae7ee 100644 --- a/src/queue.c +++ b/src/queue.c @@ -7,7 +7,7 @@ #include "evanix.h" #include "queue.h" -#include "solver_greedy.h" +#include "solver_conformity.h" #include "util.h" #define MAX_NIX_PKG_COUNT 200000 diff --git a/src/solver_greedy.c b/src/solver_conformity.c index 09b026f..d2b2d82 100644 --- a/src/solver_greedy.c +++ b/src/solver_conformity.c @@ -4,7 +4,7 @@ #include "evanix.h" #include "jobs.h" #include "queue.h" -#include "solver_greedy.h" +#include "solver_conformity.h" #include "util.h" static float conformity(struct job *job); @@ -35,7 +35,7 @@ static float conformity(struct job *job) return conformity; } -int solver_greedy(struct job **job, struct job_clist *q, int32_t resources) +int solver_conformity(struct job **job, struct job_clist *q, int32_t resources) { struct job *j; float conformity_cur; |