Skip to content

Commit 4f15bc9

Browse files
committed
Add monomial ordering to hash table
1 parent 261f792 commit 4f15bc9

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/neogb/data.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ struct ht_t
130130
len_t ebl; /* elimination block length:
131131
* degree + #elimination variables,
132132
* 0 if no elimination order */
133+
int32_t mo; /* monomial ordering: 0=DRL, 1=LEX */
133134
len_t nv; /* number of variables */
134135
len_t evl; /* real length of exponent vector,
135136
* includes degree (or two degrees

src/neogb/hash.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ ht_t *initialize_basis_hash_table(
5353

5454
ht_t *ht = (ht_t *)malloc(sizeof(ht_t));
5555
ht->nv = nv;
56+
ht->mo = st->mo;
5657
/* generate map */
5758
ht->bpv = (len_t)((CHAR_BIT * sizeof(sdm_t)) / (unsigned long)nv);
5859
if (ht->bpv == 0) {
@@ -136,6 +137,7 @@ ht_t *copy_hash_table(
136137
ht_t *ht = (ht_t *)malloc(sizeof(ht_t));
137138

138139
ht->nv = bht->nv;
140+
ht->mo = bht->mo;
139141
ht->evl = bht->evl;
140142
ht->ebl = bht->ebl;
141143
ht->hsz = bht->hsz;
@@ -187,6 +189,7 @@ ht_t *initialize_secondary_hash_table(
187189

188190
ht_t *ht = (ht_t *)malloc(sizeof(ht_t));
189191
ht->nv = bht->nv;
192+
ht->mo = bht->mo;
190193
ht->evl = bht->evl;
191194
ht->ebl = bht->ebl;
192195

0 commit comments

Comments
 (0)