xo-pyjit: obsolete XferDbl2DblFn etc; prefer pycaller<>
This commit is contained in:
parent
c8d5633d81
commit
444ea0f4b5
1 changed files with 6 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
#include <pybind11/stl.h>
|
#include <pybind11/stl.h>
|
||||||
|
|
||||||
namespace xo {
|
namespace xo {
|
||||||
|
#ifdef OBSOLETE
|
||||||
struct XferDbl2DblFn : public ref::Refcount {
|
struct XferDbl2DblFn : public ref::Refcount {
|
||||||
using fptr_type = double (*) (double);
|
using fptr_type = double (*) (double);
|
||||||
|
|
||||||
|
|
@ -27,6 +28,7 @@ namespace xo {
|
||||||
|
|
||||||
fptr_type fptr_;
|
fptr_type fptr_;
|
||||||
}; /*XferDblDbl2DblFn*/
|
}; /*XferDblDbl2DblFn*/
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace jit {
|
namespace jit {
|
||||||
using xo::ast::Expression;
|
using xo::ast::Expression;
|
||||||
|
|
@ -76,6 +78,7 @@ namespace xo {
|
||||||
.def("dump_current_module", &MachPipeline::dump_current_module,
|
.def("dump_current_module", &MachPipeline::dump_current_module,
|
||||||
py::doc("Dump contents of current module to console"))
|
py::doc("Dump contents of current module to console"))
|
||||||
|
|
||||||
|
#ifdef OBSOLETE
|
||||||
/* double -> double */
|
/* double -> double */
|
||||||
.def("lookup_dbl2dbl_fn",
|
.def("lookup_dbl2dbl_fn",
|
||||||
[](MachPipeline & jit, const std::string & symbol) {
|
[](MachPipeline & jit, const std::string & symbol) {
|
||||||
|
|
@ -95,6 +98,7 @@ namespace xo {
|
||||||
|
|
||||||
return new XferDblDbl2DblFn(fn_addr);
|
return new XferDblDbl2DblFn(fn_addr);
|
||||||
})
|
})
|
||||||
|
#endif
|
||||||
|
|
||||||
.def("lookup_fn",
|
.def("lookup_fn",
|
||||||
[](MachPipeline & jit, const std::string & prototype, const std::string & symbol) -> pycaller_base* {
|
[](MachPipeline & jit, const std::string & prototype, const std::string & symbol) -> pycaller_base* {
|
||||||
|
|
@ -122,6 +126,7 @@ namespace xo {
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef OBSOLETE
|
||||||
py::class_<XferDbl2DblFn, rp<XferDbl2DblFn>>(m, "XferDbl2DblFn")
|
py::class_<XferDbl2DblFn, rp<XferDbl2DblFn>>(m, "XferDbl2DblFn")
|
||||||
.def("__call__",
|
.def("__call__",
|
||||||
[](XferDbl2DblFn & self, double x) { return self(x); }
|
[](XferDbl2DblFn & self, double x) { return self(x); }
|
||||||
|
|
@ -132,6 +137,7 @@ namespace xo {
|
||||||
[](XferDblDbl2DblFn & self, double x, double y) { return self(x, y); }
|
[](XferDblDbl2DblFn & self, double x, double y) { return self(x, y); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
#endif
|
||||||
|
|
||||||
py::class_<llvm::Value,
|
py::class_<llvm::Value,
|
||||||
unowned_ptr<llvm::Value>>(m, "llvm_Value")
|
unowned_ptr<llvm::Value>>(m, "llvm_Value")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue