ComputeApps
ComputeApps copied to clipboard
lulesh-amp: "reference to 'index' is ambiguous"
For lulesh-amp. There appears to be some issue during compile about "reference to 'index' is ambiguous".
The workaround is to use Kalmar::index in place of index like this.
- HCC_ID(vnewc)](index<1> idx) restrict(amp)
+ HCC_ID(vnewc)](Kalmar::index<1> idx) restrict(amp)
The git diff is attached. git-diff-lulesh-amp.txt
Sample error:
paklui@ixt-hq-50:~/ComputeApps/lulesh-amp$ make
Building lulesh.cc
/opt/rocm/hcc/bin/hcc -c -hc -std=c++amp -I/opt/rocm/hcc/include -I/opt/rocm/include -DBLOCKSIZE=256 -DARRAY_VIEW -O3 -o objs/lulesh.o lulesh.cc
lulesh.cc:347:20: error: reference to 'index' is ambiguous
HCC_ID(q)](index<1> idx) restrict(amp){
^
/usr/include/strings.h:68:14: note: candidate found by name lookup is 'index'
extern char *index (const char *__s, int __c)
^
/opt/rocm/hcc/bin/../include/hc.hpp:78:1: note: candidate found by name lookup is 'hc::index'
using index = Kalmar::index<N>;
^
lulesh.cc:631:29: error: reference to 'index' is ambiguous
...
/opt/rocm/hcc/bin/../include/hc.hpp:78:1: note: candidate found by name lookup is 'hc::index'
using index = Kalmar::index<N>;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Makefile:57: recipe for target 'objs/lulesh.o' failed
make: *** [objs/lulesh.o] Error 1