Skip to content

Commit

Permalink
vconvert methods
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Feb 9, 2024
1 parent be50c94 commit cbf6789
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/llvm_intrin/conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ end
### `vconvert(::Type{<:NativeTypes}, x)` methods. These forward to `vconvert(::Type{Vec{W,T}}, x)`
@inline vconvert(::Type{T}, s::T) where {T<:NativeTypes} = s
@inline vconvert(::Type{T}, s::T) where {T<:IntegerTypesHW} = s
@inline vconvert(::Type{T}, s::NativeTypes) where {T<:NativeTypes} = s
@inline vconvert(::Type{T}, s::Union{Float16,Float32,Float64}) where {T<:IntegerTypesHW} = Base.fptosi(T, Base.trunc_llvm(s))
@inline vconvert(::Type{T}, s::IntegerTypesHW) where {T<:Union{Float16,Float32,Float64}} = convert(T, s)::T
@inline vconvert(::Type{T}, s::Union{Float16,Float32,Float64}) where {T<:Union{Float16,Float32,Float64}} = convert(T, s)::T
@inline vconvert(::Type{T}, s::IntegerTypesHW) where {T<:IntegerTypesHW} = s % T
@inline vconvert(::Type{T}, v::AbstractSIMD{W,T}) where {T<:NativeTypes,W} = v
@inline vconvert(::Type{T}, v::AbstractSIMD{W,S}) where {T<:NativeTypes,S,W} =
Expand Down

0 comments on commit cbf6789

Please sign in to comment.