[PPL-devel] [GIT] ppl/ppl(termination): Added termination_test functions ending with " _2".

Patricia Hill p.m.hill at leeds.ac.uk
Wed Mar 17 08:33:50 CET 2010


Module: ppl/ppl
Branch: termination
Commit: ec57f6b3e45d9035b7a43411ddb9e46e2bb1799b
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=ec57f6b3e45d9035b7a43411ddb9e46e2bb1799b

Author: Patricia Hill <p.m.hill at leeds.ac.uk>
Date:   Wed Mar 17 07:32:57 2010 +0000

Added termination_test functions ending with "_2".

---

 interfaces/C/ppl_interface_generator_c_cc_code.m4  |   49 ++++++++++++++++++++
 interfaces/C/ppl_interface_generator_c_h_code.m4   |   30 ++++++++++++
 ...l_interface_generator_c_procedure_generators.m4 |    3 +
 3 files changed, 82 insertions(+), 0 deletions(-)

diff --git a/interfaces/C/ppl_interface_generator_c_cc_code.m4 b/interfaces/C/ppl_interface_generator_c_cc_code.m4
index 738f80b..08e6c81 100644
--- a/interfaces/C/ppl_interface_generator_c_cc_code.m4
+++ b/interfaces/C/ppl_interface_generator_c_cc_code.m4
@@ -1168,6 +1168,19 @@ CATCH_ALL
 
 ')
 
+m4_define(`ppl_ at CLASS@_termination_test_ at TERMINATION_ID@_2_code',
+`dnl
+int
+ppl_ at CLASS@_termination_test_ at TERMINATION_ID@_2
+(ppl_const_ at CLASS@_t pset_before, ppl_const_ at CLASS@_t pset_after) try {
+  const @CPP_CLASS@& ppset_before = *to_const(pset_before);
+  const @CPP_CLASS@& ppset_after = *to_const(pset_after);
+  return termination_test_ at TERMINATION_ID@_2(ppset_before, ppset_after);
+}
+CATCH_ALL
+
+')
+
 m4_define(`ppl_ at CLASS@_one_affine_ranking_function_ at TERMINATION_ID@_code',
 `int
 ppl_ at CLASS@_one_affine_ranking_function_ at TERMINATION_ID@
@@ -1182,6 +1195,24 @@ CATCH_ALL
 
 ')
 
+m4_define(`ppl_ at CLASS@_one_affine_ranking_function_ at TERMINATION_ID@_2_code',
+`int
+ppl_ at CLASS@_one_affine_ranking_function_ at TERMINATION_ID@_2
+(ppl_const_ at CLASS@_t pset_before,
+ ppl_const_ at CLASS@_t pset_after,
+ ppl_Generator_t point) try {
+  const @CPP_CLASS@& ppset_before = *to_const(pset_before);
+  const @CPP_CLASS@& ppset_after = *to_const(pset_after);
+  Generator& ppoint = *to_nonconst(point);
+  bool ok = one_affine_ranking_function_ at TERMINATION_ID@_2(ppset_before,
+                                                           ppset_after,
+                                                           ppoint);
+  return ok ? 1 : 0;
+}
+CATCH_ALL
+
+')
+
 m4_define(`ppl_ at CLASS@_all_affine_ranking_functions_ at TERMINATION_ID@_code',
 `int
 ppl_ at CLASS@_all_affine_ranking_functions_ at TERMINATION_ID@
@@ -1197,6 +1228,24 @@ CATCH_ALL
 
 ')
 
+m4_define(`ppl_ at CLASS@_all_affine_ranking_functions_ at TERMINATION_ID@_2_code',
+`int
+ppl_ at CLASS@_all_affine_ranking_functions_ at TERMINATION_ID@_2
+(ppl_const_ at CLASS@_t pset_before,
+ ppl_const_ at CLASS@_t pset_after,
+ ppl_Polyhedron_t ph) try {
+  const @CPP_CLASS@& ppset_before = *to_const(pset_before);
+  const @CPP_CLASS@& ppset_after = *to_const(pset_after);
+  all_affine_ranking_functions_ at TERMINATION_ID@_2(ppset_before,
+                                                  ppset_after,
+                                                *static_cast<C_Polyhedron*>
+                                                    (to_nonconst(ph)));
+  return 0;
+}
+CATCH_ALL
+
+')
+
 m4_define(`ppl_ at CLASS@_wrap_assign_code',
 `int
 ppl_ at CLASS@_wrap_assign
diff --git a/interfaces/C/ppl_interface_generator_c_h_code.m4 b/interfaces/C/ppl_interface_generator_c_h_code.m4
index cc96ffc..b8ccb1c 100644
--- a/interfaces/C/ppl_interface_generator_c_h_code.m4
+++ b/interfaces/C/ppl_interface_generator_c_h_code.m4
@@ -43,6 +43,15 @@ PPL_PROTO((ppl_const_ at CLASS@_t pset));
 
 ')
 
+m4_define(`ppl_ at CLASS@_termination_test_ at TERMINATION_ID@_2_code',
+`dnl
+/*! \relates ppl_ at CLASS@_tag */
+int
+ppl_ at CLASS@_termination_test_ at TERMINATION_ID@_2
+PPL_PROTO((ppl_const_ at CLASS@_t pset_before, ppl_const_ at CLASS@_t pset_after));
+
+')
+
 m4_define(`ppl_ at CLASS@_one_affine_ranking_function_ at TERMINATION_ID@_code',
 `dnl
 /*! \relates ppl_ at CLASS@_tag */
@@ -53,6 +62,17 @@ PPL_PROTO((ppl_const_ at CLASS@_t pset,
 
 ')
 
+m4_define(`ppl_ at CLASS@_one_affine_ranking_function_ at TERMINATION_ID@_2_code',
+`dnl
+/*! \relates ppl_ at CLASS@_tag */
+int
+ppl_ at CLASS@_one_affine_ranking_function_ at TERMINATION_ID@_2
+PPL_PROTO((ppl_const_ at CLASS@_t pset_before,
+           ppl_const_ at CLASS@_t pset_after,
+           ppl_Generator_t point));
+
+')
+
 m4_define(`ppl_ at CLASS@_all_affine_ranking_functions_ at TERMINATION_ID@_code',
 `dnl
 /*! \relates ppl_ at CLASS@_tag */
@@ -63,6 +83,16 @@ PPL_PROTO((ppl_const_ at CLASS@_t pset,
 
 ')
 
+m4_define(`ppl_ at CLASS@_all_affine_ranking_functions_ at TERMINATION_ID@_2_code',
+`dnl
+/*! \relates ppl_ at CLASS@_tag */
+int
+ppl_ at CLASS@_all_affine_ranking_functions_ at TERMINATION_ID@_2
+PPL_PROTO((ppl_const_ at CLASS@_t pset_before,
+           ppl_const_ at CLASS@_t pset_after,
+           ppl_Polyhedron_t ph));
+
+')
 
 m4_define(`ppl_ at CLASS@_linear_ at PARTITION@_code',
 `dnl
diff --git a/interfaces/C/ppl_interface_generator_c_procedure_generators.m4 b/interfaces/C/ppl_interface_generator_c_procedure_generators.m4
index fba9565..3cd9115 100644
--- a/interfaces/C/ppl_interface_generator_c_procedure_generators.m4
+++ b/interfaces/C/ppl_interface_generator_c_procedure_generators.m4
@@ -47,5 +47,8 @@ ppl_ at CLASS@_wrap_assign +simple,
 ppl_ at CLASS@_termination_test_ at TERMINATION_ID@ +simple,
 ppl_ at CLASS@_one_affine_ranking_function_ at TERMINATION_ID@ +simple,
 ppl_ at CLASS@_all_affine_ranking_functions_ at TERMINATION_ID@ +simple,
+ppl_ at CLASS@_termination_test_ at TERMINATION_ID@_2 +simple,
+ppl_ at CLASS@_one_affine_ranking_function_ at TERMINATION_ID@_2 +simple,
+ppl_ at CLASS@_all_affine_ranking_functions_ at TERMINATION_ID@_2 +simple,
 )
 ')




More information about the PPL-devel mailing list