Fixed issue with aliasing local variables
ISPC++ now produces valid code, or an appropriate error message, for all of my test cases.
This commit is contained in:
14
tests_ispcpp/varying.ispc
Normal file
14
tests_ispcpp/varying.ispc
Normal file
@@ -0,0 +1,14 @@
|
||||
floating foo(const uniform int a, floating b) {
|
||||
floating out = b;
|
||||
for (int i = 1; i<a; i++) {
|
||||
out *= b;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
export void square(uniform int N, uniform floating b[], uniform double out[]) {
|
||||
foreach (i = 0 ... N) {
|
||||
out[i] = foo(2, b[i]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user