CNDSM  1.00
Compile-time switches in DualCQKnP.h

These macros control some important details of the class interface. More...

Macros

#define DualCQKnP_WHCH_QSORT   1
 If DualCQKnP_WHCH_QSORT == 0, the sort() function of the STL is used, otherwise a hand-made non-recursive quick-sort implementation is used. More...
 
#define DualCQKnP_SANITY_CHECKS   0
 If DualCQKnP_SANITY_CHECKS == 1, sanity checks are done each time the data of the instance changes to pick up clearly bad values. More...
 

Detailed Description

These macros control some important details of the class interface.

Although using macros for activating features of the interface is not very C++, switching off some unused features may allow some implementation to be more efficient in running time or memory.

Macro Definition Documentation

#define DualCQKnP_WHCH_QSORT   1

If DualCQKnP_WHCH_QSORT == 0, the sort() function of the STL is used, otherwise a hand-made non-recursive quick-sort implementation is used.

Note
Other than the performance impact, this choice has a consequence on the thread-safety of the code. If DualCQKnP_WHCH_QSORT == 1, some temporary data structures are created that are shared among all "active" instances of DualCQKnP to save on space in the (frequent) case where many instances are simultaneously in memory. This is not* thread-safe, while DualCQKnP_WHCH_QSORT == 0 is.
#define DualCQKnP_SANITY_CHECKS   0

If DualCQKnP_SANITY_CHECKS == 1, sanity checks are done each time the data of the instance changes to pick up clearly bad values.

Otherwise, the user will have to be extra careful to avoid them.