Lines Matching refs:suboffsets
48 base object. shape, strides, suboffsets and format are read-only for
52 strides and suboffsets belong to the memoryview and are thus writable.
55 buffer copies share shape, strides and suboffsets. In this case, the
210 /* Check for the presence of suboffsets in the first dimension. */
211 #define HAVE_PTR(suboffsets, dim) (suboffsets && suboffsets[dim] >= 0)
212 /* Adjust ptr if suboffsets are present. */
213 #define ADJUST_PTR(ptr, suboffsets, dim) \
214 (HAVE_PTR(suboffsets, dim) ? *((char**)ptr) + suboffsets[dim] : ptr)
223 /* Fast contiguity test. Caller must ensure suboffsets==NULL and ndim==1. */
253 (view->suboffsets && view->suboffsets[dest->ndim-1] >= 0)
408 dest->buf, dest->strides, dest->suboffsets,
409 src->buf, src->strides, src->suboffsets,
440 dest->buf, dest->strides, dest->suboffsets,
441 src->buf, src->strides, src->suboffsets,
503 suboffsets) may change. */
512 dest.suboffsets = NULL;
571 if (src->suboffsets == NULL) {
572 dest->suboffsets = NULL;
576 dest->suboffsets[i] = src->suboffsets[i];
617 if (view->suboffsets) {
644 mv->view.suboffsets = mv->ob_array + 2 * ndim;
656 are always present, suboffsets as needed. Arrays are copied to
692 /* Register an incomplete view: shape, strides, suboffsets and flags still
834 of src->shape, src->strides and src->suboffsets.
886 /* suboffsets */
887 dest->suboffsets = NULL;
1010 fb->view.suboffsets = fb->array + 2 * src->ndim;
1206 assert(view->suboffsets == mv->ob_array + 2*view->ndim);
1244 view->suboffsets = NULL;
1305 assert(view->suboffsets == NULL);
1487 "memoryview: underlying buffer requires suboffsets");
2069 const Py_ssize_t *strides, const Py_ssize_t *suboffsets,
2080 const char *xptr = ADJUST_PTR(ptr, suboffsets, 0);
2096 const Py_ssize_t *strides, const Py_ssize_t *suboffsets,
2107 return tolist_base(self, ptr, shape, strides, suboffsets, fmt);
2114 const char *xptr = ADJUST_PTR(ptr, suboffsets, 0);
2116 strides+1, suboffsets ? suboffsets+1 : NULL,
2153 view->strides, view->suboffsets,
2158 view->strides, view->suboffsets,
2302 ptr = ADJUST_PTR(ptr, view->suboffsets, dim);
2410 if (base->suboffsets == NULL || dim == 0) {
2416 while (n >= 0 && base->suboffsets[n] < 0)
2419 goto adjust_buf; /* all suboffsets are negative */
2420 base->suboffsets[n] = base->suboffsets[n] + base->strides[dim] * start;
2595 if (view->suboffsets) {
2596 dest.suboffsets = &arrays[2]; dest.suboffsets[0] = view->suboffsets[0];
2907 vv->strides, vv->suboffsets,
2908 ww->strides, ww->suboffsets,
2913 vv->strides, vv->suboffsets,
2914 ww->strides, ww->suboffsets,
3074 return _IntTupleFromSsizet(self->view.ndim, self->view.suboffsets);
3152 {"suboffsets", (getter)memory_suboffsets_get, NULL, memory_suboffsets_doc},
3216 ptr = ADJUST_PTR(ptr, view->suboffsets, 0);