Skip to content

Commit

Permalink
dasd
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma committed Apr 26, 2024
1 parent 5451e72 commit b9fbf39
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/AlgAss/radical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ function _lift!(A::zzModMatrix, B::fpMatrix, Mtemp)
end

function _lift!(A::zzModMatrix, B::FpMatrix, Mtemp::ZZMatrix)
ccall((:fmpz_mod_mat_get_fmpz_mat, libflint), Cvoid, (Ref{ZZMatrix}, Ref{FpMatrix}, Ref{Nemo.fmpz_mod_ctx_struct}), Mtemp, B, base_ring(B).inv)
ccall((:fmpz_mod_mat_get_fmpz_mat, libflint), Cvoid, (Ref{ZZMatrix}, Ref{FpMatrix}, Ref{Nemo.fmpz_mod_ctx_struct}), Mtemp, B, base_ring(B).ninv)
ccall((:fmpz_mat_get_nmod_mat, libflint), Cvoid, (Ref{zzModMatrix}, Ref{ZZMatrix}), A, Mtemp)
return A
end
8 changes: 4 additions & 4 deletions src/Misc/FiniteField.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

function _reduce(a::fqPolyRepFieldElem)
A = parent(a)
#if a.length < 2*degree(A)
if a.length < 2*degree(A)
ccall((:fq_nmod_reduce, libflint), Nothing, (Ref{fqPolyRepFieldElem}, Ref{fqPolyRepField}), a, A)
#else
# ccall((:nmod_poly_rem, libflint), Nothing, (Ref{fqPolyRepFieldElem}, Ref{fqPolyRepFieldElem}, Ref{Nothing}, Ref{Nothing}), a, a, pointer_from_objref(A)+6*sizeof(Int) + 2*sizeof(Ptr{Nothing}), pointer_from_objref(A)+sizeof(ZZRingElem))
#end
else
ccall((:nmod_poly_rem, libflint), Nothing, (Ref{fqPolyRepFieldElem}, Ref{fqPolyRepFieldElem}, Ref{Nothing}, Ref{Nothing}), a, a, pointer_from_objref(A)+6*sizeof(Int) + sizeof(Ptr{Nothing}), pointer_from_objref(A)+sizeof(ZZRingElem))
end
end

function _reduce(a::FqPolyRepFieldElem)
Expand Down
6 changes: 2 additions & 4 deletions src/ModAlgAss/MeatAxe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1176,11 +1176,9 @@ function powermod(f::Zmodn_poly, e::ZZRingElem, g::Zmodn_poly)
if fits(Int, e)
return powermod(f, Int(e), g)
else
_e = BigInt()
z = parent(f)()
ccall((:fmpz_get_mpz, libflint), Nothing, (Ref{BigInt}, Ref{ZZRingElem}), _e, e)
ccall((:nmod_poly_powmod_mpz_binexp, libflint), Nothing,
(Ref{Zmodn_poly}, Ref{Zmodn_poly}, Ref{BigInt}, Ref{Zmodn_poly}),
ccall((:nmod_poly_powmod_fmpz_binexp, libflint), Nothing,
(Ref{Zmodn_poly}, Ref{Zmodn_poly}, Ref{ZZRingElem}, Ref{Zmodn_poly}),
z, f, e, g)
return z
end
Expand Down

0 comments on commit b9fbf39

Please sign in to comment.