From 72e816e50039ed865477d5d34aae6df7a6360d4c Mon Sep 17 00:00:00 2001 From: Chunel Date: Mon, 4 May 2026 22:35:14 +0800 Subject: [PATCH] [python] optimize python GRegion and so on, devide func. --- python/PyCGraph.cpp | 11 ----------- python/wrapper/PyWrapperMacro.h | 4 ++-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/python/PyCGraph.cpp b/python/PyCGraph.cpp index 8886abaf..7bd05254 100644 --- a/python/PyCGraph.cpp +++ b/python/PyCGraph.cpp @@ -327,20 +327,9 @@ PYBIND11_MODULE(pycgraph, cg) { py::arg("func")); PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GCluster); - PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GClusterInterface); - PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GRegion); - PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GRegionInterface); - PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GCondition); - PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GConditionInterface); - PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GSerialMultiCondition); - PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GSerialMultiConditionInterface); - PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GParallelMultiCondition); - PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GParallelMultiConditionInterface); - PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GMutable); - PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(GMutableInterface); } diff --git a/python/wrapper/PyWrapperMacro.h b/python/wrapper/PyWrapperMacro.h index 49948347..d58e8aea 100644 --- a/python/wrapper/PyWrapperMacro.h +++ b/python/wrapper/PyWrapperMacro.h @@ -38,14 +38,14 @@ public: explicit PCGG##Interface(const CGraph::GElementPtrArr& elements = CGraph::GElementPtrArr{}) : PCGG(elements) {}; \ ~PCGG##Interface() override = default; \ protected: \ - PYCGRAPH_DECLARE_GELEMENT_COMMON_FUNCTIONS(PCGG##Interface) \ + PYCGRAPH_DECLARE_GELEMENT_COMMON_FUNCTIONS(PCGG) \ PVFunc \ }; \ \ #define PYCGRAPH_DECLARE_GGROUP_PYBIND11_FUNCTIONS(PCGG) \ - py::class_ >(cg, #PCGG) \ + py::class_ >(cg, #PCGG) \ .def(py::init(), \ py::arg("elements") = GElementPtrArr{}, \ py::keep_alive<1, 2>()) \