-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use pybind wrappers, merge into one pybind shared lib
- Loading branch information
Matthias Wittgen
committed
Feb 10, 2023
1 parent
cc3ba21
commit 59b00ab
Showing
19 changed files
with
534 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
## -*- python -*- | ||
from lsst.sconsUtils import scripts | ||
scripts.BasicSConscript.pybind11([ | ||
"basisLists", | ||
"findSetBits", | ||
"imageStatistics", | ||
"imageSubtract", | ||
"kernelCandidate", | ||
"kernelCandidateDetection", | ||
"kernelSolution", | ||
], addUnderscore=False) | ||
|
||
# Plugin registration fails if this does not have an underscore | ||
scripts.BasicSConscript.pybind11(["dipoleAlgorithms"]) | ||
scripts.BasicSConscript.python(['_ipdiffimLib'], [ | ||
'_ipdiffimLib.cc', | ||
'basisLists.cc', | ||
'dipoleAlgorithms.cc', | ||
'findSetBits.cc', | ||
'imageStatistics.cc', | ||
'imageSubtract.cc', | ||
'kernelCandidate.cc', | ||
'kernelCandidateDetection.cc', | ||
'kernelSolution.cc', | ||
'detail/assessSpatialKernelVisitor.cc', | ||
'detail/buildSingleKernelVisitor.cc', | ||
'detail/buildSpatialKernelVisitor.cc', | ||
'detail/kernelPca.cc', | ||
'detail/kernelSumVisitor.cc' | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* This file is part of ip_diffim. | ||
* | ||
* Developed for the LSST Data Management System. | ||
* This product includes software developed by the LSST Project | ||
* (https://www.lsst.org). | ||
* See the COPYRIGHT file at the top-level directory of this distribution | ||
* for details of code ownership. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "pybind11/pybind11.h" | ||
#include "lsst/cpputils/python.h" | ||
|
||
namespace py = pybind11; | ||
using namespace pybind11::literals; | ||
using lsst::cpputils::python::WrapperCollection; | ||
|
||
namespace lsst { | ||
namespace ip { | ||
namespace diffim { | ||
void wrapBasisLists(WrapperCollection &wrappers); | ||
void wrapDipoleAlgorithms(WrapperCollection &wrappers); | ||
void wrapFindSetBits(WrapperCollection &wrappers); | ||
void wrapImageStatistics(WrapperCollection &wrappers); | ||
void wrapImageSubtract(WrapperCollection &wrappers); | ||
void wrapKernelCandidate(WrapperCollection &wrappers); | ||
void wrapKernelCandidateDetection(WrapperCollection &wrappers); | ||
void wrapKernelSolution(WrapperCollection &wrappers); | ||
namespace detail { | ||
void wrapAssessSpatialKernelVisitor(WrapperCollection &wrappers); | ||
void wrapBuildSingleKernelVisitor(WrapperCollection &wrappers); | ||
void wrapBuildSpatialKernelVisitor(WrapperCollection &wrappers); | ||
void wrapKernelPca(WrapperCollection &wrappers); | ||
void wrapKernelSumVisitor(WrapperCollection &wrappers); | ||
} | ||
PYBIND11_MODULE(_ipdiffimLib, mod) { | ||
lsst::utils::python::WrapperCollection wrappers(mod, "ip.diffim"); | ||
wrappers.addInheritanceDependency("lsst.meas.base"); | ||
wrappers.addInheritanceDependency("lsst.afw.math"); | ||
wrappers.addSignatureDependency("lsst.afw.table"); | ||
wrappers.addSignatureDependency("lsst.afw.image"); | ||
wrappers.addSignatureDependency("lsst.afw.geom"); | ||
wrappers.addSignatureDependency("lsst.daf.base"); | ||
wrappers.addSignatureDependency("lsst.afw.detection"); | ||
|
||
wrapBasisLists(wrappers); | ||
wrapDipoleAlgorithms(wrappers); | ||
wrapFindSetBits(wrappers); | ||
wrapImageStatistics(wrappers); | ||
wrapImageSubtract(wrappers); | ||
wrapKernelCandidate(wrappers); | ||
wrapKernelCandidateDetection(wrappers); | ||
wrapKernelSolution(wrappers); | ||
detail::wrapAssessSpatialKernelVisitor(wrappers); | ||
detail::wrapBuildSingleKernelVisitor(wrappers); | ||
detail::wrapBuildSpatialKernelVisitor(wrappers); | ||
detail::wrapKernelPca(wrappers); | ||
detail::wrapKernelSumVisitor(wrappers); | ||
wrappers.finish(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.