File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,16 +210,16 @@ function _core_groebner_basis_array(
210210
211211 # convert to julia array, also give memory management to julia
212212 jl_ld = gb_ld[]
213- jl_len = Int32 .(Base . unsafe_wrap (Array, gb_len[], jl_ld))
214- jl_exp = Int32 .(Base . unsafe_wrap (Array, gb_exp[], nr_terms * nr_vars))
213+ jl_len = Int32[ deepcopy ( unsafe_load ( gb_len[], i)) for i in 1 : jl_ld]
214+ jl_exp = Int32[ deepcopy ( unsafe_load ( gb_exp[], i)) for i in 1 : ( nr_terms * nr_vars)]
215215
216216 # coefficient handling depending on field characteristic
217217 if field_char == 0
218218 ptr = reinterpret (Ptr{BigInt}, gb_cf[])
219- jl_cf = BigInt .( [deepcopy (unsafe_load (ptr, i)) for i in 1 : nr_terms])
219+ jl_cf = BigInt[deepcopy (unsafe_load (ptr, i)) for i in 1 : nr_terms]
220220 else
221221 ptr = reinterpret (Ptr{Int32}, gb_cf[])
222- jl_cf = Int32 .(Base . unsafe_wrap (Array, ptr, nr_terms))
222+ jl_cf = Int32[ deepcopy ( unsafe_load ( ptr, i)) for i in 1 : nr_terms]
223223 end
224224
225225 ccall ((:free_f4_julia_result_data , libneogb), Nothing,
You can’t perform that action at this time.
0 commit comments