Home
last modified time | relevance | path

Searched refs:suboffsets (Results 1 - 10 of 10) sorted by relevance

/third_party/python/Modules/
H A D_testbuffer.c42 /* Check for the presence of suboffsets in the first dimension. */
43 #define HAVE_PTR(suboffsets) (suboffsets && suboffsets[0] >= 0)
44 /* Adjust ptr if suboffsets are present. */
45 #define ADJUST_PTR(ptr, suboffsets) \
46 (HAVE_PTR(suboffsets) ? *((char**)ptr) + suboffsets[0] : ptr)
56 #define ND_PIL 0x010 /* convert to PIL-style array (suboffsets) */
157 base->suboffsets in ndbuf_new()
610 unpack_rec(PyObject *unpack_from, char *ptr, PyObject *mview, char *item, const Py_ssize_t *shape, const Py_ssize_t *strides, const Py_ssize_t *suboffsets, Py_ssize_t ndim, Py_ssize_t itemsize) unpack_rec() argument
1743 Py_ssize_t *shape = NULL, *strides = NULL, *suboffsets = NULL; copy_structure() local
2240 static Py_ssize_t suboffsets[ND_MAX_NDIM]; ndarray_memoryview_from_buffer() local
[all...]
H A Darraymodule.c2584 view->suboffsets = NULL; in array_buffer_getbuf()
H A D_pickle.c2528 if (view->suboffsets != NULL || !PyBuffer_IsContiguous(view, 'A')) { in save_picklebuffer()
/third_party/python/Objects/
H A Dmemoryobject.c48 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, di
2068 tolist_base(PyMemoryViewObject *self, const char *ptr, const Py_ssize_t *shape, const Py_ssize_t *strides, const Py_ssize_t *suboffsets, const char *fmt) tolist_base() argument
2095 tolist_rec(PyMemoryViewObject *self, const char *ptr, Py_ssize_t ndim, const Py_ssize_t *shape, const Py_ssize_t *strides, const Py_ssize_t *suboffsets, const char *fmt) tolist_rec() argument
[all...]
H A Dpicklebufobject.c156 if (self->view.suboffsets != NULL in picklebuf_raw()
167 assert(mv->view.suboffsets == NULL); in picklebuf_raw()
H A Dabstract.c466 if (view->suboffsets != NULL) return 0; in PyBuffer_IsContiguous()
486 if ((view->suboffsets != NULL) && (view->suboffsets[i] >= 0)) { in PyBuffer_GetPointer()
487 pointer = *((char**)pointer) + view->suboffsets[i]; in PyBuffer_GetPointer()
749 view->suboffsets = NULL; in PyBuffer_FillInfo()
/third_party/python/Include/
H A Dpybuffer.h31 Py_ssize_t *suboffsets; member
/third_party/python/Lib/test/
H A Dtest_buffer.py744 print("ndarray(%s, shape=%s, strides=%s, suboffsets=%s, offset=%s, "
746 (x, nd.shape, nd.strides, nd.suboffsets, offset,
769 # The suboffsets tests need sizeof(void *).
785 # Reconstruct suboffsets from strides. Support for slicing
787 suboffsets = ()
788 if result.suboffsets:
798 suboffsets = [suboffset0] + [-1 for v in range(ndim-1)]
813 if not (sliced and suboffsets):
815 self.assertEqual(result.suboffsets, tuple(suboffsets))
[all...]
H A Dtest_memoryview.py191 self.assertEqual(m.suboffsets, ())
/third_party/python/Modules/_ctypes/
H A D_ctypes.c2822 view->suboffsets = NULL; in PyCData_NewGetBuffer()

Completed in 33 milliseconds