/gem5/ext/pybind11/tests/ |
H A D | test_eigen.cpp | 271 // Test that we can cast a numpy object to a Eigen::MatrixXd explicitly 272 m.def("cpp_copy", [](py::handle m) { return m.cast<Eigen::MatrixXd>()(1, 0); }); 273 m.def("cpp_ref_c", [](py::handle m) { return m.cast<Eigen::Ref<Eigen::MatrixXd>>()(1, 0); }); 274 m.def("cpp_ref_r", [](py::handle m) { return m.cast<Eigen::Ref<MatrixXdR>>()(1, 0); }); 275 m.def("cpp_ref_any", [](py::handle m) { return m.cast<py::EigenDRef<Eigen::MatrixXd>>()(1, 0); });
|
H A D | test_smart_ptr.cpp | 169 py::object o2 = py::cast(o, py::return_value_policy::reference); 363 list.append(py::cast(e));
|
H A D | test_sequences_and_iterators.cpp | 301 .def("__iter__", [](py::object s) { return PySequenceIterator(s.cast<const Sequence &>(), s); }) 334 return p.second.cast<int>() != 0;
|
H A D | test_callbacks.cpp | 166 start_f(py::cast<int>(i));
|
H A D | test_numpy_array.cpp | 60 check.size_numpy = check.dtype.attr("itemsize").template cast<int>(); 215 ArrayClass &a = obj.cast<ArrayClass&>();
|
H A D | test_class.cpp | 193 const auto &r = o.cast<const ConvertibleFromUserType &>(); 200 o.cast<const ConvertibleFromUserType &>();
|
H A D | constructor_stats.h | 148 for (const auto &v : _values) l.append(py::cast(v)); 230 /// Don't cast pointers to Python, print them as strings
|
H A D | test_factory_constructors.cpp | 148 m_tag.attr(#Name) = py::cast(Name##_tag{})
|
H A D | test_numpy_dtypes.cpp | 336 l.append(py::cast(fmt));
|
/gem5/ext/pybind11/include/pybind11/ |
H A D | pybind11.h | 140 /* Try to cast the function arguments into the C++ domain */ 159 handle result = cast_out::cast( 205 a.descr = strdup(a.value.attr("__repr__")().cast<std::string>().c_str()); 257 th.attr("__module__").cast<std::string>() + "." + 258 th.attr("__qualname__").cast<std::string>(); // Python 3.3+, but we backport it to earlier versions 263 rec->scope.attr("__module__").cast<std::string>() + "." + 264 rec->scope.attr("__qualname__").cast<std::string>(); 986 /// Set the pointer to operator new if it exists. The cast is needed because it can be overloaded. 1018 /// Given a pointer to a member function, cast it to its `Derived` version. 1587 m_base.value(name, pybind11::cast(valu [all...] |
H A D | numpy.h | 500 .attr("_dtype_from_pep3118").cast<object>().release().ptr(); 514 auto spec = field.cast<tuple>(); 515 auto name = spec[0].cast<pybind11::str>(); 516 auto format = spec[1].cast<tuple>()[0].cast<dtype>(); 517 auto offset = spec[1].cast<tuple>()[1].cast<pybind11::int_>(); 525 return a.offset.cast<int>() < b.offset.cast<int>(); 991 static handle cast(cons [all...] |
H A D | pytypes.h | 101 may need to be converted back into a Python object using `handle::cast()`. 200 Attempt to cast the Python object into the given C++ type. A `cast_error` 203 template <typename T> T cast() const; 270 // Calling cast() on an object lvalue just copies (via handle::cast) 271 template <typename T> T cast() const &; 273 template <typename T> T cast() &&; 465 // through pybind11::cast(obj) to convert it to an `object`. 468 // The following casting version is implemented in cast.h: 509 template <typename T> T cast() cons function in class:accessor [all...] |
H A D | stl_bind.h | 135 v->push_back(h.cast<T>()); 153 v.push_back(h.cast<T>());
|
/gem5/src/sim/ |
H A D | init.cc | 204 m_m5.attr("__package__") = py::cast("_m5");
|
/gem5/ext/systemc/src/sysc/datatypes/fx/ |
H A D | sc_fix.h | 1048 c.cast(); 1099 c.cast(); \ 1188 cast(); \ 1762 c.cast(); 1805 c.cast(); \ 1886 cast(); \
|
H A D | sc_ufix.h | 1051 c.cast(); 1102 c.cast(); \ 1191 cast(); \ 1765 c.cast(); 1808 c.cast(); \ 1889 cast(); \
|
H A D | sc_fxnum.cpp | 620 sc_fxnum_fast::cast() function in class:sc_dt::sc_fxnum_fast
|
H A D | scfx_rep.h | 213 void cast( const scfx_params&, bool&, bool& );
|
H A D | scfx_rep.cpp | 2221 // PUBLIC METHOD : cast 2223 // Performs a destructive cast operation on a scfx_rep. 2227 scfx_rep::cast( const scfx_params& params, bool& q_flag, bool& o_flag )
|
/gem5/src/systemc/ext/dt/fx/ |
H A D | sc_fix.hh | 705 c.cast(); 750 c.cast(); \ 830 cast(); \ 1192 c.cast(); 1229 c.cast(); \ 1300 cast(); \
|
H A D | sc_ufix.hh | 717 c.cast(); 762 c.cast(); \ 842 cast(); \ 1203 c.cast(); 1240 c.cast(); \ 1311 cast(); \
|
H A D | scfx_rep.hh | 195 void cast(const scfx_params &, bool &, bool &);
|
/gem5/src/systemc/dt/fx/ |
H A D | sc_fxnum.cc | 565 sc_fxnum_fast::cast() function in class:sc_dt::sc_fxnum_fast
|
H A D | scfx_rep.cc | 2018 // PUBLIC METHOD : cast 2020 // Performs a destructive cast operation on a scfx_rep. 2024 scfx_rep::cast(const scfx_params ¶ms, bool &q_flag, bool &o_flag)
|