better fillarr creating in •internal.Variation
This commit is contained in:
parent
0907458b4d
commit
cee8e841f9
@ -175,8 +175,6 @@ B variation_c2(B t, B w, B x) {
|
|||||||
if (!isArr(w)) thrM("•internal.Variation: Non-array 𝕨");
|
if (!isArr(w)) thrM("•internal.Variation: Non-array 𝕨");
|
||||||
if (!isArr(x)) thrM("•internal.Variation: Non-array 𝕩");
|
if (!isArr(x)) thrM("•internal.Variation: Non-array 𝕩");
|
||||||
usz xia = a(x)->ia;
|
usz xia = a(x)->ia;
|
||||||
u8 xe = TI(x,elType);
|
|
||||||
SGet(x)
|
|
||||||
C8Arr* wc = toC8Arr(w);
|
C8Arr* wc = toC8Arr(w);
|
||||||
u8* wp = c8arrv_ptr(wc);
|
u8* wp = c8arrv_ptr(wc);
|
||||||
u8* wpE = wp+wc->ia;
|
u8* wpE = wp+wc->ia;
|
||||||
@ -196,19 +194,29 @@ B variation_c2(B t, B w, B x) {
|
|||||||
else if (u8_get(&wp, wpE, "h" )) res = taga(cpyHArr(inc(x)));
|
else if (u8_get(&wp, wpE, "h" )) res = taga(cpyHArr(inc(x)));
|
||||||
else if (u8_get(&wp, wpE, "f")) {
|
else if (u8_get(&wp, wpE, "f")) {
|
||||||
Arr* t = m_fillarrp(xia);
|
Arr* t = m_fillarrp(xia);
|
||||||
res = taga(t);
|
|
||||||
fillarr_setFill(t, getFillQ(x));
|
fillarr_setFill(t, getFillQ(x));
|
||||||
arr_shCopy(t, x);
|
arr_shCopy(t, x);
|
||||||
|
HArr* h = NULL;
|
||||||
|
|
||||||
|
B* xp = arr_bptr(x);
|
||||||
|
if (xp==NULL) {
|
||||||
|
h = cpyHArr(inc(x));
|
||||||
|
xp = h->a;
|
||||||
|
}
|
||||||
|
|
||||||
B* rp = fillarr_ptr(t);
|
B* rp = fillarr_ptr(t);
|
||||||
if (xe==el_i32) { i32* xp=i32any_ptr(x); for (usz i = 0; i < xia; i++) rp[i] = m_f64(xp[i]); }
|
for (usz i = 0; i < xia; i++) rp[i] = inc(xp[i]);
|
||||||
else if (xe==el_f64) { f64* xp=f64any_ptr(x); for (usz i = 0; i < xia; i++) rp[i] = m_f64(xp[i]); }
|
if (h) ptr_dec(h);
|
||||||
else for (usz i = 0; i < xia; i++) rp[i] = Get(x,i);
|
|
||||||
|
res = taga(t);
|
||||||
} else thrF("•internal.Variation: Bad type \"%R\"", taga(wc));
|
} else thrF("•internal.Variation: Bad type \"%R\"", taga(wc));
|
||||||
|
|
||||||
if (slice) {
|
if (slice) {
|
||||||
Arr* slice = TI(res,slice)(res, 0, a(res)->ia);
|
Arr* slice = TI(res,slice)(res, 0, a(res)->ia);
|
||||||
arr_shCopy(slice, res);
|
arr_shCopy(slice, res);
|
||||||
res = taga(slice);
|
res = taga(slice);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u8_get(&wp, wpE, "Inc")) {
|
if (u8_get(&wp, wpE, "Inc")) {
|
||||||
if (!variation_refs.u) {
|
if (!variation_refs.u) {
|
||||||
variation_refs = emptyHVec();
|
variation_refs = emptyHVec();
|
||||||
|
|||||||
@ -59,13 +59,13 @@ Group ← {𝕊:
|
|||||||
1
|
1
|
||||||
}¨ ↕
|
}¨ ↕
|
||||||
|
|
||||||
# •Show "∨`bitarr" ⋄ OrScanBitarr 100000
|
•Show "∨`bitarr" ⋄ OrScanBitarr 100000
|
||||||
# •Show "+`bitarr" ⋄ PlusScanBitarr 100000
|
•Show "+`bitarr" ⋄ PlusScanBitarr 100000
|
||||||
|
|
||||||
# •Show "heap corruption of /bit" ⋄ @‿0‿200 BitSlash 1000000
|
•Show "heap corruption of /bit" ⋄ @‿0‿200 BitSlash 1000000
|
||||||
# •Show "heap corruption of bit/i8" ⋄ "Ai8"‿1‿50 BitSlash 1000000
|
•Show "heap corruption of bit/i8" ⋄ "Ai8"‿1‿50 BitSlash 1000000
|
||||||
# •Show "heap corruption of bit/i16" ⋄ "Ai16"‿1‿50 BitSlash 1000000
|
•Show "heap corruption of bit/i16" ⋄ "Ai16"‿1‿50 BitSlash 1000000
|
||||||
# •Show "heap corruption of bit/i32" ⋄ "Ai32"‿1‿50 BitSlash 1000000
|
•Show "heap corruption of bit/i32" ⋄ "Ai32"‿1‿50 BitSlash 1000000
|
||||||
|
|
||||||
{
|
{
|
||||||
¬0 EEQ -0? •Out "Skipping tests requiring EEQUAL_NEGZERO";
|
¬0 EEQ -0? •Out "Skipping tests requiring EEQUAL_NEGZERO";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user