Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it help to add an argument to the pscan function for reversing sequence scanning? #64

Open
GlassyWing opened this issue Dec 16, 2024 · 1 comment

Comments

@GlassyWing
Copy link

Some tasks need to reverse scan sequences, but a flip -> scan->flip operation too slow.

@GlassyWing
Copy link
Author

Alright, it seems that a very simple implementation approach is:

class PScanReverse:

    @staticmethod
    def pscan(A, X):
        # call reverse version of PScan
        return PScan.pscan_rev(A, X)

    @staticmethod
    def pscan_rev(A, X):
        # call reverse version of PScan
        return PScan.pscan(A, X)

    def forward(...)
        # same of `PScan.forward` but make some sequential adjustments
        ...
        
    def backward(...)
       # same of `PScan.backward` but make some sequential adjustments
        ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant