Skip to content

Commit

Permalink
Merge pull request #126 from yuyichao/pointer
Browse files Browse the repository at this point in the history
Use pointer instead of unsafe_convert
  • Loading branch information
sumiya11 authored Feb 27, 2024
2 parents 3a524cd + 81a0e60 commit f076974
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/utils/simd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ end
($textir, "entry"),
Bool,
Tuple{Ptr{T}, Ptr{T}, Int64},
Base.unsafe_convert(Ptr{T}, a) + sizeof(T) * offset,
Base.unsafe_convert(Ptr{T}, b) + sizeof(T) * offset,
pointer(a) + sizeof(T) * offset,
pointer(b) + sizeof(T) * offset,
length(a) - offset
)
end
Expand Down Expand Up @@ -235,8 +235,8 @@ end
($textir, "entry"),
Bool,
Tuple{Ptr{T}, Ptr{T}, Int64},
Base.unsafe_convert(Ptr{T}, a) + sizeof(T) * offset,
Base.unsafe_convert(Ptr{T}, b) + sizeof(T) * offset,
pointer(a) + sizeof(T) * offset,
pointer(b) + sizeof(T) * offset,
length(a) - offset
)
end
Expand Down Expand Up @@ -349,8 +349,8 @@ end
($textir, "entry"),
Bool,
Tuple{Ptr{T}, Ptr{T}, Int64},
Base.unsafe_convert(Ptr{T}, a) + sizeof(T) * offset,
Base.unsafe_convert(Ptr{T}, b) + sizeof(T) * offset,
pointer(a) + sizeof(T) * offset,
pointer(b) + sizeof(T) * offset,
length(a) - offset
)
end
Expand Down Expand Up @@ -467,8 +467,8 @@ end
($textir, "entry"),
Bool,
Tuple{Ptr{T}, Ptr{T}, Int64},
Base.unsafe_convert(Ptr{T}, a) + sizeof(T) * offset,
Base.unsafe_convert(Ptr{T}, b) + sizeof(T) * offset,
pointer(a) + sizeof(T) * offset,
pointer(b) + sizeof(T) * offset,
length(a) - offset
)
end
Expand Down

0 comments on commit f076974

Please sign in to comment.