add bitwiden & bitnarrow to header

This commit is contained in:
dzaima 2024-08-14 04:45:03 +03:00
parent d0f30bd717
commit d95a792230

View File

@ -195,6 +195,9 @@ void bit_negatePtr(u64* rp, u64* xp, usz count); // count is number of u64-s
B widenBitArr(B x, ur axis); // consumes x, assumes bitarr; returns some array with cell size padded to the nearest of 8,16,32,64 if ≤64 bits, or a multiple of 64 bits otherwise
B narrowWidenedBitArr(B x, ur axis, ur cr, usz* csh); // consumes x.val; undoes widenBitArr, overriding shape past axis to cr↑csh
void bitnarrow(void* rp, ux rcsz, void* xp, ux xcsz, ux cam);
void bitwiden(void* rp, ux rcsz, void* xp, ux xcsz, ux cam);
Arr* cpyWithShape(B x); // consumes; returns new array with the same shape as x; to allocate a new shape in its place, the previous one needs to be freed, rank set to 1, and then shape & rank set to the new ones
Arr* emptyArr(B x, ur xr); // doesn't consume; returns an empty array with the same fill as x; if xr>1, shape must be set
NOINLINE Arr* emptyWithFill(B fill); // consumes; returns new array with unset shape and the specified fill