Home
last modified time | relevance | path

Searched defs:type_caster (Results 1 – 6 of 6) sorted by relevance

/external/python/pybind11/tests/
Dtest_custom_type_casters.cpp19 template <> struct type_caster<ArgInspector1> { struct
23 bool load(handle src, bool convert) { in load()
30 static handle cast(const ArgInspector1 &src, return_value_policy, handle) { in cast()
34 template <> struct type_caster<ArgInspector2> { struct
38 bool load(handle src, bool convert) { in load()
45 static handle cast(const ArgInspector2 &src, return_value_policy, handle) { in cast()
49 template <> struct type_caster<ArgAlwaysConverts> { struct
53 bool load(handle, bool convert) { in load()
57 static handle cast(const ArgAlwaysConverts &, return_value_policy, handle) { in cast()
75 template <> struct type_caster<DestructionTester> { struct
[all …]
Dtest_copy_move.cpp73 template <> struct type_caster<MoveOnlyInt> { struct
79 template <> struct type_caster<MoveOrCopyInt> { argument
85 template <> struct type_caster<CopyOnlyInt> { argument
87 CopyOnlyInt value;
89 static constexpr auto name = _("CopyOnlyInt");
90 bool load(handle src, bool) { value = CopyOnlyInt(src.cast<int>()); return true; } in load()
91 …st(const CopyOnlyInt &m, return_value_policy r, handle p) { return pybind11::cast(m.value, r, p); } in cast()
92 static handle cast(const CopyOnlyInt *src, return_value_policy policy, handle parent) { in cast()
96 operator CopyOnlyInt*() { return &value; } in operator CopyOnlyInt*()
97 operator CopyOnlyInt&() { return value; } in operator CopyOnlyInt&()
[all …]
Dtest_stl.cpp27 struct type_caster<boost::variant<Ts...>> : variant_caster<boost::variant<Ts...>> {}; struct
Dtest_builtin_casters.cpp25 class type_caster<ConstRefCasted> { class
/external/tensorflow/tensorflow/python/util/
Dpy_checkpoint_reader_wrapper.cc55 struct type_caster<tensorflow::TensorShape> { struct
59 static handle cast(const tensorflow::TensorShape& src, in cast()
80 struct type_caster<tensorflow::DataType> { struct
84 static handle cast(const tensorflow::DataType& src, in cast()
/external/tensorflow/tensorflow/python/client/
Dtf_session_wrapper.cc52 struct type_caster<absl::optional<T>> struct
55 struct type_caster<absl::nullopt_t> : public void_caster<absl::nullopt_t> {}; struct