Ndarray.h GetDataSize() question

In this implementation of GetDataSize():

there is this mysterious line:

size *= (arr.dtype.bits * arr.dtype.lanes + 7) / 8;

I was instead expecting the simpler:

size *= (arr.dtype.bits * arr.dtype.lanes);

Can somebody enlighten me as to why the former line (+7 / 8) is doing? Thanks!

Oh, I think I see. It’s an arithmetic trick to ensure that a dtype where bits<8 will still result in the nbytes-per-element to be 1 byte.