From d62c77af410aa1d0c86f0f92ee87bcc1051efce4 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sat, 6 May 2023 16:57:29 +0300 Subject: [PATCH] =?UTF-8?q?add=20threshold=20for=20reshape-based=20?= =?UTF-8?q?=E2=8E=89+n=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/builtins/cells.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builtins/cells.c b/src/builtins/cells.c index 9d22b01d..d43801f3 100644 --- a/src/builtins/cells.c +++ b/src/builtins/cells.c @@ -488,7 +488,7 @@ NOINLINE B for_cells_AS(B f, B w, B x, ur wcr, ur wr, u32 chr) { if (isPervasiveDy(f)) { if (isAtm(x)) return c2(f, w, x); if (RNK(x)!=wcr || !eqShPart(SH(x), wsh+wk, wcr)) goto generic; - if (TI(w,elType)==el_B || TI(x,elType)==el_B) goto generic; + if (TI(w,elType)==el_B || TI(x,elType)==el_B || (IA(x)>500 && IA(w)!=IA(x))) goto generic; return c2(f, w, C2(shape, C1(fne, incG(w)), x)); } } @@ -525,7 +525,7 @@ NOINLINE B for_cells_SA(B f, B w, B x, ur xcr, ur xr, u32 chr) { if (isPervasiveDy(f)) { if (isAtm(w)) return c2(f, w, x); if (RNK(w)!=xcr || !eqShPart(SH(w), xsh+xk, xcr)) goto generic; - if (TI(w,elType)==el_B || TI(x,elType)==el_B) goto generic; + if (TI(w,elType)==el_B || TI(x,elType)==el_B || (IA(w)>500 && IA(w)!=IA(x))) goto generic; return c2(f, C2(shape, C1(fne, incG(x)), w), x); } }