/external/python/cpython2/Modules/ |
D | arraymodule.c | 26 int itemsize; member 78 if (_new_size <= ((~(size_t)0) / self->ob_descr->itemsize)) in array_resize() 79 PyMem_RESIZE(items, char, (_new_size * self->ob_descr->itemsize)); in array_resize() 426 nbytes = size * descr->itemsize; in newarrayobject() 428 if (nbytes / descr->itemsize != (size_t)size) { in newarrayobject() 486 memmove(items + (where+1)*self->ob_descr->itemsize, in ins1() 487 items + where*self->ob_descr->itemsize, in ins1() 488 (n-where)*self->ob_descr->itemsize); in ins1() 624 memcpy(np->ob_item, a->ob_item + ilow * a->ob_descr->itemsize, in array_slice() 625 (ihigh-ilow) * a->ob_descr->itemsize); in array_slice() [all …]
|
D | _testcapimodule.c | 385 Py_ssize_t itemsize = sizeof(int); in test_to_contiguous() local 387 Py_ssize_t strides = 2 * itemsize; in test_to_contiguous() 391 5 * itemsize, in test_to_contiguous() 392 itemsize, in test_to_contiguous() 414 view.strides[0] = -2 * itemsize; in test_to_contiguous() 433 Py_ssize_t itemsize = sizeof(int); in test_from_contiguous() local 435 Py_ssize_t strides = 2 * itemsize; in test_from_contiguous() 439 5 * itemsize, in test_from_contiguous() 440 itemsize, in test_from_contiguous() 464 view.strides[0] = -2 * itemsize; in test_from_contiguous()
|
/external/python/cpython3/Modules/ |
D | arraymodule.c | 31 int itemsize; member 158 if (_new_size <= ((~(size_t)0) / self->ob_descr->itemsize)) in array_resize() 159 PyMem_RESIZE(items, char, (_new_size * self->ob_descr->itemsize)); in array_resize() 548 if (size > PY_SSIZE_T_MAX / descr->itemsize) { in newarrayobject() 551 nbytes = size * descr->itemsize; in newarrayobject() 608 memmove(items + (where+1)*self->ob_descr->itemsize, in ins1() 609 items + where*self->ob_descr->itemsize, in ins1() 610 (n-where)*self->ob_descr->itemsize); in ins1() 744 memcpy(np->ob_item, a->ob_item + ilow * a->ob_descr->itemsize, in array_slice() 745 (ihigh-ilow) * a->ob_descr->itemsize); in array_slice() [all …]
|
D | _testbuffer.c | 109 ndbuf_new(Py_ssize_t nitems, Py_ssize_t itemsize, Py_ssize_t offset, int flags) in ndbuf_new() argument 115 len = nitems * itemsize; in ndbuf_new() 116 if (offset % itemsize) { in ndbuf_new() 121 if (offset < 0 || offset+itemsize > len) { in ndbuf_new() 151 base->itemsize = 1; in ndbuf_new() 302 Py_ssize_t itemsize) in pack_from_list() argument 345 offset = PyLong_FromSsize_t(i*itemsize); in pack_from_list() 395 pack_single(char *ptr, PyObject *item, const char *fmt, Py_ssize_t itemsize) in pack_single() argument 416 mview = PyMemoryView_FromMemory(ptr, itemsize, PyBUF_WRITE); in pack_single() 473 copy_rec(const Py_ssize_t *shape, Py_ssize_t ndim, Py_ssize_t itemsize, in copy_rec() argument [all …]
|
/external/python/cpython2/Objects/ |
D | memoryobject.c | 116 Py_ssize_t *strides, Py_ssize_t itemsize, char fort) in _strided_copy_nd() argument 122 memcpy(dest, src, itemsize); in _strided_copy_nd() 126 memcpy(dest, src, itemsize); in _strided_copy_nd() 127 dest += itemsize; in _strided_copy_nd() 138 outstride = itemsize; in _strided_copy_nd() 144 strides, itemsize, fort); in _strided_copy_nd() 156 outstride = itemsize; in _strided_copy_nd() 162 strides+1, itemsize, in _strided_copy_nd() 208 memcpy(dest, ptr, view->itemsize); in _indirect_copy_nd() 209 dest += view->itemsize; in _indirect_copy_nd() [all …]
|
D | abstract.c | 380 sd = view->itemsize; in _IsFortranContiguous() 401 sd = view->itemsize; in _IsCContiguous() 522 elements = len / view->itemsize; in PyBuffer_ToContiguous() 525 memcpy(dest, ptr, view->itemsize); in PyBuffer_ToContiguous() 526 dest += view->itemsize; in PyBuffer_ToContiguous() 573 elements = len / view->itemsize; in PyBuffer_FromContiguous() 576 memcpy(ptr, src, view->itemsize); in PyBuffer_FromContiguous() 577 src += view->itemsize; in PyBuffer_FromContiguous() 647 memcpy(dptr, sptr, view_src.itemsize); in PyObject_CopyData() 657 Py_ssize_t *strides, int itemsize, in PyBuffer_FillContiguousStrides() argument [all …]
|
/external/python/cpython3/Objects/ |
D | memoryobject.c | 210 ((view)->shape[0] == 1 || (view)->strides[0] == (view)->itemsize) 252 dest->strides[dest->ndim-1] == dest->itemsize && in last_dim_is_contiguous() 253 src->strides[src->ndim-1] == src->itemsize); in last_dim_is_contiguous() 272 dest->itemsize != src->itemsize) { in equiv_format() 320 copy_base(const Py_ssize_t *shape, Py_ssize_t itemsize, in copy_base() argument 326 Py_ssize_t size = shape[0] * itemsize; in copy_base() 335 for (i=0, p=mem; i < shape[0]; p+=itemsize, sptr+=sstrides[0], i++) { in copy_base() 337 memcpy(p, xsptr, itemsize); in copy_base() 339 for (i=0, p=mem; i < shape[0]; p+=itemsize, dptr+=dstrides[0], i++) { in copy_base() 341 memcpy(xdptr, p, itemsize); in copy_base() [all …]
|
D | abstract.c | 369 sd = view->itemsize; in _IsFortranContiguous() 396 sd = view->itemsize; in _IsCContiguous() 511 elements = len / view->itemsize; in PyBuffer_FromContiguous() 514 memcpy(ptr, src, view->itemsize); in PyBuffer_FromContiguous() 515 src += view->itemsize; in PyBuffer_FromContiguous() 585 memcpy(dptr, sptr, view_src.itemsize); in PyObject_CopyData() 595 Py_ssize_t *strides, int itemsize, in PyBuffer_FillContiguousStrides() argument 601 sd = itemsize; in PyBuffer_FillContiguousStrides() 640 view->itemsize = 1; in PyBuffer_FillInfo() 650 view->strides = &(view->itemsize); in PyBuffer_FillInfo()
|
/external/python/cpython3/Lib/test/ |
D | test_buffer.py | 255 def strides_from_shape(ndim, shape, itemsize, layout): argument 261 strides = list(shape[1:]) + [itemsize] 265 strides = [itemsize] + list(shape[:-1]) 426 def verify_structure(memlen, itemsize, ndim, shape, strides, offset): argument 433 if offset % itemsize: 435 if offset < 0 or offset+itemsize > memlen: 437 if any(v % itemsize for v in strides): 450 return 0 <= offset+imin and offset+imax+itemsize <= memlen 459 memlen, itemsize, ndim, shape, strides, offset = t 469 memlen, itemsize, ndim, shape, strides, offset = t [all …]
|
D | test_memoryview.py | 184 self.assertEqual(m.itemsize, self.itemsize) 188 self.assertEqual(m.strides, (self.itemsize,)) 264 with check: m.itemsize 395 itemsize = 1 variable in BaseBytesMemoryTests 402 itemsize = array.array('i').itemsize variable in BaseArrayMemoryTests
|
D | test_array.py | 25 sizeof_wchar = array.array('u').itemsize 205 self.assertGreaterEqual(a.itemsize, self.minitemsize) 233 if a.itemsize in (1, 2, 4, 8): 236 if a.itemsize==1: 453 if a.itemsize>1: 468 if a.itemsize>1: 1059 self.assertEqual(len(a) * a.itemsize, 4) 1065 buffer_size = a.buffer_info()[1] * a.itemsize 1123 self.assertEqual(a.itemsize, sizeof_wchar) 1251 lower = -1 * int(pow(2, a.itemsize * 8 - 1)) [all …]
|
D | test_ioctl.py | 40 intsize = buf.itemsize
|
/external/python/cpython3/Doc/c-api/ |
D | buffer.rst | 116 ``product(shape) * itemsize``. For contiguous arrays, this is the length 130 .. c:member:: Py_ssize_t itemsize 137 be set to *NULL*, but :c:member:`~Py_buffer.itemsize` still has 141 ``product(shape) * itemsize == len`` still holds and the consumer 142 can use :c:member:`~Py_buffer.itemsize` to navigate the buffer. 146 :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``. 171 ``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to 235 :c:member:`~Py_buffer.len`, :c:member:`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`. 347 The logical structure of NumPy-style arrays is defined by :c:member:`~Py_buffer.itemsize`, 351 interpreted as a scalar of size :c:member:`~Py_buffer.itemsize`. In that case, [all …]
|
/external/python/cpython2/Lib/ctypes/test/ |
D | test_pep3118.py | 32 self.assertEqual(v.itemsize, sizeof(itemtp)) 43 self.assertEqual(n * v.itemsize, len(v.tobytes())) 59 self.assertEqual(v.itemsize, sizeof(itemtp))
|
/external/python/cpython3/Lib/ctypes/test/ |
D | test_pep3118.py | 32 self.assertEqual(v.itemsize, sizeof(itemtp)) 46 self.assertEqual(n * v.itemsize, len(v.tobytes())) 62 self.assertEqual(v.itemsize, sizeof(itemtp))
|
/external/python/cpython2/Lib/test/ |
D | test_memoryview.py | 178 self.assertEqual(m.itemsize, self.itemsize) 182 self.assertEqual(m.strides, (self.itemsize,)) 255 itemsize = 1 variable in BaseBytesMemoryTests
|
D | test_array.py | 74 self.assertGreaterEqual(a.itemsize, self.minitemsize) 98 if a.itemsize in (1, 2, 4, 8): 101 if a.itemsize==1: 263 if a.itemsize>1: 996 lower = -1 * long(pow(2, a.itemsize * 8 - 1)) 997 upper = long(pow(2, a.itemsize * 8 - 1)) - 1L 1009 upper = long(pow(2, a.itemsize * 8)) - 1L 1016 buffer_size = a.buffer_info()[1] * a.itemsize 1089 if a.itemsize in (1, 2, 4, 8): 1092 if a.itemsize==1:
|
D | test_ioctl.py | 40 intsize = buf.itemsize
|
/external/libxml2/os400/ |
D | xmllintcl.c | 30 #define paramlist(itemsize, itemtype) \ argument 34 char _pad[itemsize]; \
|
D | xmlcatlgcl.c | 30 #define paramlist(itemsize, itemtype) \ argument 34 char _pad[itemsize]; \
|
/external/python/cpython3/Lib/multiprocessing/ |
D | connection.py | 187 if m.itemsize > 1: 230 itemsize = m.itemsize 231 bytesize = itemsize * len(m) 242 result.readinto(m[offset // itemsize : 243 (offset + size) // itemsize])
|
D | reduction.py | 152 bytes_size = a.itemsize * size 165 if len(cmsg_data) % a.itemsize != 0:
|
/external/python/cpython2/Doc/c-api/ |
D | buffer.rst | 84 ``((*shape)[0] * ... * (*shape)[ndims-1])*itemsize`` should be equal to 122 .. c:member:: Py_ssize_t itemsize 124 This is a storage for the itemsize (in bytes) of each element of the 128 to know the itemsize for proper interpretation of striding. Therefore, 270 Return the implied :c:data:`~Py_buffer.itemsize` from the struct-stype 281 …tiguousStrides(int ndim, Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t itemsize, char fortran)
|
/external/python/cpython3/Doc/library/ |
D | array.rst | 69 through the :attr:`itemsize` attribute. 104 .. attribute:: array.itemsize 119 array.itemsize``. This is occasionally useful when working with low-level (and
|
/external/python/cpython2/Doc/library/ |
D | array.rst | 53 through the :attr:`itemsize` attribute. The values stored for ``'L'`` and 93 .. attribute:: array.itemsize 108 array.itemsize``. This is occasionally useful when working with low-level (and
|