There exists a class Lattice which handles any kind of lattice sizes. A specialized class for power-of-two lattice sizes could be an high improvement for the performance.
This class is currently used in:
- FeatureNNInteractionSc
- FeatureConnectionSc
Suggestion: Maybe it is sufficient to templatize the feature classes, where the template parameter specifies the lattice class.