fix wrong integer types in varargs
problematic in 32-bit builds
This commit is contained in:
parent
732f52630a
commit
f9b3aba234
@ -987,8 +987,8 @@ B select_ucw(B t, B o, B w, B x) {
|
||||
} else {
|
||||
rep = c1(o, C2(select, incG(w), incG(x)));
|
||||
}
|
||||
usz xr = RNK(x);
|
||||
usz wr = RNK(w);
|
||||
ur xr = RNK(x);
|
||||
ur wr = RNK(w);
|
||||
bool ok = isArr(rep) && xr+wr == RNK(rep)+1 && eqShPart(SH(w),SH(rep),wr) && eqShPart(SH(x)+1,SH(rep)+wr,xr-1);
|
||||
if (!ok) thrF("𝔽⌾(a⊸⊏)𝕩: 𝔽 must return an array with the same shape as its input (%H ≡ shape of a, %2H ≡ shape of ⊏𝕩, %H ≡ shape of result of 𝔽)", w, xr-1, SH(x)+1, rep);
|
||||
usz csz = arr_csz(x);
|
||||
|
||||
@ -370,10 +370,10 @@ static NOINLINE void checkIndexList(B w, ur xr) {
|
||||
}
|
||||
|
||||
// calculate index into variable RES; reads xsh, defines i for GET
|
||||
#define PICK_IDX(RES, GET, RNK, OOB) \
|
||||
usz RES = 0; \
|
||||
for (usz i=0, rnk_=(RNK); i < rnk_; i++) { \
|
||||
c = c*xsh[i] + WRAP(GET, xsh[i], OOB); \
|
||||
#define PICK_IDX(RES, GET, RNK, OOB) \
|
||||
usz RES = 0; \
|
||||
for (ux i=0, rnk_=(RNK); i < rnk_; i++) { \
|
||||
c = c*xsh[i] + WRAP(GET, xsh[i], OOB); \
|
||||
}
|
||||
|
||||
static i64 pick_convFloat(f64 f) {
|
||||
@ -844,7 +844,7 @@ B join_c1(B t, B x) {
|
||||
for (usz i=0; i<n; i++) {
|
||||
ur rd = r1 - ll[i];
|
||||
if (rd) {
|
||||
if (rd>1) thrF("∾𝕩: Item ranks along an axis can differ by at most one (contained ranks %i and %i along axis %i)", ll[i], r1, a);
|
||||
if (rd>1) thrF("∾𝕩: Item ranks along an axis can differ by at most one (contained ranks %s and %i along axis %i)", ll[i], r1, a);
|
||||
ll[i] = -1;
|
||||
} else {
|
||||
B c = GetU(x, i*step);
|
||||
@ -1298,7 +1298,7 @@ B reverse_c2(B t, B w, B x) {
|
||||
}
|
||||
|
||||
|
||||
static usz pick_oneIndex(B w, usz xr, usz* xsh) { // throws if guaranteed bad; returns USZ_MAX if not a plain index
|
||||
static usz pick_oneIndex(B w, ur xr, usz* xsh) { // throws if guaranteed bad; returns USZ_MAX if not a plain index
|
||||
assert(xr!=0);
|
||||
if (RARE(isAtm(w) || IA(w)!=xr || RNK(w)!=1)) return USZ_MAX;
|
||||
switch(TI(w,elType)) { default: UD;
|
||||
|
||||
@ -569,7 +569,7 @@ Arr* apd_sh_err(ApdMut* m, u32 ty) {
|
||||
Arr* apd_rnk_err(ApdMut* m, u32 ty) {
|
||||
ur er = RNK(m->failEl); // if it were atom, rank couldn't overflow
|
||||
decG(m->failEl);
|
||||
thrF("%U: Result rank too large (%i ≡ =𝕩, %s ≡ =%U)", apd_ty_base(ty), m->rr0, er, ty==1? "⊑𝕩" : "𝔽v");
|
||||
thrF("%U: Result rank too large (%i ≡ =𝕩, %i ≡ =%U)", apd_ty_base(ty), m->rr0, er, ty==1? "⊑𝕩" : "𝔽v");
|
||||
}
|
||||
NOINLINE void apd_sh_fail(ApdMut* m, B x, u8 mode) {
|
||||
if (mode<=1) m->cr = mode;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user