Skip to content

Commit

Permalink
fix(nmod): Add nmod_ctx to store is_prime
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarbenjamin committed Aug 6, 2024
1 parent 069d24d commit 9d225b3
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 85 deletions.
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ classifiers = [
file = "README.md"
content-type = "text/markdown"

[tool.meson-python.args]
setup = [
"-Dadd_flint_rpath=true",
]

[tool.spin]
package = "flint"

Expand Down
12 changes: 10 additions & 2 deletions src/flint/types/nmod.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@ from flint.flint_base.flint_base cimport flint_scalar
from flint.flintlib.flint cimport mp_limb_t
from flint.flintlib.nmod cimport nmod_t

cdef int any_as_nmod(mp_limb_t * val, obj, nmod_t mod) except -1
#cdef int any_as_nmod(mp_limb_t * val, obj, nmod_t mod) except -1
cdef nmod_ctx any_as_nmod_ctx(obj)

cdef class nmod_ctx:
cdef nmod_t mod
cdef bint _is_prime

cdef int any_as_nmod(self, mp_limb_t * val, obj) except -1
cdef nmod _new(self, mp_limb_t * val)

cdef class nmod(flint_scalar):
cdef mp_limb_t val
cdef nmod_t mod
cdef nmod_ctx ctx
Loading

0 comments on commit 9d225b3

Please sign in to comment.