Home
last modified time | relevance | path

Searched refs:slicelength (Results 1 – 25 of 31) sorted by relevance

12

/external/python/pybind11/tests/
Dtest_sequences_and_iterators.cpp86 py::ssize_t start, stop, step, slicelength; in TEST_SUBMODULE() local
87 if (!slice.compute(s.size, &start, &stop, &step, &slicelength)) in TEST_SUBMODULE()
200 size_t start, stop, step, slicelength; in TEST_SUBMODULE() local
201 if (!slice.compute(s.size(), &start, &stop, &step, &slicelength)) in TEST_SUBMODULE()
203 auto *seq = new Sequence(slicelength); in TEST_SUBMODULE()
204 for (size_t i = 0; i < slicelength; ++i) { in TEST_SUBMODULE()
210 size_t start, stop, step, slicelength; in TEST_SUBMODULE() local
211 if (!slice.compute(s.size(), &start, &stop, &step, &slicelength)) in TEST_SUBMODULE()
213 if (slicelength != value.size()) in TEST_SUBMODULE()
215 for (size_t i = 0; i < slicelength; ++i) { in TEST_SUBMODULE()
/external/python/cpython2/Objects/
Dbufferobject.c522 Py_ssize_t start, stop, step, slicelength, cur, i; in buffer_subscript() local
529 slicelength = _PySlice_AdjustIndices(size, &start, &stop, step); in buffer_subscript()
530 if (slicelength <= 0) in buffer_subscript()
538 char *result_buf = (char *)PyMem_Malloc(slicelength); in buffer_subscript()
543 for (cur = start, i = 0; i < slicelength; in buffer_subscript()
549 slicelength); in buffer_subscript()
718 Py_ssize_t start, stop, step, slicelength; in buffer_ass_subscript() local
725 slicelength = _PySlice_AdjustIndices(selfsize, &start, &stop, step); in buffer_ass_subscript()
729 if (othersize != slicelength) { in buffer_ass_subscript()
736 if (slicelength == 0) in buffer_ass_subscript()
[all …]
Dlistobject.c2557 Py_ssize_t start, stop, step, slicelength, cur, i; in list_subscript() local
2565 slicelength = _PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in list_subscript()
2568 if (slicelength <= 0) { in list_subscript()
2575 result = PyList_New(slicelength); in list_subscript()
2580 for (cur = start, i = 0; i < slicelength; in list_subscript()
2610 Py_ssize_t start, stop, step, slicelength; in list_ass_subscript() local
2615 slicelength = _PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in list_ass_subscript()
2633 if (slicelength <= 0) in list_ass_subscript()
2638 start = stop + step*(slicelength - 1) - 1; in list_ass_subscript()
2642 assert((size_t)slicelength <= in list_ass_subscript()
[all …]
Dtupleobject.c710 Py_ssize_t start, stop, step, slicelength, cur, i; in tuplesubscript() local
718 slicelength = _PySlice_AdjustIndices(PyTuple_GET_SIZE(self), &start, in tuplesubscript()
721 if (slicelength <= 0) { in tuplesubscript()
725 slicelength == PyTuple_GET_SIZE(self) && in tuplesubscript()
731 result = PyTuple_New(slicelength); in tuplesubscript()
736 for (cur = start, i = 0; i < slicelength; in tuplesubscript()
Dmemoryobject.c585 Py_ssize_t start, stop, step, slicelength; in memory_subscript() local
590 slicelength = _PySlice_AdjustIndices(get_shape0(view), &start, &stop, in memory_subscript()
609 newview.len = slicelength * newview.itemsize; in memory_subscript()
612 newview.shape[0] = slicelength; in memory_subscript()
Dsliceobject.c225 Py_ssize_t *slicelength) in PySlice_GetIndicesEx() argument
229 *slicelength = _PySlice_AdjustIndices(length, start, stop, *step); in PySlice_GetIndicesEx()
Dbytesobject.c1683 Py_ssize_t start, stop, step, slicelength, cur, i; in bytes_subscript() local
1691 slicelength = PySlice_AdjustIndices(PyBytes_GET_SIZE(self), &start, in bytes_subscript()
1694 if (slicelength <= 0) { in bytes_subscript()
1698 slicelength == PyBytes_GET_SIZE(self) && in bytes_subscript()
1706 slicelength); in bytes_subscript()
1710 result = PyBytes_FromStringAndSize(NULL, slicelength); in bytes_subscript()
1715 for (cur = start, i = 0; i < slicelength; in bytes_subscript()
Dbytearrayobject.c457 Py_ssize_t start, stop, step, slicelength, cur, i; in bytearray_subscript() local
461 slicelength = _PySlice_AdjustIndices(PyByteArray_GET_SIZE(self), in bytearray_subscript()
464 if (slicelength <= 0) in bytearray_subscript()
468 slicelength); in bytearray_subscript()
472 char *result_buf = (char *)PyMem_Malloc(slicelength); in bytearray_subscript()
478 for (cur = start, i = 0; i < slicelength; in bytearray_subscript()
482 result = PyByteArray_FromStringAndSize(result_buf, slicelength); in bytearray_subscript()
Dstringobject.c1314 Py_ssize_t start, stop, step, slicelength, cur, i; in string_subscript() local
1322 slicelength = _PySlice_AdjustIndices(PyString_GET_SIZE(self), &start, in string_subscript()
1325 if (slicelength <= 0) { in string_subscript()
1329 slicelength == PyString_GET_SIZE(self) && in string_subscript()
1337 slicelength); in string_subscript()
1341 result_buf = (char *)PyMem_Malloc(slicelength); in string_subscript()
1345 for (cur = start, i = 0; i < slicelength; in string_subscript()
1351 slicelength); in string_subscript()
/external/python/pybind11/include/pybind11/
Dstl_bind.h221 size_t start, stop, step, slicelength;
223 if (!slice.compute(v.size(), &start, &stop, &step, &slicelength))
227 seq->reserve((size_t) slicelength);
229 for (size_t i=0; i<slicelength; ++i) {
241 size_t start, stop, step, slicelength;
242 if (!slice.compute(v.size(), &start, &stop, &step, &slicelength))
245 if (slicelength != value.size())
248 for (size_t i=0; i<slicelength; ++i) {
266 size_t start, stop, step, slicelength;
268 if (!slice.compute(v.size(), &start, &stop, &step, &slicelength))
[all …]
/external/python/cpython2/Modules/
Darraymodule.c1699 Py_ssize_t start, stop, step, slicelength, cur, i; in array_subscr() local
1707 slicelength = _PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in array_subscr()
1710 if (slicelength <= 0) { in array_subscr()
1715 slicelength, self->ob_descr); in array_subscr()
1720 slicelength * itemsize); in array_subscr()
1724 result = newarrayobject(&Arraytype, slicelength, self->ob_descr); in array_subscr()
1729 for (cur = start, i = 0; i < slicelength; in array_subscr()
1749 Py_ssize_t start, stop, step, slicelength, needed; in array_ass_subscr() local
1770 slicelength = 1; in array_ass_subscr()
1779 slicelength = _PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in array_ass_subscr()
[all …]
/external/python/cpython3/Modules/
Darraymodule.c2311 Py_ssize_t start, stop, step, slicelength, i; in array_subscr() local
2320 slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in array_subscr()
2323 if (slicelength <= 0) { in array_subscr()
2328 slicelength, self->ob_descr); in array_subscr()
2333 slicelength * itemsize); in array_subscr()
2337 result = newarrayobject(&Arraytype, slicelength, self->ob_descr); in array_subscr()
2342 for (cur = start, i = 0; i < slicelength; in array_subscr()
2362 Py_ssize_t start, stop, step, slicelength, needed; in array_ass_subscr() local
2383 slicelength = 1; in array_ass_subscr()
2392 slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in array_ass_subscr()
[all …]
/external/python/cpython3/Doc/c-api/
Dslice.rst46 … Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength)
50 length *length*, and store the length of the slice in *slicelength*. Out
61 if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) < 0) {
70 slicelength = PySlice_AdjustIndices(length, &start, &stop, step);
/external/python/cffi/c/
Dminibuffer.h260 Py_ssize_t start, stop, step, slicelength; in mb_subscript() local
263 &start, &stop, &step, &slicelength) < 0) in mb_subscript()
293 Py_ssize_t start, stop, step, slicelength; in mb_ass_subscript() local
296 &start, &stop, &step, &slicelength) < 0) { in mb_ass_subscript()
/external/protobuf/python/google/protobuf/pyext/
Drepeated_composite_container.cc247 Py_ssize_t from, to, step, slicelength, cur, i; in Subscript() local
252 length, &from, &to, &step, &slicelength) == -1) { in Subscript()
255 length, &from, &to, &step, &slicelength) == -1) { in Subscript()
260 if (slicelength <= 0) { in Subscript()
263 result = PyList_New(slicelength); in Subscript()
266 for (cur = from, i = 0; i < slicelength; cur += step, i++) { in Subscript()
Drepeated_scalar_container.cc283 Py_ssize_t slicelength; in Subscript() local
296 length, &from, &to, &step, &slicelength) == -1) { in Subscript()
299 length, &from, &to, &step, &slicelength) == -1) { in Subscript()
435 Py_ssize_t slicelength; in Subscript() local
455 length, &from, &to, &step, &slicelength) == -1) { in Subscript()
458 length, &from, &to, &step, &slicelength) == -1) { in Subscript()
/external/python/cpython2/Doc/c-api/
Dslice.rst52 … Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength)
56 length *length*, and store the length of the slice in *slicelength*. Out
66 :c:type:`int *` type for *start*, *stop*, *step*, and *slicelength*. This
/external/python/cpython3/Objects/
Dlistobject.c2811 Py_ssize_t start, stop, step, slicelength, i; in list_subscript() local
2820 slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in list_subscript()
2823 if (slicelength <= 0) { in list_subscript()
2830 result = list_new_prealloc(slicelength); in list_subscript()
2835 for (cur = start, i = 0; i < slicelength; in list_subscript()
2841 Py_SET_SIZE(result, slicelength); in list_subscript()
2865 Py_ssize_t start, stop, step, slicelength; in list_ass_subscript() local
2870 slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in list_ass_subscript()
2889 if (slicelength <= 0) in list_ass_subscript()
2894 start = stop + step*(slicelength - 1) - 1; in list_ass_subscript()
[all …]
Dtupleobject.c778 Py_ssize_t start, stop, step, slicelength, i; in tuplesubscript() local
786 slicelength = PySlice_AdjustIndices(PyTuple_GET_SIZE(self), &start, in tuplesubscript()
789 if (slicelength <= 0) { in tuplesubscript()
793 slicelength == PyTuple_GET_SIZE(self) && in tuplesubscript()
799 PyTupleObject* result = tuple_alloc(slicelength); in tuplesubscript()
804 for (cur = start, i = 0; i < slicelength; in tuplesubscript()
Dsliceobject.c288 Py_ssize_t *slicelength) in PySlice_GetIndicesEx() argument
292 *slicelength = PySlice_AdjustIndices(length, start, stop, *step); in PySlice_GetIndicesEx()
Dbytearrayobject.c410 Py_ssize_t start, stop, step, slicelength, i; in bytearray_subscript() local
415 slicelength = PySlice_AdjustIndices(PyByteArray_GET_SIZE(self), in bytearray_subscript()
418 if (slicelength <= 0) in bytearray_subscript()
422 PyByteArray_AS_STRING(self) + start, slicelength); in bytearray_subscript()
429 result = PyByteArray_FromStringAndSize(NULL, slicelength); in bytearray_subscript()
434 for (cur = start, i = 0; i < slicelength; in bytearray_subscript()
Dbytesobject.c1596 Py_ssize_t start, stop, step, slicelength, i; in bytes_subscript() local
1605 slicelength = PySlice_AdjustIndices(PyBytes_GET_SIZE(self), &start, in bytes_subscript()
1608 if (slicelength <= 0) { in bytes_subscript()
1612 slicelength == PyBytes_GET_SIZE(self) && in bytes_subscript()
1620 slicelength); in bytes_subscript()
1624 result = PyBytes_FromStringAndSize(NULL, slicelength); in bytes_subscript()
1629 for (cur = start, i = 0; i < slicelength; in bytes_subscript()
/external/tensorflow/tensorflow/python/util/
Dtf_stack.cc347 py::ssize_t start, stop, step, slicelength; in PYBIND11_MODULE() local
349 &slicelength)) { in PYBIND11_MODULE()
353 return StackTraceWrapper{frames.subspan(start, slicelength)}; in PYBIND11_MODULE()
358 out.reserve(slicelength); in PYBIND11_MODULE()
/external/python/cpython2/Include/
Dsliceobject.h39 Py_ssize_t *step, Py_ssize_t *slicelength);
/external/python/cpython3/Include/
Dsliceobject.h47 Py_ssize_t *slicelength);

12