Home
last modified time | relevance | path

Searched refs:suboffsets (Results 1 – 14 of 14) sorted by relevance

/third_party/python/Modules/
D_testbuffer.c43 #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()
[all …]
Darraymodule.c2543 view->suboffsets = NULL; in array_buffer_getbuf()
D_pickle.c2531 if (view->suboffsets != NULL || !PyBuffer_IsContiguous(view, 'A')) { in save_picklebuffer()
/third_party/python/Objects/
Dmemoryobject.c214 #define HAVE_PTR(suboffsets, dim) (suboffsets && suboffsets[dim] >= 0) argument
216 #define ADJUST_PTR(ptr, suboffsets, dim) \ argument
217 (HAVE_PTR(suboffsets, dim) ? *((char**)ptr) + suboffsets[dim] : ptr)
262 (view->suboffsets && view->suboffsets[dest->ndim-1] >= 0)
416 dest->buf, dest->strides, dest->suboffsets, in copy_single()
417 src->buf, src->strides, src->suboffsets, in copy_single()
448 dest->buf, dest->strides, dest->suboffsets, in copy_buffer()
449 src->buf, src->strides, src->suboffsets, in copy_buffer()
520 dest.suboffsets = NULL; in buffer_to_contiguous()
579 if (src->suboffsets == NULL) { in init_suboffsets()
[all …]
Dpicklebufobject.c156 if (self->view.suboffsets != NULL in picklebuf_raw()
167 assert(mv->view.suboffsets == NULL); in picklebuf_raw()
Dabstract.c457 if (view->suboffsets != NULL) return 0; in PyBuffer_IsContiguous()
477 if ((view->suboffsets != NULL) && (view->suboffsets[i] >= 0)) { in PyBuffer_GetPointer()
478 pointer = *((char**)pointer) + view->suboffsets[i]; in PyBuffer_GetPointer()
739 view->suboffsets = NULL; in PyBuffer_FillInfo()
/third_party/python/Doc/c-api/
Dbuffer.rst161 and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``.
192 .. c:member:: Py_ssize_t *suboffsets
195 If ``suboffsets[n] >= 0``, the values stored along the nth dimension are
201 If all suboffsets are negative (i.e. no de-referencing is needed), then
208 The suboffsets array is read-only for the consumer.
214 about whether or not the shape, strides, and suboffsets arrays must be
262 shape, strides, suboffsets
272 | Request | shape | strides | suboffsets |
296 | Request | shape | strides | suboffsets | contig |
321 | Request | shape | strides | suboffsets | contig | readonly | format |
[all …]
Dtypeobj.rst2245 :c:member:`~Py_buffer.strides`, :c:member:`~Py_buffer.suboffsets`
/third_party/python/Include/cpython/
Dobject.h67 Py_ssize_t *suboffsets; member
/third_party/python/Lib/test/
Dtest_buffer.py745 (x, nd.shape, nd.strides, nd.suboffsets, offset,
786 suboffsets = ()
787 if result.suboffsets:
797 suboffsets = [suboffset0] + [-1 for v in range(ndim-1)]
812 if not (sliced and suboffsets):
814 self.assertEqual(result.suboffsets, tuple(suboffsets))
957 if not (sliced and suboffsets):
959 self.assertEqual(m.suboffsets, tuple(suboffsets))
984 (not match(req, PyBUF_INDIRECT) and ex.suboffsets) or
2014 self.assertEqual(ex.suboffsets, (0, -1))
[all …]
Dtest_memoryview.py189 self.assertEqual(m.suboffsets, ())
/third_party/python/Doc/whatsnew/
D3.3.rst153 and arrays with suboffsets.
184 * The representation of empty shape, strides and suboffsets is now
/third_party/python/Modules/_ctypes/
D_ctypes.c2825 view->suboffsets = NULL; in PyCData_NewGetBuffer()
/third_party/python/Doc/library/
Dstdtypes.rst4057 .. attribute:: suboffsets