Skip to content

Commit 8b6e96d

Browse files
author
Rafael Mohr
committed
remove restriction on nr of variables
1 parent 36e4142 commit 8b6e96d

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/siggb/hashtable.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ end
3434

3535
# initialize and set fields for basis hashtable
3636
function initialize_basis_hash_table(::Val{N}) where N
37-
38-
# for now at most 64 variables
39-
if N > 64
40-
error("At most 64 variables currently supported.")
41-
end
4237

4338
# not necessary to create `initial_size` exponents
4439
exponents = Vector{Monomial{N}}(undef, init_ht_size)
@@ -50,8 +45,7 @@ function initialize_basis_hash_table(::Val{N}) where N
5045
size = init_ht_size
5146

5247
# initialize fast divisibility params
53-
int64bits = 64
54-
ndivbits = div(64, N)
48+
ndivbits = div(DivMaskSize, N)
5549
# division mask stores at least 1 bit
5650
# per each of first ndivvars variables
5751
ndivbits == 0 && (ndivbits += 1)

src/siggb/monomials.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ function divmask(e::Monomial{N},
121121
ctr = one(DivMask)
122122
res = zero(DivMask)
123123
o = one(DivMask)
124+
lb = N > DivMaskSize ? N - DivMaskSize : 1
124125
for i in N:-1:1
125126
for j in 1:ndivbits
126127
@inbounds if e.exps[i] >= divmap[ctr]

src/siggb/typedefs.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const Exp = Int16
77
const MonIdx = Int32
88
const MonHash = UInt32
99
const DivMask = UInt64
10+
const DivMaskSize = 64
1011
# stuff for matrix
1112
const ColIdx = UInt32
1213
const Coeff = UInt32

0 commit comments

Comments
 (0)