4242static NPY_INLINE npy_intp npy_aligned_block_offset (const void * addr ,
4343 const npy_uintp esize ,
4444 const npy_uintp alignment ,
45- const npy_uintp nvals ) {
46- npy_uintp offset , peel ;
45+ const npy_uintp nvals )
46+ {
47+ npy_uintp offset , peel ;
4748
48- offset = (npy_uintp )addr & (alignment - 1 );
49- peel = offset ? (alignment - offset ) / esize : 0 ;
50- peel = (peel <= nvals ) ? peel : nvals ;
51- assert (peel <= NPY_MAX_INTP );
52- return (npy_intp )peel ;
49+ offset = (npy_uintp )addr & (alignment - 1 );
50+ peel = offset ? (alignment - offset ) / esize : 0 ;
51+ peel = (peel <= nvals ) ? peel : nvals ;
52+ assert (peel <= NPY_MAX_INTP );
53+ return (npy_intp )peel ;
5354}
5455
5556/*
@@ -75,11 +76,12 @@ static NPY_INLINE npy_intp npy_aligned_block_offset(const void *addr,
7576static NPY_INLINE npy_intp npy_blocked_end (const npy_uintp peel ,
7677 const npy_uintp esize ,
7778 const npy_uintp vsz ,
78- const npy_uintp nvals ) {
79- npy_uintp ndiff = nvals - peel ;
80- npy_uintp res = (ndiff - ndiff % (vsz / esize ));
79+ const npy_uintp nvals )
80+ {
81+ npy_uintp ndiff = nvals - peel ;
82+ npy_uintp res = (ndiff - ndiff % (vsz / esize ));
8183
82- assert (nvals >= peel );
83- assert (res <= NPY_MAX_INTP );
84- return (npy_intp )(res );
84+ assert (nvals >= peel );
85+ assert (res <= NPY_MAX_INTP );
86+ return (npy_intp )(res );
8587}
0 commit comments