Searched refs:strides (Results 1 - 9 of 9) sorted by relevance
/gem5/ext/pybind11/include/pybind11/ |
H A D | buffer_info.h | 24 std::vector<ssize_t> strides; // Number of entries between adjacent entries (for each per dimension) member in struct:buffer_info 31 shape(std::move(shape_in)), strides(std::move(strides_in)) { 32 if (ndim != (ssize_t) shape.size() || ndim != (ssize_t) strides.size()) 33 pybind11_fail("buffer_info: ndim doesn't match shape and/or strides length"); 51 {view->shape, view->shape + view->ndim}, {view->strides, view->strides + view->ndim}) { 70 strides = std::move(rhs.strides);
|
H A D | numpy.h | 34 and dimension types (e.g. shape, strides, indexing), instead of inflicting this 65 ssize_t *strides; member in struct:PyArray_Proxy 328 ssize_t byte_offset_unsafe(const Strides &strides, ssize_t i, Ix... index) { argument 329 return i * strides[Dim] + byte_offset_unsafe<Dim + 1>(strides, index...); 342 // Storing the shape & strides in local variables (i.e. these arrays) allows the compiler to 351 unchecked_reference(const void *data, const ssize_t *shape, const ssize_t *strides, enable_if_t<!Dyn, ssize_t>) 355 strides_[i] = strides[i]; 360 unchecked_reference(const void *data, const ssize_t *shape, const ssize_t *strides, enable_if_t<Dyn, ssize_t> dims) 361 : data_{reinterpret_cast<const unsigned char *>(data)}, shape_{shape}, strides_{strides}, dims [all...] |
H A D | eigen.h | 46 // Provide a convenience alias for easier pass-by-ref usage with fully dynamic strides: 98 // To have compatible strides, we need (on both dimensions) one of fully dynamic strides, 99 // matching strides, or a dimension size of 1 (in which case the stride value is irrelevant) 154 np_rstride = a.strides(0) / static_cast<ssize_t>(sizeof(Scalar)), 155 np_cstride = a.strides(1) / static_cast<ssize_t>(sizeof(Scalar)); 162 // Otherwise we're storing an n-vector. Only one of the strides will be used, but whichever 165 stride = a.strides(0) / static_cast<ssize_t>(sizeof(Scalar)); 433 // We don't need a converting copy, but we also need to check whether the strides are 484 // If both strides ar [all...] |
H A D | stl_bind.h | 388 if (info.ndim != 1 || info.strides[0] % static_cast<ssize_t>(sizeof(T))) 396 ssize_t step = info.strides[0] / static_cast<ssize_t>(sizeof(T));
|
H A D | pytypes.h | 1331 // Py_buffer uses signed sizes, strides and shape!.. 1342 py_strides.push_back(info.strides[i]); 1345 buf.strides = py_strides.data();
|
/gem5/ext/pybind11/tests/ |
H A D | test_numpy_dtypes.cpp | 184 std::vector<ssize_t> strides { 8, 4 }; 192 py::buffer_info buf_ndim2(vptr, 4, "i", 2, shape, strides); 193 py::buffer_info buf_ndim2_null(nullptr, 4, "i", 2, shape, strides); 203 case 10: return arr_t(shape, strides, ptr); 204 case 11: return py::array(shape, strides, ptr); 205 case 12: return py::array(dtype, shape, strides, vptr); 212 case 20: return fill(arr_t(shape, strides)); 213 case 21: return py::array(shape, strides, ptr); // can't have nullptr due to templated ctor 214 case 22: return fill(py::array(dtype, shape, strides));
|
H A D | test_numpy_array.py | 34 assert all(m.strides(a) == []) 39 m.strides(a, 0) 53 assert all(m.strides(a) == [6, 2]) 54 assert m.strides(a, 0) == 6 55 assert m.strides(a, 1) == 2 60 m.strides(a, 2) 170 assert a.strides == b.strides
|
H A D | test_numpy_array.cpp | 163 sm.def("strides", [](const arr& a) { return arr(a.ndim(), a.strides()); }); 164 sm.def("strides", [](const arr& a, ssize_t dim) { return a.strides(dim); }); 199 {a.strides(), a.strides() + a.ndim()},
|
/gem5/ext/pybind11/include/pybind11/detail/ |
H A D | class.h | 492 view->strides = &info->strides[0];
|
Completed in 29 milliseconds