core.cc (12011:1279b1d30ccd) | core.cc (12035:7b8e1b36875d) |
---|---|
1/* 2 * Copyright (c) 2017 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 32 unchanged lines hidden (view full) --- 41 * Authors: Nathan Binkert 42 * Steve Reinhardt 43 * Gabe Black 44 * Andreas Sandberg 45 */ 46 47#include "pybind11/pybind11.h" 48 | 1/* 2 * Copyright (c) 2017 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 32 unchanged lines hidden (view full) --- 41 * Authors: Nathan Binkert 42 * Steve Reinhardt 43 * Gabe Black 44 * Andreas Sandberg 45 */ 46 47#include "pybind11/pybind11.h" 48 |
49#include "python/pybind11/core.hh" 50 |
|
49#include <ctime> 50 51#include "base/addr_range.hh" 52#include "base/inet.hh" 53#include "base/misc.hh" 54#include "base/random.hh" 55#include "base/socket.hh" 56#include "base/types.hh" --- 101 unchanged lines hidden (view full) --- 158 .def("valid", &AddrRange::valid) 159 .def("start", &AddrRange::start) 160 .def("end", &AddrRange::end) 161 .def("mergesWith", &AddrRange::mergesWith) 162 .def("intersects", &AddrRange::intersects) 163 .def("isSubset", &AddrRange::isSubset) 164 ; 165 | 51#include <ctime> 52 53#include "base/addr_range.hh" 54#include "base/inet.hh" 55#include "base/misc.hh" 56#include "base/random.hh" 57#include "base/socket.hh" 58#include "base/types.hh" --- 101 unchanged lines hidden (view full) --- 160 .def("valid", &AddrRange::valid) 161 .def("start", &AddrRange::start) 162 .def("end", &AddrRange::end) 163 .def("mergesWith", &AddrRange::mergesWith) 164 .def("intersects", &AddrRange::intersects) 165 .def("isSubset", &AddrRange::isSubset) 166 ; 167 |
168 // We need to make vectors of AddrRange opaque to avoid a weird 169 // memory allocation issues in PyBind's STL wrappers. 170 py::bind_vector<std::vector<AddrRange>>(m, "AddrRangeVector"); 171 |
|
166 m.def("RangeEx", &RangeEx); 167 m.def("RangeIn", &RangeIn); 168 m.def("RangeSize", &RangeSize); 169} 170 171static void 172init_net(py::module &m_native) 173{ --- 100 unchanged lines hidden --- | 172 m.def("RangeEx", &RangeEx); 173 m.def("RangeIn", &RangeIn); 174 m.def("RangeSize", &RangeSize); 175} 176 177static void 178init_net(py::module &m_native) 179{ --- 100 unchanged lines hidden --- |