Skip to content

Despecialize the foreachblock machinery #494

Description

@lkdvos

Currently many of the kernels are already using foreachblock as a primitive to loop over all blocks. However, that primitive, as well as the blocks machinery still has to specialize on each symmetry type, as the sectors are used as keys to identify the blocks.
It could be interesting to play around with an alternative approach that bypasses this completely, and just refers to blocks as the 'nth' block, where n is defined as the TensorKitSectors.findindex. In that case, we can still compare, but since the Int is the same type for all symmetries, we could (hopefully) just (pre)compile a single method for all symmetry types.
(Used for all factorizations, projections, matrix functions, ...)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions