summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-07-25 09:16:23 +0530
committersinanmohd <sinan@sinanmohd.com>2024-07-25 09:16:23 +0530
commit2800f12b040c7ce6da24bc7a99aa04b0ffb76fab (patch)
tree0a968c143069eba11fe7e828b29c487e151ac38b /src
parentb8f8d12de38228845ab5cb822668dcd359c43581 (diff)
solver_greedy -> solver_conformity
Diffstat (limited to 'src')
-rw-r--r--src/evanix.c30
-rw-r--r--src/meson.build4
-rw-r--r--src/queue.c2
-rw-r--r--src/solver_conformity.c (renamed from src/solver_greedy.c)4
4 files changed, 20 insertions, 20 deletions
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;