Skip to content

lulesh-amp: "reference to 'index' is ambiguous" #8

@paklui

Description

@paklui

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions