I don’t know if NVCC would be smart enough for finding ILP in a bucle like this:
for (int i = 0; i < 8; i++) {
if (somethingHappens) {
someVar = someVar & 1 << i;
}
}
or should I rewrite it for exposing the ILP explicetly
char somevar[8];
for (int i = 0; i < 8; i++) {
if (somethingHappens) {
someVar[i] = 1 << i;
}
}
//reduce somevar using vaddus4 and 3 logical-ands
other questions:
ps. i have asked the same in stackoverflow, dunno which site is better for these questions…
http://stackoverflow.com/questions/17446448/typical-acumulator-bucle-is-worth-it-rewritting-it-for-exposing-more-ilp-explic