more PLAINLOOP

This commit is contained in:
dzaima 2024-02-08 19:26:35 +02:00
parent 9cb0ab2fbb
commit 73a2b06703
3 changed files with 9 additions and 9 deletions

View File

@ -139,7 +139,7 @@ B ud_c2(B t, B w, B x) {
empty|= m==0 | m==l;
rsh[i] = l - m;
}
for (usz i=wr; i<xr; i++) wsh[i] = xsh[i];
PLAINLOOP for (usz i=wr; i<xr; i++) wsh[i] = xsh[i];
if (empty) {
Arr* ra = arr_shSetUG(m_fillarrpEmpty(getFillR(x)), rr, sh);

View File

@ -697,7 +697,7 @@ B join_c1(B t, B x) {
usz* fsh = SH(xf);
if (xr>1) {
usz* xsh = SH(x);
for (usz i = 0; i < xr; i++) sh[i] = xsh[i]*fsh[i];
PLAINLOOP for (usz i = 0; i < xr; i++) sh[i] = xsh[i]*fsh[i];
}
shcpy(sh+xr, fsh+xr, ir-xr);
}
@ -773,12 +773,12 @@ B join_c1(B t, B x) {
usz xia = IA(x);
usz* xsh = SH(x);
usz tlen = 4*xr+2*r0; for (usz a=0; a<xr; a++) tlen+=xsh[a];
TALLOC(usz, st, tlen); // Temp buffer
st[xr-1]=1; for (ur a=xr; a-->1; ) st[a-1] = st[a]*xsh[a]; // Stride
usz* tsh0 = st+xr; usz* tsh = tsh0+xr+r0; // Test shapes
usz tlen = 4*xr+2*r0; PLAINLOOP for (usz a=0; a<xr; a++) tlen+=xsh[a];
TALLOC(usz, st, tlen); // Temp buffer
st[xr-1]=1; PLAINLOOP for (ur a=xr; a-->1; ) st[a-1] = st[a]*xsh[a]; // Stride
usz* tsh0 = st+xr; usz* tsh = tsh0+xr+r0; // Test shapes
// Length buffer i is lp+lp[i]
usz* lp = tsh+xr+r0; lp[0]=xr; for (usz a=1; a<xr; a++) lp[a] = lp[a-1]+xsh[a-1];
usz* lp = tsh+xr+r0; lp[0]=xr; PLAINLOOP for (usz a=1; a<xr; a++) lp[a] = lp[a-1]+xsh[a-1];
// Expand checked region from the root ⊑𝕩 along each axis in order,
// so that a non-root element is checked when the axis of the first

View File

@ -1530,8 +1530,8 @@ B bitop1(B f, B x, enum BitOp1 op, char* name) {
if (ia<1 || ia>3) thrF("•bit._%U: 𝕗 must contain between 1 and 3 numbers (%s≡≠𝕗)", name, ia);
SGetU(f)
usz t[3];
for (usz i=0 ; i<ia; i++) t[i] = req2(o2s(GetU(f, i)), name);
for (usz i=ia; i<3 ; i++) t[i] = t[ia-1];
PLAINLOOP for (usz i=0 ; i<ia; i++) t[i] = req2(o2s(GetU(f, i)), name);
PLAINLOOP for (usz i=ia; i<3 ; i++) t[i] = t[ia-1];
ow = t[0]; rw = t[1]; xw = t[2];
}