Skip to content

Commit 6ff2f24

Browse files
authored
Type-assert vconverts to circumvent inferrence restriction on recursion (#109)
1 parent 1f886a1 commit 6ff2f24

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/llvm_intrin/conversion.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ if (Sys.ARCH === :x86_64) || (Sys.ARCH === :i686)
6969
@inline function vconvert(
7070
::Type{Vec{W,F}},
7171
v::Vec{W,T}
72-
) where {W,F<:FloatingTypes,T<:IntegerTypesHW}
72+
)::Vec{W,F} where {W,F<:FloatingTypes,T<:IntegerTypesHW}
7373
_vconvert(Vec{W,F}, v, True())
7474
end
7575
@inline function vconvert(
7676
::Type{Vec{W,F}},
7777
v::Vec{W,T}
78-
) where {W,F<:FloatingTypes,T<:Union{UInt64,Int64}}
78+
)::Vec{W,F} where {W,F<:FloatingTypes,T<:Union{UInt64,Int64}}
7979
_vconvert(
8080
Vec{W,F},
8181
v,
@@ -85,7 +85,7 @@ if (Sys.ARCH === :x86_64) || (Sys.ARCH === :i686)
8585
@inline function vconvert(
8686
::Type{F},
8787
v::VecUnroll{N,W,T,Vec{W,T}}
88-
) where {N,W,F<:FloatingTypes,T<:Union{UInt64,Int64}}
88+
)::VecUnroll{N,W,F,Vec{W,F}} where {N,W,F<:FloatingTypes,T<:Union{UInt64,Int64}}
8989
_vconvert(
9090
Vec{W,F},
9191
v,
@@ -95,7 +95,7 @@ if (Sys.ARCH === :x86_64) || (Sys.ARCH === :i686)
9595
@inline function vconvert(
9696
::Type{Vec{W,F}},
9797
v::VecUnroll{N,W,T,Vec{W,T}}
98-
) where {N,W,F<:FloatingTypes,T<:Union{UInt64,Int64}}
98+
)::VecUnroll{N,W,F,Vec{W,F}} where {N,W,F<:FloatingTypes,T<:Union{UInt64,Int64}}
9999
_vconvert(
100100
Vec{W,F},
101101
v,
@@ -105,7 +105,7 @@ if (Sys.ARCH === :x86_64) || (Sys.ARCH === :i686)
105105
@inline function vconvert(
106106
::Type{VecUnroll{N,W,F,Vec{W,F}}},
107107
v::VecUnroll{N,W,T,Vec{W,T}}
108-
) where {N,W,F<:FloatingTypes,T<:Union{UInt64,Int64}}
108+
)::VecUnroll{N,W,F,Vec{W,F}} where {N,W,F<:FloatingTypes,T<:Union{UInt64,Int64}}
109109
_vconvert(
110110
Vec{W,F},
111111
v,
@@ -116,7 +116,7 @@ else
116116
@generated function vconvert(
117117
::Type{Vec{W,F}},
118118
v::Vec{W,T}
119-
) where {W,F<:FloatingTypes,T<:IntegerTypesHW}
119+
)::Vec{W,F} where {W,F<:FloatingTypes,T<:IntegerTypesHW}
120120
convert_func(T <: Signed ? "sitofp" : "uitofp", F, W, T)
121121
end
122122
end

0 commit comments

Comments
 (0)