Displaying 1 result from an estimated 1 matches for "valid1".
Did you mean:
valid
2011 Oct 10
3
[LLVMdev] Disable Short-Circuit Evaluation?
...ike the following:
bool validX = get_group_id(0) > 32;
int globalIndexY0 = get_group_id(1)*186 + 6*get_local_id(1) + 0 + 1;
bool valid0 = validX && globalIndexY0 >= 4 && globalIndexY0 < 3910;
int globalIndexY1 = get_group_id(1)*186 + 6*get_local_id(1) + 1 + 1;
bool valid1 = validX && globalIndexY1 >= 4 && globalIndexY1 < 3910;
int globalIndexY2 = get_group_id(1)*186 + 6*get_local_id(1) + 2 + 1;
bool valid2 = validX && globalIndexY2 >= 4 && globalIndexY2 < 3910;
Clang, even at -O0, is performing short-circuit...