use direct copy on known-different-eltype arrays
This commit is contained in:
parent
26cd40dfd3
commit
79fc8d5116
@ -290,17 +290,17 @@ B scan_c1(Md1D* d, B x) { B f = d->f;
|
|||||||
decG(x); return r;
|
decG(x); return r;
|
||||||
}
|
}
|
||||||
if (rtid==n_add) {
|
if (rtid==n_add) {
|
||||||
if (xe==el_bit) { x = toI8Any(x); xe=el_i8; }
|
if (xe==el_bit) { x = taga(cpyI8Arr(x)); xe=el_i8; }
|
||||||
restart:;
|
restart:;
|
||||||
B r; void* rp = m_tyarrc(&r, elWidth(xe), x, el2t(xe));
|
B r; void* rp = m_tyarrc(&r, elWidth(xe), x, el2t(xe));
|
||||||
void* xp = tyany_ptr(x);
|
void* xp = tyany_ptr(x);
|
||||||
bool done = si_scan_stride_add[xe-el_i8](xp, rp, ia, csz);
|
bool done = si_scan_stride_add[xe-el_i8](xp, rp, ia, csz);
|
||||||
if (!done) {
|
if (!done) {
|
||||||
decG(r);
|
decG(r);
|
||||||
switch (++xe) {
|
switch (++xe) { default: UD;
|
||||||
case el_i16: x = toI16Any(x); break;
|
case el_i16: x = taga(cpyI16Arr(x)); break;
|
||||||
case el_i32: x = toI32Any(x); break;
|
case el_i32: x = taga(cpyI32Arr(x)); break;
|
||||||
case el_f64: x = toF64Any(x); break;
|
case el_f64: x = taga(cpyF64Arr(x)); break;
|
||||||
}
|
}
|
||||||
goto restart;
|
goto restart;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user