• Home
  • Raw
  • Download

Lines Matching refs:suboffsets

43 #define HAVE_PTR(suboffsets) (suboffsets && suboffsets[0] >= 0)  argument
45 #define ADJUST_PTR(ptr, suboffsets) \ argument
46 (HAVE_PTR(suboffsets) ? *((char**)ptr) + suboffsets[0] : ptr)
157 base->suboffsets = NULL; in ndbuf_new()
172 PyMem_XFree(base->suboffsets); in ndbuf_free()
230 PyMem_XFree(base->suboffsets); in ndarray_dealloc()
269 if (ndbuf->base.suboffsets) in init_flags()
549 if ((dest->suboffsets && dest->suboffsets[dest->ndim-1] >= 0) || in copy_buffer()
550 (src->suboffsets && src->suboffsets[src->ndim-1] >= 0) || in copy_buffer()
561 dest->buf, dest->strides, dest->suboffsets, in copy_buffer()
562 src->buf, src->strides, src->suboffsets, in copy_buffer()
612 const Py_ssize_t *suboffsets, Py_ssize_t ndim, Py_ssize_t itemsize) in unpack_rec() argument
640 char *nextptr = ADJUST_PTR(ptr, suboffsets); in unpack_rec()
643 shape+1, strides+1, suboffsets ? suboffsets+1 : NULL, in unpack_rec()
719 shape, strides, base->suboffsets, in ndarray_as_list()
1040 assert(base->suboffsets == NULL); in init_suboffsets()
1083 base->suboffsets = PyMem_Malloc(base->ndim * (sizeof *base->suboffsets)); in init_suboffsets()
1084 if (base->suboffsets == NULL) { in init_suboffsets()
1088 base->suboffsets[0] = suboffset0; in init_suboffsets()
1090 base->suboffsets[n] = -1; in init_suboffsets()
1582 ptr = ADJUST_PTR(ptr, base->suboffsets); in ptr_from_index()
1627 if (subview->suboffsets) subview->suboffsets++; in ndarray_item()
1722 if (base->suboffsets == NULL || dim == 0) { in init_slice()
1728 while (n >= 0 && base->suboffsets[n] < 0) in init_slice()
1732 base->suboffsets[n] = base->suboffsets[n] + base->strides[dim] * start; in init_slice()
1743 Py_ssize_t *shape = NULL, *strides = NULL, *suboffsets = NULL; in copy_structure() local
1751 suboffsets = NULL; in copy_structure()
1752 if (base->suboffsets) { in copy_structure()
1753 suboffsets = PyMem_Malloc(base->ndim * (sizeof *suboffsets)); in copy_structure()
1754 if (suboffsets == NULL) in copy_structure()
1761 if (suboffsets) in copy_structure()
1762 suboffsets[i] = base->suboffsets[i]; in copy_structure()
1767 base->suboffsets = suboffsets; in copy_structure()
1775 PyMem_XFree(suboffsets); in copy_structure()
2082 return ssize_array_as_tuple(base->suboffsets, base->ndim); in ndarray_get_suboffsets()
2179 dest.suboffsets = NULL; in ndarray_tobytes()
2202 if (base->suboffsets != NULL) { in ndarray_add_suboffsets()
2213 base->suboffsets = PyMem_Malloc(base->ndim * (sizeof *base->suboffsets)); in ndarray_add_suboffsets()
2214 if (base->suboffsets == NULL) { in ndarray_add_suboffsets()
2220 base->suboffsets[i] = -1; in ndarray_add_suboffsets()
2240 static Py_ssize_t suboffsets[ND_MAX_NDIM]; in ndarray_memoryview_from_buffer() local
2294 if (view->suboffsets) { in ndarray_memoryview_from_buffer()
2295 memcpy(suboffsets, view->suboffsets, view->ndim * sizeof(Py_ssize_t)); in ndarray_memoryview_from_buffer()
2296 info.suboffsets = suboffsets; in ndarray_memoryview_from_buffer()
2540 !!v1.suboffsets != !!v2.suboffsets) { in cmp_contig()
2546 (v1.suboffsets && !arraycmp(v1.suboffsets, v2.suboffsets, NULL, in cmp_contig()