Searched refs:capsule (Results 1 - 9 of 9) sorted by relevance
/gem5/ext/pybind11/include/pybind11/ |
H A D | embed.h | 152 // internals to be created during Py_Finalize() (e.g. if a py::capsule calls `get_internals()` 156 if (builtins.contains(id) && isinstance<capsule>(builtins[id])) 157 internals_ptr_ptr = capsule(builtins[id]);
|
H A D | functional.h | 46 auto c = reinterpret_borrow<capsule>(PyCFunction_GET_SELF(cfunc.ptr()));
|
H A D | pytypes.h | 1145 class capsule : public object { class in inherits:object 1147 PYBIND11_OBJECT_DEFAULT(capsule, object, PyCapsule_CheckExact) 1148 PYBIND11_DEPRECATED("Use reinterpret_borrow<capsule>() or reinterpret_steal<capsule>()") 1149 capsule(PyObject *ptr, bool is_borrowed) : object(is_borrowed ? object(ptr, borrowed_t{}) : object(ptr, stolen_t{})) { } function in class:capsule 1151 explicit capsule(const void *value, const char *name = nullptr, void (*destructor)(PyObject *) = nullptr) function in class:capsule 1154 pybind11_fail("Could not allocate capsule object!"); 1158 capsule(const void *value, void (*destruct)(PyObject *)) function in class:capsule 1161 pybind11_fail("Could not allocate capsule object!"); 1164 capsule(cons function in class:capsule 1178 capsule(void (*destructor)()) { function in class:capsule [all...] |
H A D | cast.h | 622 type_info *foreign_typeinfo = reinterpret_borrow<capsule>(getattr(pytype, local_key)); 1087 /* Check if this is a capsule */ 1088 if (isinstance<capsule>(h)) { 1089 value = reinterpret_borrow<capsule>(h); 1106 return capsule(ptr).release(); 1113 static constexpr auto name = _("capsule");
|
H A D | pybind11.h | 296 auto rec_capsule = reinterpret_borrow<capsule>(PyCFunction_GET_SELF(rec->sibling.ptr())); 317 capsule rec_capsule(rec, [](void *ptr) { 939 setattr(m_ptr, PYBIND11_MODULE_LOCAL_ID, capsule(tinfo)); 1365 return h ? (detail::function_record *) reinterpret_borrow<capsule>(PyCFunction_GET_SELF(h.ptr()))
|
H A D | eigen.h | 239 // Takes a pointer to some dense, plain Eigen type, builds a capsule around it, then returns a numpy 240 // array that references the encapsulated data with a python-side reference to the capsule to tie 245 capsule base(src, [](void *o) { delete static_cast<Type *>(o); });
|
/gem5/ext/pybind11/tests/ |
H A D | test_pytypes.cpp | 85 py::print("creating capsule"); 86 return py::capsule([]() { 87 py::print("destructing capsule"); 92 py::print("creating capsule"); 93 return py::capsule((void *) 1234, [](void *ptr) { 94 py::print("destructing capsule: {}"_s.format((size_t) ptr)); 99 auto capsule = py::capsule((void *) 1234, "pointer type description", [](PyObject *ptr) { 102 py::print("destructing capsule ({}, '{}')"_s.format( 107 void *contents = capsule; [all...] |
/gem5/ext/pybind11/include/pybind11/detail/ |
H A D | internals.h | 247 if (builtins.contains(id) && isinstance<capsule>(builtins[id])) { 248 internals_pp = static_cast<internals **>(capsule(builtins[id])); 278 builtins[id] = capsule(internals_pp);
|
/gem5/ext/pybind11/tests/test_embed/ |
H A D | test_interpreter.cpp | 141 py::capsule(&ran, [](void *ran) { py::detail::get_internals(); *static_cast<bool *>(ran) = true; });
|
Completed in 37 milliseconds