Lines Matching refs:itemsize
228 ((view)->shape[0] == 1 || (view)->strides[0] == (view)->itemsize)
264 dest->strides[dest->ndim-1] == dest->itemsize && in last_dim_is_contiguous()
265 src->strides[src->ndim-1] == src->itemsize); in last_dim_is_contiguous()
284 dest->itemsize != src->itemsize) { in equiv_format()
332 copy_base(const Py_ssize_t *shape, Py_ssize_t itemsize, in copy_base() argument
338 Py_ssize_t size = shape[0] * itemsize; in copy_base()
347 for (i=0, p=mem; i < shape[0]; p+=itemsize, sptr+=sstrides[0], i++) { in copy_base()
349 memcpy(p, xsptr, itemsize); in copy_base()
351 for (i=0, p=mem; i < shape[0]; p+=itemsize, dptr+=dstrides[0], i++) { in copy_base()
353 memcpy(xdptr, p, itemsize); in copy_base()
362 copy_rec(const Py_ssize_t *shape, Py_ssize_t ndim, Py_ssize_t itemsize, in copy_rec() argument
372 copy_base(shape, itemsize, in copy_rec()
383 copy_rec(shape+1, ndim-1, itemsize, in copy_rec()
402 mem = PyMem_Malloc(dest->shape[0] * dest->itemsize); in copy_single()
409 copy_base(dest->shape, dest->itemsize, in copy_single()
434 mem = PyMem_Malloc(dest->shape[dest->ndim-1] * dest->itemsize); in copy_buffer()
441 copy_rec(dest->shape, dest->ndim, dest->itemsize, in copy_buffer()
460 view->strides[view->ndim-1] = view->itemsize; in init_strides_from_shape()
473 view->strides[0] = view->itemsize; in init_fortran_strides_from_shape()
534 dest->itemsize = src->itemsize; in init_shared_values()
552 dest->shape[0] = src->shape ? src->shape[0] : src->len / src->itemsize; in init_shape_strides()
553 dest->strides[0] = src->strides ? src->strides[0] : src->itemsize; in init_shape_strides()
590 len *= view->itemsize; in init_len()
876 dest->itemsize = src->itemsize; in memory_from_contiguous_copy()
1201 Py_ssize_t itemsize; in cast_to_1D() local
1214 itemsize = get_native_fmtchar(&destchar, PyBytes_AS_STRING(asciifmt)); in cast_to_1D()
1215 if (itemsize < 0) { in cast_to_1D()
1228 if (view->len % itemsize) { in cast_to_1D()
1241 view->itemsize = itemsize; in cast_to_1D()
1244 view->shape[0] = view->len / view->itemsize; in cast_to_1D()
1245 view->strides[0] = view->itemsize; in cast_to_1D()
1260 Py_ssize_t itemsize) in copy_shape() argument
1263 Py_ssize_t len = itemsize; in copy_shape()
1313 len = view->itemsize; in cast_to_ND()
1316 len = copy_shape(view->shape, shape, ndim, view->itemsize); in cast_to_ND()
1925 Py_ssize_t itemsize; /* len(item) */ member
1941 x->itemsize = 0; in unpacker_new()
1959 struct_get_unpacker(const char *fmt, Py_ssize_t itemsize) in struct_get_unpacker() argument
1992 x->item = PyMem_Malloc(itemsize); in struct_get_unpacker()
1997 x->itemsize = itemsize; in struct_get_unpacker()
1999 x->mview = PyMemoryView_FromMemory(x->item, itemsize, PyBUF_WRITE); in struct_get_unpacker()
2022 memcpy(x->item, ptr, x->itemsize); in struct_unpack_single()
2592 dest.len = dest.shape[0] * dest.itemsize; in memory_ass_sub()
2880 unpack_v = struct_get_unpacker(vv->format, vv->itemsize); in memory_richcompare()
2885 unpack_w = struct_get_unpacker(ww->format, ww->itemsize); in memory_richcompare()
3044 return PyLong_FromSsize_t(self->view.itemsize); in memory_itemsize_get()