Add foreach_unique iteration construct.
Idea via Ingo Wald / IVL compiler.
This commit is contained in:
12
tests_errors/foreach-unique-1.ispc
Normal file
12
tests_errors/foreach-unique-1.ispc
Normal file
@@ -0,0 +1,12 @@
|
||||
// Iteration domain type in "foreach_tiled" loop must be an atomic, pointer, or enum type
|
||||
|
||||
struct Point { float x, y; };
|
||||
|
||||
uniform int foo(Point p) {
|
||||
uniform int count = 0;
|
||||
foreach_unique (pt in p)
|
||||
++count;
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user