Hi,
In applying a map to a dense container I can succesfully access north, south, east and west neighbors.
However, when trying to access other neighbors like:
do_main() {
dense v;
call(doSomething)(v, 5, 5);
}
void doSomething(dense& v, usize vec_width, usize vec_height) {
map(mapFunction)(v, vec_width, vec_height);
}
void mapFunction(f32& in, usize vec_width, usize vec_height) {
array coord;
position(coord);
usize x = coord.at(0);
usize y = coord.at(1);
_if (x==0 || x == (vec_width -1) || y==0 || y == (vec_height-1)) {
in = in;
} _else {
in = neighbor(in, -1, -1);
} _end_if
}
I get Error: caught unexpected exception. COMP_ERROR: Dynamic Compiler Internal Error.
The code does work when setting ARBB_OPT_LEVEL=O0. But other values for ARBB_OPT_LEVEL give the same error. And it doesn't work for any of the directions: (northwest, southwest, northeast, southeast). Any idea on how this can be possible?
Writing things like this in mapFunction() does work:
f32 temp = neighbor(in, -1, -1) + neighbor(in, 1, 1);
The error occurs when trying to assign to 'in'. So in=temp; also gives the same error.
I tried not using 'in' and 'v' as both input and output but this didn't make a difference.
Thanks


