TBTK
|
Need a break? Support the development by playing Polarity Puzzles |
Generates IndexTrees to be used as loop ranges and memory layout for Properties in the PropertyExtractors. More...
#include <IndexTreeGenerator.h>
Public Member Functions | |
IndexTreeGenerator (const Model &model) | |
IndexTree | generateAllIndices (const std::vector< Index > &patterns) const |
IndexTree | generateMemoryLayout (const std::vector< Index > &patterns) const |
Generates IndexTrees to be used as loop ranges and memory layout for Properties in the PropertyExtractors.
Assume a Mode with Index structure {x, y, z} and a list of patterns such as
We can get an IndexTree that contains all Indices in the Model that are compatible with one of the patterns using
A Property that results from summing over one or more Subindices is stored with the flag IDX_SUM_ALL in the Subindex that is summed over. It is possible to generate such an IndexTree using
If IDX_SPIN is present in a Subindex, it will be preserved just like IDX_SUM_ALL is preserved when generating a mameory layout.
TBTK::PropertyExtractor::IndexTreeGenerator::IndexTreeGenerator | ( | const Model & | model | ) |
Constructs a PropertyExtractor::PropertyExtractor.
|
inline |
Generate an IndexTree that contains all the Indices in the Model that satisfies one of the given patterns. Subindices marked with IDX_SUM_ALL will keep this flag in the coresponding position.
patterns | Index patters to match against. |