[GIT] ppl/ppl(master): Check for NaNs only when debugging.

Module: ppl/ppl Branch: master Commit: 7f8b88c139b3e7babdb53d586493e9239f873446 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=7f8b88c139b3e...
Author: Roberto Bagnara bagnara@cs.unipr.it Date: Sun May 3 22:25:43 2009 +0200
Check for NaNs only when debugging.
---
src/BD_Shape.defs.hh | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/BD_Shape.defs.hh b/src/BD_Shape.defs.hh index 2ab5448..165f0eb 100644 --- a/src/BD_Shape.defs.hh +++ b/src/BD_Shape.defs.hh @@ -404,7 +404,11 @@ private: The (extended) numeric type of the inhomogeneous term of the inequalities defining a BDS. */ +#ifndef NDEBUG typedef Checked_Number<T, Extended_Number_Policy> N; +#else + typedef Checked_Number<T, WRD_Extended_Number_Policy> N; +#endif
public: //! The numeric base type upon which bounded differences are built.

+#ifndef NDEBUG typedef Checked_Number<T, Extended_Number_Policy> N; +#else
- typedef Checked_Number<T, WRD_Extended_Number_Policy> N;
+#endif
I assume that the prefix "WRD" indicates the debug data type. http://www.cs.unipr.it/ppl/Documentation/devref/ppl-devref-0.10.2-html/struc...
I would prefer to write the preprocessor instruction this way: #ifdef NDEBUG
Regards, Markus

Markus Elfring wrote:
+#ifndef NDEBUG typedef Checked_Number<T, Extended_Number_Policy> N; +#else
- typedef Checked_Number<T, WRD_Extended_Number_Policy> N;
+#endif
I assume that the prefix "WRD" indicates the debug data type.
Hi Mark,
this is work in progress. We will probably rename the policy when done.
I would prefer to write the preprocessor instruction this way: #ifdef NDEBUG
Well, we have standardized on the other form. In other words, in the PPL "#ifndef NDEBUG" is idiomatic for "if debugging": we do not even observe the double negation. All the best,
Roberto
participants (2)
-
Markus Elfring
-
Roberto Bagnara