From 8099945068dbcaf2186b112e6b16c7861c185090 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 21 Oct 2024 15:35:03 -0400 Subject: [PATCH] Use vec_select from Singeli select includes --- build/singeliSubmodule | 2 +- src/singeli/src/neon.singeli | 10 +++------- src/singeli/src/sse.singeli | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/build/singeliSubmodule b/build/singeliSubmodule index 0620571f..d432cb71 160000 --- a/build/singeliSubmodule +++ b/build/singeliSubmodule @@ -1 +1 @@ -Subproject commit 0620571fadc7d2e35c322d0945421ce3f0283bf2 +Subproject commit d432cb710911457169da5342d27ce8adffd5dd1a diff --git a/src/singeli/src/neon.singeli b/src/singeli/src/neon.singeli index 2eb0a434..1d5288e1 100644 --- a/src/singeli/src/neon.singeli +++ b/src/singeli/src/neon.singeli @@ -81,12 +81,8 @@ def shufInd{x:T, y:T, {...is} if nvec{T,32} and same{is, 1+2*range{vcount{T}}}} def trn{x:T, y:T, 0 if nvec{T}} = emit{T, ntyp{'vtrn1', T}, x, y} def trn{x:T, y:T, 1 if nvec{T}} = emit{T, ntyp{'vtrn2', T}, x, y} -def sel{L, x:T, i:I if lvec{L,16,8} and w128{T} and nvec{I, 8}} = re_el{eltype{T}, emit{I, ntyp{'vqtbl1',I}, re_el{eltype{I},x}, ty_u{i}}} -def sel{{x0:T}, i:I} = sel{T, x0, i} -def sel{{...xs}, i:I if length{xs}>=2 and length{xs}<=4 and allSame{each{type,xs}} and lvec{oneType{xs},16,8} and nvec{I, 8}} = { - def T = oneType{xs} - re_el{eltype{T}, emit{I, ntyp{merge{'unpacked_vqtbl',fmtnat{length{xs}}}, I}, ...each{reinterpret{[16]u8,.}, xs}, ty_u{i}}} -} +def sel{L, x:T, i:I if lvec{L,16,8} and w128{T} and nvec{I, 8}} = vec_select{eltype{L}, x, i} +def sel{{...xs}, i:I if length{xs}>=1 and length{xs}<=4 and allSame{each{type,xs}} and lvec{oneType{xs},16,8} and nvec{I, 8}} = vec_select{xs, i} @@ -126,7 +122,7 @@ def homMask{x:T=[k]E if nvecu{T} and width{E}>=k} = { truncBits{k, fold_add{x & make{T, 1<