From 7509d0c2384f44ea02e17512a38834b4e4e500f0 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sat, 30 Nov 2024 20:22:58 +0200 Subject: [PATCH] don't shadow types --- src/singeli/src/lut.singeli | 6 +++--- src/singeli/src/squeeze.singeli | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/singeli/src/lut.singeli b/src/singeli/src/lut.singeli index b4bff848..6f3a4e5b 100644 --- a/src/singeli/src/lut.singeli +++ b/src/singeli/src/lut.singeli @@ -38,7 +38,7 @@ local def loader{G} = { def unzip_load{E, n, TG} = each{merge, unzip_load{E, n/2, TG}, unzip_load{E, n/2, TG{'offset', E, n}}} def unzip_load{E, n, TG if width{E}*n <= arch_defvw} = each{tup, unzip{TG{[n]E, 0}, TG{[n]E, 1}}} -def widen_tup{u32, is:([16]u8)} = tup{ # compiler will deduplicate all the repeated calls of this on the same is +def widen_tup{(u32), is:([16]u8)} = tup{ # compiler will deduplicate all the repeated calls of this on the same is widen{[8]u32, is}, widen{[8]u32, shuf{[2]u64, is, 1,1}}, } @@ -194,8 +194,8 @@ def lut_gen{mode, E, nt, ni if hasarch{'AARCH64'} and mode=='i' and E==u64 and n def lut16{tab:([16]u8), idxs:([16]u8)} = shuf{[16]u8, tab, idxs} def lut16{tab:([16]u8), idxs:([32]u8) if hasarch{'X86_64'}} = shuf{[16]u8, pair{tab, tab}, idxs} -def shuf_u8bits{inds:*u8, ni} = 0 -def shuf_u8bits{inds:*u8, ni if has_sel} = { +def shuf_u8bits{inds:(*u8), ni} = 0 +def shuf_u8bits{inds:(*u8), ni if has_sel} = { def I = [16]u8 v0:= I**0 v1:= I**0 diff --git a/src/singeli/src/squeeze.singeli b/src/singeli/src/squeeze.singeli index af4f0023..b4507004 100644 --- a/src/singeli/src/squeeze.singeli +++ b/src/singeli/src/squeeze.singeli @@ -3,8 +3,8 @@ include './mask' include './cbqnDefs' include './vecfold' -def is_sNaN{x:[_]u64} = tup{homAny, inRangeLen{x<<1, (0xFFE<<52)+2, (1<<52)-2}} -def is_sNaN{x:[2]u64 if hasarch{'X86_64'} and not hasarch{'SSE4.2'}} = { # avoiding i64 comparisons +def is_sNaN{x:[_](u64)} = tup{homAny, inRangeLen{x<<1, (0xFFE<<52)+2, (1<<52)-2}} +def is_sNaN{x:[2](u64) if hasarch{'X86_64'} and not hasarch{'SSE4.2'}} = { # avoiding i64 comparisons def nan = unord{[2]f64~~x, [2]f64~~x} def qnan = re_el{u64, [4]u32**0xFFF8_0000 == ([4]u32~~x | [4]u32**0x8000_0000)} tup{topAny, nan &~ qnan} @@ -20,7 +20,7 @@ def any_nonC32{M, x:T=[_]_ if hasarch{'X86_64'}} = { def ne = H~~x != H**cast_i{u32, cbqn_c32Tag{}<<16} topAny{M{T~~ne}} } -def any_nonC32{(maskNone), x:[k]u64, y:[k]u64} = { +def any_nonC32{(maskNone), x:[k](u64), y:[k](u64)} = { def T32 = [k*2]u32 def hi = shufInd{T32~~x, T32~~y, match(k) { {2} => tup{1,3,5,7}