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

Eliminate repeated address shift calculations. #7

Open
nushio3 opened this issue May 7, 2011 · 0 comments
Open

Eliminate repeated address shift calculations. #7

nushio3 opened this issue May 7, 2011 · 0 comments

Comments

@nushio3
Copy link
Owner

nushio3 commented May 7, 2011

These kind of repeated terms may be eliminated anyway by common subexpression eliminator, but is ugly, so let us unify them manually.

const int a5_0_0 = a1[((((i) % size0()) + 1 + size0())%size0()) + size0() * (((((i / size0()) % size1()) + 1 + size1())%size1()))];
const int a7_0_0 = a1[((((i) % size0()) + 0 + size0())%size0()) + size0() * (((((i / size0()) % size1()) + 1 + size1())%size1()))];
const int a9_0_0 = a1[((((i) % size0()) + -1 + size0())%size0()) + size0() * (((((i / size0()) % size1()) + 1 + size1())%size1()))];
const int a11_0_0 = a1[((((i) % size0()) + 1 + size0())%size0()) + size0() * (((((i / size0()) % size1()) + 0 + size1())%size1()))];
const int a13_0_0 = a1[((((i) % size0()) + -1 + size0())%size0()) + size0() * (((((i / size0()) % size1()) + 0 + size1())%size1()))];
const int a15_0_0 = a1[((((i) % size0()) + 1 + size0())%size0()) + size0() * (((((i / size0()) % size1()) + -1 + size1())%size1()))];
const int a17_0_0 = a1[((((i) % size0()) + 0 + size0())%size0()) + size0() * (((((i / size0()) % size1()) + -1 + size1())%size1()))];
const int a19_0_0 = a1[((((i) % size0()) + -1 + size0())%size0()) + size0() * (((((i / size0()) % size1()) + -1 + size1())%size1()))];
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