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 Dec 8, 2022
1 parent 715da06 commit 4ca8b82
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_call_only

_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):
y[i] = ADD(coeffs[j], MULTIPLY(y[i], values[i]))
Expand Down

0 comments on commit 4ca8b82

Please sign in to comment.