
Module: ppl/ppl Branch: termination Commit: 3f1381c41b71fbff2c60e924402fc4cca8eeaacb URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=3f1381c41b71f...
Author: Patricia Hill p.m.hill@leeds.ac.uk Date: Mon Mar 8 13:34:53 2010 +0000
Added the rest of the termination functions to the C interface.
---
interfaces/C/ppl_interface_generator_c_cc_code.m4 | 35 ++++++++++++++++++-- interfaces/C/ppl_interface_generator_c_h_code.m4 | 25 +++++++++++++- ...l_interface_generator_c_procedure_generators.m4 | 4 ++- 3 files changed, 58 insertions(+), 6 deletions(-)
diff --git a/interfaces/C/ppl_interface_generator_c_cc_code.m4 b/interfaces/C/ppl_interface_generator_c_cc_code.m4 index 22ddd23..c6fbd79 100644 --- a/interfaces/C/ppl_interface_generator_c_cc_code.m4 +++ b/interfaces/C/ppl_interface_generator_c_cc_code.m4 @@ -1156,13 +1156,42 @@ CATCH_ALL
')
-m4_define(`ppl_@CLASS@_termination_test_MS_code', +m4_define(`ppl_@CLASS@_termination_test_@TERMINATION_ID@_code', `dnl int -ppl_@CLASS@_termination_test_MS +ppl_@CLASS@_termination_test_@TERMINATION_ID@ (ppl_const_@CLASS@_t x) try { const @CPP_CLASS@& xx = *to_const(x); - return termination_test_MS(xx); + return termination_test_@TERMINATION_ID@(xx); +} +CATCH_ALL + +') + +m4_define(`ppl_@CLASS@_one_affine_ranking_function_@TERMINATION_ID@_code', +`int +ppl_@CLASS@_one_affine_ranking_function_@TERMINATION_ID@ +(ppl_const_@CLASS@_t x, + ppl_Generator_t point) try { + const @CPP_CLASS@& xx = *to_const(x); + Generator& ppoint = *to_nonconst(point); + bool ok = one_affine_ranking_function_@TERMINATION_ID@(xx, ppoint); + return ok ? 1 : 0; +} +CATCH_ALL + +') + +m4_define(`ppl_@CLASS@_all_affine_ranking_functions_@TERMINATION_ID@_code', +`int +ppl_@CLASS@_all_affine_ranking_functions_@TERMINATION_ID@ +(ppl_const_@CLASS@_t x, + ppl_Polyhedron_t ph) try { + const @CPP_CLASS@& xx = *to_const(x); + all_affine_ranking_functions_@TERMINATION_ID@(xx, + *static_cast<C_Polyhedron*> + (to_nonconst(ph))); + return 0; } CATCH_ALL
diff --git a/interfaces/C/ppl_interface_generator_c_h_code.m4 b/interfaces/C/ppl_interface_generator_c_h_code.m4 index 39f717e..2a1ecdd 100644 --- a/interfaces/C/ppl_interface_generator_c_h_code.m4 +++ b/interfaces/C/ppl_interface_generator_c_h_code.m4 @@ -34,15 +34,36 @@ dnl There is no code at present for these procedures in the C interface. dnl Remove the macro if its definition is added. dnl
-m4_define(`ppl_@CLASS@_termination_test_MS_code', +m4_define(`ppl_@CLASS@_termination_test_@TERMINATION_ID@_code', `dnl /*! \relates ppl_@CLASS@_tag */ int -ppl_@CLASS@_termination_test_MS +ppl_@CLASS@_termination_test_@TERMINATION_ID@ PPL_PROTO((ppl_const_@CLASS@_t x));
')
+m4_define(`ppl_@CLASS@_one_affine_ranking_function_@TERMINATION_ID@_code', +`dnl +/*! \relates ppl_@CLASS@_tag */ +int +ppl_@CLASS@_one_affine_ranking_function_@TERMINATION_ID@ +PPL_PROTO((ppl_const_@CLASS@_t x, + ppl_Generator_t point)); + +') + +m4_define(`ppl_@CLASS@_all_affine_ranking_functions_@TERMINATION_ID@_code', +`dnl +/*! \relates ppl_@CLASS@_tag */ +int +ppl_@CLASS@_all_affine_ranking_functions_@TERMINATION_ID@ +PPL_PROTO((ppl_const_@CLASS@_t x, + ppl_Polyhedron_t ph)); + +') + + m4_define(`ppl_@CLASS@_linear_@PARTITION@_code', `dnl /*! \relates ppl_@CLASS@_tag */ diff --git a/interfaces/C/ppl_interface_generator_c_procedure_generators.m4 b/interfaces/C/ppl_interface_generator_c_procedure_generators.m4 index 7f590d7..fba9565 100644 --- a/interfaces/C/ppl_interface_generator_c_procedure_generators.m4 +++ b/interfaces/C/ppl_interface_generator_c_procedure_generators.m4 @@ -44,6 +44,8 @@ ppl_new_@TOPOLOGY@@CLASS@_recycle_@BUILD_REPRESENT@s +simple, ppl_assign_@TOPOLOGY@@CLASS@_from_@TOPOLOGY@@CLASS@ +simple, ppl_@CLASS@_add_recycled_@CLASS_REPRESENT@s +simple, ppl_@CLASS@_wrap_assign +simple, -ppl_@CLASS@_termination_test_MS +simple, +ppl_@CLASS@_termination_test_@TERMINATION_ID@ +simple, +ppl_@CLASS@_one_affine_ranking_function_@TERMINATION_ID@ +simple, +ppl_@CLASS@_all_affine_ranking_functions_@TERMINATION_ID@ +simple, ) ')