Home
last modified time | relevance | path

Searched refs:suboffsets (Results 1 – 19 of 19) 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.c2576 view->suboffsets = NULL; in array_buffer_getbuf()
/external/python/cpython3/Objects/
Dmemoryobject.c198 #define HAVE_PTR(suboffsets, dim) (suboffsets && suboffsets[dim] >= 0) argument
200 #define ADJUST_PTR(ptr, suboffsets, dim) \ argument
201 (HAVE_PTR(suboffsets, dim) ? *((char**)ptr) + suboffsets[dim] : ptr)
246 (view->suboffsets && view->suboffsets[dest->ndim-1] >= 0)
400 dest->buf, dest->strides, dest->suboffsets, in copy_single()
401 src->buf, src->strides, src->suboffsets, in copy_single()
432 dest->buf, dest->strides, dest->suboffsets, in copy_buffer()
433 src->buf, src->strides, src->suboffsets, in copy_buffer()
504 dest.suboffsets = NULL; in buffer_to_contiguous()
563 if (src->suboffsets == NULL) { in init_suboffsets()
[all …]
Dabstract.c438 if (view->suboffsets != NULL) return 0; in PyBuffer_IsContiguous()
458 if ((view->suboffsets != NULL) && (view->suboffsets[i] >= 0)) { in PyBuffer_GetPointer()
459 pointer = *((char**)pointer) + view->suboffsets[i]; in PyBuffer_GetPointer()
678 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.rst1326 :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.py738 (x, nd.shape, nd.strides, nd.suboffsets, offset,
780 suboffsets = ()
781 if result.suboffsets:
791 suboffsets = [suboffset0] + [-1 for v in range(ndim-1)]
806 if not (sliced and suboffsets):
808 self.assertEqual(result.suboffsets, tuple(suboffsets))
934 if not (sliced and suboffsets):
936 self.assertEqual(m.suboffsets, tuple(suboffsets))
958 (not match(req, PyBUF_INDIRECT) and ex.suboffsets) or
1988 self.assertEqual(ex.suboffsets, (0, -1))
[all …]
Dtest_memoryview.py189 self.assertEqual(m.suboffsets, ())
/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/cpython3/Include/
Dobject.h193 Py_ssize_t *suboffsets; member
/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.c2635 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.rst3851 .. attribute:: suboffsets