diff --git a/src/singeli/src/dyarith.singeli b/src/singeli/src/dyarith.singeli index cef86a92..a6def3ba 100644 --- a/src/singeli/src/dyarith.singeli +++ b/src/singeli/src/dyarith.singeli @@ -15,6 +15,7 @@ def ty_dbl{T & i16==T} = i32 def ty_dbl{T & i32==T} = i64 def ty_dbl{T & isvec{T}} = [vcount{T}/2](ty_dbl{eltype{T}}) def dcast_i{x} = ext{ty_dbl{type{x}}, x} +def to_el{E, x:T} = cast_v{[width{T}/width{E}]E, x} # get mask of first n items; n>0 & n