Skip to content

Commit

Permalink
JIT parallelize polynomial evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
mhostetter committed Nov 30, 2022
1 parent b64a192 commit 1e1fdd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/galois/_polys/_dense.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,12 @@ def set_globals(self):
MULTIPLY = self.field._multiply.ufunc

_SIGNATURE = numba.types.FunctionType(int64[:](int64[:], int64[:]))
_PARALLEL = True

@staticmethod
def implementation(coeffs, values):
y = np.zeros(values.size, dtype=values.dtype)
for i in range(values.size):
for i in numba.prange(values.size):
y[i] = coeffs[0]
for j in range(1, coeffs.size):
# NOTE: This workaround, using y[i:i+1] instead of y[i], is needed because if ADD = np.bitwise_xor for
Expand Down

0 comments on commit 1e1fdd8

Please sign in to comment.