lazy i8/i16 ∧𝕩 & ∨𝕩

This commit is contained in:
dzaima 2022-05-01 03:30:11 +03:00
parent 88f4fdaa7e
commit 0164e4e0bc

View File

@ -31,7 +31,9 @@ B and_c1(B t, B x) {
if (isAtm(x) || rnk(x)==0) thrM("∧: Argument cannot have rank 0");
if (rnk(x)!=1) return bqn_merge(and_c1(t, toCells(x)));
usz xia = a(x)->ia;
if (TI(x,elType)==el_i32) {
u8 xe = TI(x,elType);
if (xe<=el_i32) {
if (xe!=el_i32) x = taga(cpyI32Arr(x));
i32* xp = i32any_ptr(x);
i32* rp; B r = m_i32arrv(&rp, xia);
memcpy(rp, xp, xia*4);
@ -63,7 +65,9 @@ B or_c1(B t, B x) {
if (isAtm(x) || rnk(x)==0) thrM(": Argument cannot have rank 0");
if (rnk(x)!=1) return bqn_merge(or_c1(t, toCells(x)));
usz xia = a(x)->ia;
if (TI(x,elType)==el_i32) {
u8 xe = TI(x,elType);
if (xe<=el_i32) {
if (xe!=el_i32) x = taga(cpyI32Arr(x));
i32* xp = i32any_ptr(x);
i32* rp; B r = m_i32arrv(&rp, xia);
memcpy(rp, xp, xia*4);