Home
last modified time | relevance | path

Searched refs:return_value_policy (Results 1 – 25 of 45) sorted by relevance

12

/external/google-benchmark/bindings/python/google_benchmark/
Dbenchmark.cc78 .def("unit", &Benchmark::Unit, py::return_value_policy::reference) in PYBIND11_MODULE()
79 .def("arg", &Benchmark::Arg, py::return_value_policy::reference) in PYBIND11_MODULE()
80 .def("args", &Benchmark::Args, py::return_value_policy::reference) in PYBIND11_MODULE()
81 .def("range", &Benchmark::Range, py::return_value_policy::reference, in PYBIND11_MODULE()
84 py::return_value_policy::reference, py::arg("start"), in PYBIND11_MODULE()
86 .def("ranges", &Benchmark::Ranges, py::return_value_policy::reference) in PYBIND11_MODULE()
88 py::return_value_policy::reference) in PYBIND11_MODULE()
89 .def("arg_name", &Benchmark::ArgName, py::return_value_policy::reference) in PYBIND11_MODULE()
91 py::return_value_policy::reference) in PYBIND11_MODULE()
93 py::return_value_policy::reference, py::arg("lo1"), py::arg("hi1"), in PYBIND11_MODULE()
[all …]
/external/python/pybind11/include/pybind11/
Deigen.h295 static handle cast_impl(CType *src, return_value_policy policy, handle parent) {
297 case return_value_policy::take_ownership:
298 case return_value_policy::automatic:
300 case return_value_policy::move:
302 case return_value_policy::copy:
304 case return_value_policy::reference:
305 case return_value_policy::automatic_reference:
307 case return_value_policy::reference_internal:
317 static handle cast(Type &&src, return_value_policy /* policy */, handle parent) {
318 return cast_impl(&src, return_value_policy::move, parent);
[all …]
Dcast.h499 … PYBIND11_NOINLINE static handle cast(const void *_src, return_value_policy policy, handle parent,
525 case return_value_policy::automatic:
526 case return_value_policy::take_ownership:
531 case return_value_policy::automatic_reference:
532 case return_value_policy::reference:
537 case return_value_policy::copy:
554 case return_value_policy::move:
574 case return_value_policy::reference_internal:
870 static handle cast(const itype &src, return_value_policy policy, handle parent) {
871 …if (policy == return_value_policy::automatic || policy == return_value_policy::automatic_reference)
[all …]
Dstl.h86 static handle cast(T &&src, return_value_policy policy, handle parent) { in cast()
122 static handle cast(T &&src, return_value_policy policy, handle parent) { in cast()
124 return_value_policy policy_key = policy; in cast()
125 return_value_policy policy_value = policy; in cast()
169 static handle cast(T &&src, return_value_policy policy, handle parent) { in cast()
228 static handle cast(T &&src, return_value_policy policy, handle parent) {
266 static handle cast(T_ &&src, return_value_policy policy, handle parent) {
310 return_value_policy policy;
363 static handle cast(Variant &&src, return_value_policy policy, handle parent) {
Dattr.h169 return_value_policy policy = return_value_policy::automatic;
351 template <> struct process_attribute<return_value_policy> : process_attribute_default<return_value_…
352 static void init(const return_value_policy &p, function_record *r) { r->policy = p; }
Dpybind11.h186return_value_policy policy = return_value_policy_override<Return>::policy(call.func.policy); in PYBIND11_NAMESPACE_BEGIN()
1400 def_property(name, fget, fset, return_value_policy::reference_internal, extra...);
1408 def_property_readonly(name, fget, return_value_policy::reference_internal, extra...);
1416 def_property_static(name, fget, fset, return_value_policy::reference, extra...);
1423 def_property_readonly_static(name, fget, return_value_policy::reference, extra...);
1431 return_value_policy::reference_internal, extra...);
1443 …return def_property_readonly_static(name, cpp_function(fget), return_value_policy::reference, extr…
1460 return_value_policy::reference_internal, extra...);
1472 …return def_property_static(name, cpp_function(fget), fset, return_value_policy::reference, extra..…
1809 m_base.value(name, pybind11::cast(value, return_value_policy::copy), doc);
[all …]
Dchrono.h73 static handle cast(const type &src, return_value_policy /* policy */, handle /* parent */) { in PYBIND11_NAMESPACE_BEGIN()
147 …std::chrono::time_point<std::chrono::system_clock, Duration> &src, return_value_policy /* policy *… in cast() argument
Dcomplex.h58 …static handle cast(const std::complex<T> &src, return_value_policy /* policy */, handle /* parent …
/external/python/pybind11/tests/
Dtest_custom_type_casters.cpp30 static handle cast(const ArgInspector1 &src, return_value_policy, handle) { in cast()
45 static handle cast(const ArgInspector2 &src, return_value_policy, handle) { in cast()
57 static handle cast(const ArgAlwaysConverts &, return_value_policy, handle) { in cast()
79 static handle cast(const DestructionTester &, return_value_policy, handle) { in cast()
124 py::return_value_policy::take_ownership); // Takes ownership: destroy when finished in TEST_SUBMODULE()
126 … py::return_value_policy::take_ownership); // Likewise (const doesn't inhibit destruction) in TEST_SUBMODULE()
127 …ion_tester_cstats", &ConstructorStats::get<DestructionTester>, py::return_value_policy::reference); in TEST_SUBMODULE()
Dtest_copy_move.cpp76 …static handle cast(const MoveOnlyInt &m, return_value_policy r, handle p) { return pybind11::cast(… in cast()
82 …static handle cast(const MoveOrCopyInt &m, return_value_policy r, handle p) { return pybind11::cas… in cast()
91 …static handle cast(const CopyOnlyInt &m, return_value_policy r, handle p) { return pybind11::cast(… in cast()
92 static handle cast(const CopyOnlyInt *src, return_value_policy policy, handle parent) { in cast()
107 py::return_value_policy::copy); in PYBIND11_NAMESPACE_END()
111 py::return_value_policy::move); in PYBIND11_NAMESPACE_END()
154 d["MoveOrCopyInt"] = py::cast(mc, py::return_value_policy::reference); in PYBIND11_NAMESPACE_END()
155 d["MoveOnlyInt"] = py::cast(mo, py::return_value_policy::reference); in PYBIND11_NAMESPACE_END()
156 d["CopyOnlyInt"] = py::cast(co, py::return_value_policy::reference); in PYBIND11_NAMESPACE_END()
198 }, py::return_value_policy::reference); in PYBIND11_NAMESPACE_END()
[all …]
Dpybind11_tests.h68 …static handle cast(RValueCaster &&, return_value_policy, handle) { return py::str("rvalue").releas… in PYBIND11_NAMESPACE_BEGIN()
69 …static handle cast(const RValueCaster &, return_value_policy, handle) { return py::str("lvalue").r… in PYBIND11_NAMESPACE_BEGIN()
Dtest_modules.cpp49 … .def("get_a1", &B::get_a1, "Return the internal A 1", py::return_value_policy::reference_internal) in TEST_SUBMODULE()
50 … .def("get_a2", &B::get_a2, "Return the internal A 2", py::return_value_policy::reference_internal) in TEST_SUBMODULE()
Dtest_smart_ptr.cpp170 py::object o2 = py::cast(o, py::return_value_policy::reference); in TEST_SUBMODULE()
275 py::return_value_policy::copy) in TEST_SUBMODULE()
278 py::return_value_policy::copy) in TEST_SUBMODULE()
301 py::return_value_policy::copy) in TEST_SUBMODULE()
304 py::return_value_policy::copy) in TEST_SUBMODULE()
Dtest_eigen.cpp139 }, py::return_value_policy::reference); in TEST_SUBMODULE()
145 }, py::return_value_policy::reference); in TEST_SUBMODULE()
152 }, py::return_value_policy::reference); in TEST_SUBMODULE()
159 }, py::return_value_policy::reference); in TEST_SUBMODULE()
193 using rvp = py::return_value_policy; in TEST_SUBMODULE()
Dtest_factory_constructors.cpp230 ….def_static("get_cstats", &ConstructorStats::get<TestFactory6>, py::return_value_policy::reference) in TEST_SUBMODULE()
231 … .def_static("get_alias_cstats", &ConstructorStats::get<PyTF6>, py::return_value_policy::reference) in TEST_SUBMODULE()
265 ….def_static("get_cstats", &ConstructorStats::get<TestFactory7>, py::return_value_policy::reference) in TEST_SUBMODULE()
266 … .def_static("get_alias_cstats", &ConstructorStats::get<PyTF7>, py::return_value_policy::reference) in TEST_SUBMODULE()
/external/tensorflow/tensorflow/python/
Dtfe_wrapper.cc627 py::return_value_policy::reference); in PYBIND11_MODULE()
641 py::return_value_policy::reference); in PYBIND11_MODULE()
786 py::return_value_policy::reference); in PYBIND11_MODULE()
808 py::return_value_policy::reference); in PYBIND11_MODULE()
1011 py::return_value_policy::reference); in PYBIND11_MODULE()
1027 py::return_value_policy::reference); in PYBIND11_MODULE()
1081 py::return_value_policy::reference); in PYBIND11_MODULE()
1114 py::return_value_policy::reference); in PYBIND11_MODULE()
1116 py::return_value_policy::reference); in PYBIND11_MODULE()
1118 py::return_value_policy::reference); in PYBIND11_MODULE()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/python/mlir_wrapper/
Dbasic_classes.cc33 .def("back", &mlir::Region::back, py::return_value_policy::reference) in init_basic_classes()
34 .def("front", &mlir::Region::front, py::return_value_policy::reference) in init_basic_classes()
38 .def("front", &mlir::Region::front, py::return_value_policy::reference); in init_basic_classes()
42 py::return_value_policy::reference) in init_basic_classes()
Dbuilders.cc47 py::return_value_policy::reference) in init_builders()
49 py::return_value_policy::reference); in init_builders()
Dops.cc27 py::return_value_policy::reference) in init_ops()
45 py::return_value_policy::reference); in init_ops()
71 py::return_value_policy::reference) in init_ops()
/external/tensorflow/tensorflow/python/client/
Dtf_session_wrapper.cc178 py::return_value_policy::reference, in PYBIND11_MODULE()
221 py::return_value_policy::reference); in PYBIND11_MODULE()
335 py::return_value_policy::reference); in PYBIND11_MODULE()
348 py::return_value_policy::reference); in PYBIND11_MODULE()
558 m.def("TF_NewGraph", TF_NewGraph, py::return_value_policy::reference, in PYBIND11_MODULE()
585 py::return_value_policy::reference); in PYBIND11_MODULE()
598 py::return_value_policy::reference); in PYBIND11_MODULE()
667 m.def("TF_NewBuffer", TF_NewBuffer, py::return_value_policy::reference); in PYBIND11_MODULE()
681 py::return_value_policy::reference); in PYBIND11_MODULE()
712 py::return_value_policy::reference); in PYBIND11_MODULE()
[all …]
/external/python/pybind11/docs/advanced/
Dfunctions.rst22 :enum:`return_value_policy::automatic`.
38 In this case, the default return value policy (:enum:`return_value_policy::automatic`)
47 In the above example, the policy :enum:`return_value_policy::reference` should have
53 m.def("get_data", &get_data, return_value_policy::reference);
66 | :enum:`return_value_policy::take_ownership` | Reference an existing object (i.e. do not crea…
71 | :enum:`return_value_policy::copy` | Create a new copy of the returned object, whic…
75 | :enum:`return_value_policy::move` | Use ``std::move`` to move the return value con…
79 | :enum:`return_value_policy::reference` | Reference an existing object, but do not take …
84 | :enum:`return_value_policy::reference_internal` | Indicates that the lifetime of the return valu…
87 | | :enum:`return_value_policy::reference` but add…
[all …]
/external/tensorflow/tensorflow/python/data/experimental/service/
Dserver_lib_wrapper.cc77 py::return_value_policy::reference); in PYBIND11_MODULE()
94 py::return_value_policy::reference); in PYBIND11_MODULE()
/external/tensorflow/tensorflow/python/util/
Dpy_checkpoint_reader_wrapper.cc60 return_value_policy unused_policy, handle unused_handle) { in cast()
85 return_value_policy unused_policy, handle unused_handle) { in cast()
Dtf_stack.cc342 py::return_value_policy::reference_internal) in PYBIND11_MODULE()
365 py::return_value_policy::reference_internal) in PYBIND11_MODULE()
394 py::return_value_policy::reference); in PYBIND11_MODULE()
402 py::return_value_policy::move); in PYBIND11_MODULE()
/external/python/pybind11/docs/advanced/cast/
Dcustom.rst72 * ``return_value_policy::reference_internal``) and are generally
75 static handle cast(inty src, return_value_policy /* policy */, handle /* parent */) {

12