Searched refs:cast (Results 26 - 49 of 49) sorted by relevance

12

/gem5/ext/pybind11/tests/
H A Dtest_eigen.cpp271 // 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 Dtest_smart_ptr.cpp169 py::object o2 = py::cast(o, py::return_value_policy::reference);
363 list.append(py::cast(e));
H A Dtest_sequences_and_iterators.cpp301 .def("__iter__", [](py::object s) { return PySequenceIterator(s.cast<const Sequence &>(), s); })
334 return p.second.cast<int>() != 0;
H A Dtest_callbacks.cpp166 start_f(py::cast<int>(i));
H A Dtest_numpy_array.cpp60 check.size_numpy = check.dtype.attr("itemsize").template cast<int>();
215 ArrayClass &a = obj.cast<ArrayClass&>();
H A Dtest_class.cpp193 const auto &r = o.cast<const ConvertibleFromUserType &>();
200 o.cast<const ConvertibleFromUserType &>();
H A Dconstructor_stats.h148 for (const auto &v : _values) l.append(py::cast(v));
230 /// Don't cast pointers to Python, print them as strings
H A Dtest_factory_constructors.cpp148 m_tag.attr(#Name) = py::cast(Name##_tag{})
H A Dtest_numpy_dtypes.cpp336 l.append(py::cast(fmt));
/gem5/ext/pybind11/include/pybind11/
H A Dpybind11.h140 /* 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 Dnumpy.h500 .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 Dpytypes.h101 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 Dstl_bind.h135 v->push_back(h.cast<T>());
153 v.push_back(h.cast<T>());
/gem5/src/sim/
H A Dinit.cc204 m_m5.attr("__package__") = py::cast("_m5");
/gem5/ext/systemc/src/sysc/datatypes/fx/
H A Dsc_fix.h1048 c.cast();
1099 c.cast(); \
1188 cast(); \
1762 c.cast();
1805 c.cast(); \
1886 cast(); \
H A Dsc_ufix.h1051 c.cast();
1102 c.cast(); \
1191 cast(); \
1765 c.cast();
1808 c.cast(); \
1889 cast(); \
H A Dsc_fxnum.cpp620 sc_fxnum_fast::cast() function in class:sc_dt::sc_fxnum_fast
H A Dscfx_rep.h213 void cast( const scfx_params&, bool&, bool& );
H A Dscfx_rep.cpp2221 // 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 Dsc_fix.hh705 c.cast();
750 c.cast(); \
830 cast(); \
1192 c.cast();
1229 c.cast(); \
1300 cast(); \
H A Dsc_ufix.hh717 c.cast();
762 c.cast(); \
842 cast(); \
1203 c.cast();
1240 c.cast(); \
1311 cast(); \
H A Dscfx_rep.hh195 void cast(const scfx_params &, bool &, bool &);
/gem5/src/systemc/dt/fx/
H A Dsc_fxnum.cc565 sc_fxnum_fast::cast() function in class:sc_dt::sc_fxnum_fast
H A Dscfx_rep.cc2018 // PUBLIC METHOD : cast
2020 // Performs a destructive cast operation on a scfx_rep.
2024 scfx_rep::cast(const scfx_params &params, bool &q_flag, bool &o_flag)

Completed in 89 milliseconds

12