Develop Biology
The language of life
OptimizeMacros.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BIO_ENABLE_REFLECTION   1
 
#define BIO_ENABLE_THREADING   1
 
#define BIO_MEMORY_OPTIMIZE_LEVEL   0
 
#define BIO_SAFETY_LEVEL   2
 

Macro Definition Documentation

◆ BIO_ENABLE_REFLECTION

#define BIO_ENABLE_REFLECTION   1

The symmetry system is somewhat costly, especially on memory. If you do not need any of the features offered by Symmetry, #define BIO_ENABLE_REFLECTION 0. Please do not #undef this. Just set it to 0. See the following for more info (all in bio/physical): Symmetry.h Axis.h Wave.h and all the classes in bio/molecular.

Definition at line 57 of file OptimizeMacros.h.

◆ BIO_ENABLE_THREADING

#define BIO_ENABLE_THREADING   1

Thread locking & unlocking is unnecessary on single-threaded builds. If you do not intend on using threads at all, #define BIO_ENABLE_THREADING 0 Doing so will make all thread related operations into nops and save you some cpu cycles.

Definition at line 67 of file OptimizeMacros.h.

◆ BIO_MEMORY_OPTIMIZE_LEVEL

#define BIO_MEMORY_OPTIMIZE_LEVEL   0

Certain places in the bio framework afford easy toggling between storing fewer variables and calculating the values only when needed or caching the values and only calculating them once (or as necessary). BIO_MEMORY_OPTIMIZE_LEVEL controls this tradeoff. At a lower value, BIO_MEMORY_OPTIMIZE_LEVEL will cause more memory to be cached, saving cpu. At a higher value, BIO_MEMORY_OPTIMIZE_LEVEL will cause less memory to be cached, costing cpu. Values generally range from 0 to 1 (on or off, for the time being).

Definition at line 42 of file OptimizeMacros.h.

◆ BIO_SAFETY_LEVEL

#define BIO_SAFETY_LEVEL   2

BIO_SAFETY_LEVEL dictates how fast vs safe *this should be. A lower level means faster runtime and a higher chance of crashing. A higher level means slower runtime and a smaller chance of crashing. Values generally range from 0 to 4 (unless you make your own code dependent on the BIO_SAFETY_LEVEL).

Definition at line 31 of file OptimizeMacros.h.