Home
last modified time | relevance | path

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

/external/python/cpython3/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()
/external/python/cpython3/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()
/external/python/cpython3/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`
/external/python/cpython2/Doc/c-api/
Dbuffer.rst77 array. If it is ``0``, :c:data:`strides` and :c:data:`suboffsets` must be
92 .. c:member:: Py_ssize_t *suboffsets
101 If all suboffsets are negative (i.e. no de-referencing is needed, then
106 and suboffsets::
109 Py_ssize_t *suboffsets, Py_ssize_t *indices) {
114 if (suboffsets[i] >=0 ) {
115 pointer = *((char**)pointer) + suboffsets[i];
135 about whether or not the shape, strides, and suboffsets arrays must be
193 | | not possible (i.e. without the suboffsets). |
217 | | suboffsets information (which can be NULL if no |
[all …]
/external/python/cpython2/Objects/
Dmemoryobject.c296 if (view->suboffsets==NULL) { in PyMemoryView_GetContiguous()
378 return _IntTupleFromSsizet(self->view.ndim, self->view.suboffsets); in memory_suboffsets_get()
537 if (view->suboffsets != NULL && in memory_item()
538 view->suboffsets[0] >= 0) { in memory_item()
539 ptr = *((char **)ptr) + view->suboffsets[0]; in memory_item()
Dabstract.c417 if (view->suboffsets != NULL) return 0; in PyBuffer_IsContiguous()
437 if ((view->suboffsets != NULL) && (view->suboffsets[i] >= 0)) { in PyBuffer_GetPointer()
438 pointer = *((char**)pointer) + view->suboffsets[i]; in PyBuffer_GetPointer()
708 view->suboffsets = NULL; in PyBuffer_FillInfo()
/external/python/cpython3/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, ())
/external/python/cpython3/Include/cpython/
Dobject.h67 Py_ssize_t *suboffsets; member
/external/python/cpython2/Lib/test/
Dtest_memoryview.py184 self.assertEqual(m.suboffsets, None)
/external/python/cpython2/Include/
Dobject.h175 Py_ssize_t *suboffsets; member
/external/python/pybind11/include/pybind11/
Dpytypes.h1530 view.suboffsets = nullptr; in from_buffer()
/external/python/cpython3/Doc/whatsnew/
D3.3.rst153 and arrays with suboffsets.
184 * The representation of empty shape, strides and suboffsets is now
/external/python/cpython3/Modules/_ctypes/
D_ctypes.c2825 view->suboffsets = NULL; in PyCData_NewGetBuffer()
/external/python/cpython2/Modules/_ctypes/
D_ctypes.c2726 view->suboffsets = NULL; in PyCData_NewGetBuffer()
/external/python/cpython2/Doc/library/
Dstdtypes.rst2825 .. memoryview.suboffsets isn't documented because it only seems useful for C
/external/python/cpython3/Doc/library/
Dstdtypes.rst4057 .. attribute:: suboffsets