Lines Matching refs:itemsize

212     ((view)->shape[0] == 1 || (view)->strides[0] == (view)->itemsize)
254 dest->strides[dest->ndim-1] == dest->itemsize && in last_dim_is_contiguous()
255 src->strides[src->ndim-1] == src->itemsize); in last_dim_is_contiguous()
274 dest->itemsize != src->itemsize) { in equiv_format()
322 copy_base(const Py_ssize_t *shape, Py_ssize_t itemsize, in copy_base() argument
328 Py_ssize_t size = shape[0] * itemsize; in copy_base()
337 for (i=0, p=mem; i < shape[0]; p+=itemsize, sptr+=sstrides[0], i++) { in copy_base()
339 memcpy(p, xsptr, itemsize); in copy_base()
341 for (i=0, p=mem; i < shape[0]; p+=itemsize, dptr+=dstrides[0], i++) { in copy_base()
343 memcpy(xdptr, p, itemsize); in copy_base()
352 copy_rec(const Py_ssize_t *shape, Py_ssize_t ndim, Py_ssize_t itemsize, in copy_rec() argument
362 copy_base(shape, itemsize, in copy_rec()
373 copy_rec(shape+1, ndim-1, itemsize, in copy_rec()
392 mem = PyMem_Malloc(dest->shape[0] * dest->itemsize); in copy_single()
399 copy_base(dest->shape, dest->itemsize, in copy_single()
424 mem = PyMem_Malloc(dest->shape[dest->ndim-1] * dest->itemsize); in copy_buffer()
431 copy_rec(dest->shape, dest->ndim, dest->itemsize, in copy_buffer()
450 view->strides[view->ndim-1] = view->itemsize; in init_strides_from_shape()
463 view->strides[0] = view->itemsize; in init_fortran_strides_from_shape()
524 dest->itemsize = src->itemsize; in init_shared_values()
542 dest->shape[0] = src->shape ? src->shape[0] : src->len / src->itemsize; in init_shape_strides()
543 dest->strides[0] = src->strides ? src->strides[0] : src->itemsize; in init_shape_strides()
580 len *= view->itemsize; in init_len()
866 dest->itemsize = src->itemsize; in memory_from_contiguous_copy()
1181 Py_ssize_t itemsize; in cast_to_1D() local
1194 itemsize = get_native_fmtchar(&destchar, PyBytes_AS_STRING(asciifmt)); in cast_to_1D()
1195 if (itemsize < 0) { in cast_to_1D()
1208 if (view->len % itemsize) { in cast_to_1D()
1221 view->itemsize = itemsize; in cast_to_1D()
1224 view->shape[0] = view->len / view->itemsize; in cast_to_1D()
1225 view->strides[0] = view->itemsize; in cast_to_1D()
1240 Py_ssize_t itemsize) in copy_shape() argument
1243 Py_ssize_t len = itemsize; in copy_shape()
1293 len = view->itemsize; in cast_to_ND()
1296 len = copy_shape(view->shape, shape, ndim, view->itemsize); in cast_to_ND()
1885 Py_ssize_t itemsize; /* len(item) */ member
1901 x->itemsize = 0; in unpacker_new()
1919 struct_get_unpacker(const char *fmt, Py_ssize_t itemsize) in struct_get_unpacker() argument
1952 x->item = PyMem_Malloc(itemsize); in struct_get_unpacker()
1957 x->itemsize = itemsize; in struct_get_unpacker()
1959 x->mview = PyMemoryView_FromMemory(x->item, itemsize, PyBUF_WRITE); in struct_get_unpacker()
1982 memcpy(x->item, ptr, x->itemsize); in struct_unpack_single()
2486 dest.len = dest.shape[0] * dest.itemsize; in memory_ass_sub()
2774 unpack_v = struct_get_unpacker(vv->format, vv->itemsize); in memory_richcompare()
2779 unpack_w = struct_get_unpacker(ww->format, ww->itemsize); in memory_richcompare()
2938 return PyLong_FromSsize_t(self->view.itemsize); in memory_itemsize_get()