From 1e3117d65fedde1da8cd61bbeb99a907d6fe3eda Mon Sep 17 00:00:00 2001 From: dzaima Date: Thu, 29 Dec 2022 22:25:22 +0200 Subject: [PATCH] =?UTF-8?q?fast=20=E2=A5=8A=CB=98=F0=9D=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/builtins/md1.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/builtins/md1.c b/src/builtins/md1.c index 8b59ac23..9a206a88 100644 --- a/src/builtins/md1.c +++ b/src/builtins/md1.c @@ -305,6 +305,15 @@ B cell_c1(Md1D* d, B x) { B f = d->f; Arr* r = TI(x,slice)(x, 0, IA(x)); return taga(arr_shSetU(r, xr+1, rsh)); } + if (rtid==n_shape) { + usz cam = SH(x)[0]; + usz csz = arr_csz(x); + Arr* ra = TI(x,slice)(x,0,IA(x)); + usz* rsh = arr_shAlloc(ra, 2); + rsh[0] = cam; + rsh[1] = csz; + return taga(ra); + } if ((rtid==n_shifta || rtid==n_shiftb) && xr==2) { B xf = getFillR(x); if (!noFill(xf)) return shift_cells(xf, x, TI(x,elType), rtid);