Reassigns the identifiers in a tape such that the tape evaluation is optimized. More...
#include <identifierCacheOptimizer.hpp>
Public Types | |
| using | Lifetime = T_Lifetime |
| See IdentifierCacheOptimizerHotCold. | |
| using | Tape = T_Tape |
| See IdentifierCacheOptimizerHotCold. | |
Public Member Functions | |
| template<typename FuncIn, typename FuncOut> | |
| void | eval (FuncIn &&iterIn, FuncOut &&iterOut) |
| Perform the tape cache optimization. Se the class description for details. | |
| inlinesize_t | getLargestCreatedIndex () |
| Get the new largest created index. | |
| inlineIdentifierCacheOptimizerHotCold (Tape &tape) | |
| Constructor. | |
| inlinevoid | setHotLiveTimeThreshold (Lifetime hotLiveTimeThreshold) |
| Set the threshold for hot variables. Smaller values will be hot and larger ones cold. | |
| template<typename Stream> | |
| void | writeStatsHeader (Stream &out) |
| Write the header for the statistics to a stream. | |
| template<typename Stream> | |
| void | writeStatsRow (Stream &out) |
| Write the data for this optimizer into a row. | |
| template<typename Stream> | |
| void | writeStatsVerbose (Stream &out) |
| Write statistics to a stream as a list. | |
Reassigns the identifiers in a tape such that the tape evaluation is optimized.
The optimization performs three steps:
Since the optimization requires some time, it should only be applied if the tape is evaluated quite often.
| T_Tape | Tape tape on which the optimization is applied. |
| T_Lifetime | The lifetime type. For large tapes this needs to be increased. Signed type required since negative values are used for statements with multiple outputs. |