ispc now supports goto, but only under uniform control flow--i.e. it must be possible for the compiler to statically determine that all program instances will follow the goto. An error is issued at compile time if a goto is used when this is not the case.
12 lines
144 B
Plaintext
12 lines
144 B
Plaintext
// "goto" statements are only legal under "uniform" control flow
|
|
|
|
void func(int x) {
|
|
cif (x < 0)
|
|
goto label;
|
|
|
|
label:
|
|
;
|
|
}
|
|
|
|
|