core.cc (12035:7b8e1b36875d) core.cc (12036:634fbd07bc88)
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

--- 118 unchanged lines hidden (view full) ---

127 ;
128}
129
130static void
131init_serialize(py::module &m_native)
132{
133 py::module m = m_native.def_submodule("serialize");
134
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

--- 118 unchanged lines hidden (view full) ---

127 ;
128}
129
130static void
131init_serialize(py::module &m_native)
132{
133 py::module m = m_native.def_submodule("serialize");
134
135 py::class_<Serializable>(m, "Serializable")
135 py::class_<Serializable, std::unique_ptr<Serializable, py::nodelete>>(
136 m, "Serializable")
136 ;
137
138 py::class_<CheckpointIn>(m, "CheckpointIn")
139 ;
140}
141
142static void
143init_range(py::module &m_native)

--- 16 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
137 ;
138
139 py::class_<CheckpointIn>(m, "CheckpointIn")
140 ;
141}
142
143static void
144init_range(py::module &m_native)

--- 16 unchanged lines hidden (view full) ---

161 .def("valid", &AddrRange::valid)
162 .def("start", &AddrRange::start)
163 .def("end", &AddrRange::end)
164 .def("mergesWith", &AddrRange::mergesWith)
165 .def("intersects", &AddrRange::intersects)
166 .def("isSubset", &AddrRange::isSubset)
167 ;
168
168 // We need to make vectors of AddrRange opaque to avoid a weird
169 // We need to make vectors of AddrRange opaque to avoid weird
169 // memory allocation issues in PyBind's STL wrappers.
170 py::bind_vector<std::vector<AddrRange>>(m, "AddrRangeVector");
171
172 m.def("RangeEx", &RangeEx);
173 m.def("RangeIn", &RangeIn);
174 m.def("RangeSize", &RangeSize);
175}
176

--- 103 unchanged lines hidden ---
170 // memory allocation issues in PyBind's STL wrappers.
171 py::bind_vector<std::vector<AddrRange>>(m, "AddrRangeVector");
172
173 m.def("RangeEx", &RangeEx);
174 m.def("RangeIn", &RangeIn);
175 m.def("RangeSize", &RangeSize);
176}
177

--- 103 unchanged lines hidden ---