diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-08-07 14:30:16 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-02-12 06:49:40 -0500 |
commit | aa726aa597d5e1aa75b69b0e37caa98ee63d6543 (patch) | |
tree | 303ee8839e1ce0f8c5b5a54dd5f224d64ce8e722 | |
parent | 25a6b1557b0cca0c122d8c05c892d406ab258554 (diff) |
Export the LP-based analysis of the DFLP/DPCP
...via Swig to Python. The actual Python API will
be finalized later.
-rw-r--r-- | native/Makefile | 5 | ||||
-rw-r--r-- | native/include/lp_analysis.h | 12 | ||||
-rw-r--r-- | native/interface/lp_analysis.i | 12 |
3 files changed, 29 insertions, 0 deletions
diff --git a/native/Makefile b/native/Makefile index c2a08e5..6d2a144 100644 --- a/native/Makefile +++ b/native/Makefile | |||
@@ -102,6 +102,8 @@ ALL = testmain _sched.so _locking.so _sim.so | |||
102 | ifneq ($(CPLEX),) | 102 | ifneq ($(CPLEX),) |
103 | LP_OBJ = lp_common.o lp_dflp.o lp_dpcp.o | 103 | LP_OBJ = lp_common.o lp_dflp.o lp_dpcp.o |
104 | LP_OBJ += cplex.o io.o | 104 | LP_OBJ += cplex.o io.o |
105 | |||
106 | ALL += _lp_analysis.so | ||
105 | endif | 107 | endif |
106 | 108 | ||
107 | .PHONY: all clean | 109 | .PHONY: all clean |
@@ -131,3 +133,6 @@ _locking.so: ${SYNC_OBJ} interface/locking_wrap.o | |||
131 | 133 | ||
132 | _sim.so: ${CORE_OBJ} ${SCHED_OBJ} interface/sim_wrap.o | 134 | _sim.so: ${CORE_OBJ} ${SCHED_OBJ} interface/sim_wrap.o |
133 | $(CXX) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ $(LDFLAGS) | 135 | $(CXX) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ $(LDFLAGS) |
136 | |||
137 | _lp_analysis.so: ${LP_OBJ} sharedres.o cpu_time.o interface/lp_analysis_wrap.o | ||
138 | $(CXX) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ $(LDFLAGS) | ||
diff --git a/native/include/lp_analysis.h b/native/include/lp_analysis.h new file mode 100644 index 0000000..c33be61 --- /dev/null +++ b/native/include/lp_analysis.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef LP_ANALYSYS_H_ | ||
2 | #define LP_ANALYSYS_H_ | ||
3 | |||
4 | #include "sharedres_types.h" | ||
5 | |||
6 | extern BlockingBounds* lp_dpcp_bounds(const ResourceSharingInfo& info, | ||
7 | const ResourceLocality& locality, bool use_RTA = true); | ||
8 | |||
9 | extern BlockingBounds* lp_dflp_bounds(const ResourceSharingInfo& info, | ||
10 | const ResourceLocality& locality); | ||
11 | |||
12 | #endif /* LP_ANALYSYS_H_ */ | ||
diff --git a/native/interface/lp_analysis.i b/native/interface/lp_analysis.i new file mode 100644 index 0000000..c826106 --- /dev/null +++ b/native/interface/lp_analysis.i | |||
@@ -0,0 +1,12 @@ | |||
1 | %module lp_analysis | ||
2 | %{ | ||
3 | #define SWIG_FILE_WITH_INIT | ||
4 | #include "lp_analysis.h" | ||
5 | %} | ||
6 | |||
7 | %newobject lp_dpcp_bounds; | ||
8 | %newobject lp_dflp_bounds; | ||
9 | |||
10 | %include "sharedres_types.i" | ||
11 | |||
12 | %include "lp_analysis.h" | ||